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/
Metadata
Release files for box21-api 0.0.17
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| box21_api-0.0.17.tar.gz | 3.2 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| box21_api-0.0.17-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 3.2 MB
Release files / box21_api-0.0.17.tar.gz
| Download URL | box21_api-0.0.17.tar.gz |
|---|---|
| Size | 3.2 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
41bc8ce9d5f2964357b2fca852b940a805ab2f69b6ea43128c691612d34a0f4e
|
|
BLAKE2b-256 checksum How to use checksums |
967c847e7003f4030660e8589bbb95ed69ef35733e9b9b2e52bde4d2248d0821
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.8.19
|
Release files / box21_api-0.0.17-py3-none-any.whl
| Download URL | box21_api-0.0.17-py3-none-any.whl |
|---|---|
| Size | 15.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4b330fedeb0871721ee917d72bea74ff03c5e103096b57f162198d8d7d197ef5
|
|
BLAKE2b-256 checksum How to use checksums |
bfee1261c7b4e27abe942b52368eb1a4835ccaa513a70045bfc50205fc1d8edf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.8.19
|