Skip to main content

Hasty API client library

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hasty-0.3.9.tar.gz (27.7 kB view hashes)

Uploaded Source

Built Distribution

hasty-0.3.9-py3-none-any.whl (34.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page