DevGlitch / hasty-python

Python library for the Hasty API.

Home Page:https://hasty.ai

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Python library for the Hasty API.

PyPI version Documentation Status CI

Installation

 pip install hasty

Usage Example

Establish initial connection with Hasty:

from hasty import Client

API_KEY = "your_key"
h = Client(api_key=API_KEY)

Get projects

projects = h.get_projects()
print(projects)
>> ['Project(id="9a5ac730-9b08-477d-8f20-e7245baf0e29", name="African Wildlife")']

Create dataset

buffalo_ds = project.create_dataset("buffalo")
print(buffalo_ds)
>> Dataset(id="66ee13d5-aaf7-4fac-862c-45f44eff802a", name="buffalo")

Upload image

img = project.upload_from_file(buffalo_ds,
                               "./buffalo/001.jpg")
print(img)
>> Image(id="ebf88007-134b-4bce-9799-995504b2b0ee", dataset_name="buffalo", name="001.jpg")

For more information check our documentation

About

Python library for the Hasty API.

https://hasty.ai

License:MIT License


Languages

Language:Python 100.0%