from box21_api.box21_api import Box21Api
box21_api
Api for Box21.ai
A python package for interacting with your Box21 via the api
Install
pip install box21_api
How to use
= Box21Api(API_USERNAME, API_PASSWORD, 'https://box21.ai', 443, API_PROJECT_ID) box21_api
= box21_api.get_labels()
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))
= box21_api.get_label_annotations(labels[0])
annotations 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))
= annotations[0]
first_annotation = box21_api.download_asset(first_annotation.asset_id)
pil_image pil_image
See more examples on: https://ramonhollands.github.io/box21_api/