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.10.tar.gz
(3.3 MB
view details)
Built Distribution
File details
Details for the file box21_api-0.0.10.tar.gz
.
File metadata
- Download URL: box21_api-0.0.10.tar.gz
- Upload date:
- Size: 3.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.8.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 96c40037e164199bd18c4c6a207562bd532e565832ce78ae15ffab300e260bf3 |
|
MD5 | ba3a77e422f444aa7616b8b72899bc89 |
|
BLAKE2b-256 | 55a70de238ffa0032d6616629d643c77209b1a6b6db736e2f30ba83502c64fe4 |
File details
Details for the file box21_api-0.0.10-py3-none-any.whl
.
File metadata
- Download URL: box21_api-0.0.10-py3-none-any.whl
- Upload date:
- Size: 12.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.8.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a6f9cbabe6a38704b9522df6227afbf46c9aed03676ea85c5f75794488963409 |
|
MD5 | 32cc41e37d2880f94222afdf3147415f |
|
BLAKE2b-256 | e3cf81da20a66ed24d71a01726a827d65595a8e80121b62b15cfbdb784672c12 |