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
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.8.tar.gz
(11.7 kB
view hashes)
Built Distribution
box21_api-0.0.8-py3-none-any.whl
(37.9 kB
view hashes)
Close
Hashes for box21_api-0.0.8-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d4e4ffb8f1b6b0a7122cd075ab0b3adbe9d9709c1e75e592bfe2fa415a02f3a0 |
|
MD5 | 04efe8d8ab8188352a65a5df1331a081 |
|
BLAKE2b-256 | 63e537c5bd9d7c472045598ad258cd4c9e506a4810cae4b04192cc2e1d2217db |