Api for Box21.ai
Project description
box21_api
A python package for interacting with your Box21 via the api
Install
pip install box21_api
How to use
from box21_api.box21_api import Box21Api
box21_api = Box21Api(API_USERNAME, API_PASSWORD, 'https://box21.ai', 443, API_PROJECT_ID)
labels = box21_api.get_labels()
print('Number of labels retrieved', len(labels))
print('First label', labels[0])
Number of labels retrieved 2
First label Label(('Bounding box', 'Chital', 1))
annotations = box21_api.get_label_annotations(labels[0])
print('Number of annotations retrieved', len(annotations))
print('First annotation', annotations[0])
Number of annotations retrieved 2
First annotation BoundingBox(Chital, (0.1641, 0.5291, 0.2766, 0.3381))
first_annotation = annotations[0]
pil_image = box21_api.download_asset(first_annotation.asset_id)
pil_image
See more examples on: https://ramonhollands.github.io/box21_api/
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
box21_api-0.0.9.tar.gz
(11.8 kB
view details)
Built Distribution
box21_api-0.0.9-py3-none-any.whl
(44.9 kB
view details)
File details
Details for the file box21_api-0.0.9.tar.gz
.
File metadata
- Download URL: box21_api-0.0.9.tar.gz
- Upload date:
- Size: 11.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7bfc8675373716d6f405ae78540f293f8d78fa0cafa747731257215a542a6ded |
|
MD5 | a965b5024fc627d741791c858ea4182d |
|
BLAKE2b-256 | 48cf6b94f2eab5bbd2f3ffb0c1b4ee78d593b7d2dd4c77a16091183a8de81f0f |
File details
Details for the file box21_api-0.0.9-py3-none-any.whl
.
File metadata
- Download URL: box21_api-0.0.9-py3-none-any.whl
- Upload date:
- Size: 44.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e4aef1df353c807f1008771323d71a7fff909f88992a3a5efcba83f9f6536894 |
|
MD5 | 506db23799003b909f55822702da56d1 |
|
BLAKE2b-256 | e601779c17d82dcc8f16fb815898ab803409b3a0c4e40cffdfb9580412c6cc41 |