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.17.tar.gz
(3.2 MB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file box21_api-0.0.17.tar.gz.
File metadata
- Download URL: box21_api-0.0.17.tar.gz
- Upload date:
- Size: 3.2 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.8.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
41bc8ce9d5f2964357b2fca852b940a805ab2f69b6ea43128c691612d34a0f4e
|
|
| MD5 |
4f0569fdfabf941d9297517321af94bd
|
|
| BLAKE2b-256 |
967c847e7003f4030660e8589bbb95ed69ef35733e9b9b2e52bde4d2248d0821
|
File details
Details for the file box21_api-0.0.17-py3-none-any.whl.
File metadata
- Download URL: box21_api-0.0.17-py3-none-any.whl
- Upload date:
- Size: 15.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 |
4b330fedeb0871721ee917d72bea74ff03c5e103096b57f162198d8d7d197ef5
|
|
| MD5 |
53bdb74d253d3cc846224aa00cd19d4b
|
|
| BLAKE2b-256 |
bfee1261c7b4e27abe942b52368eb1a4835ccaa513a70045bfc50205fc1d8edf
|