Barbara-sdk: Python SDK for Barbara Edge Computing Platform
Deploy your machine learning models to the edge with the Barbara Python SDK. This intuitive library empowers you to streamline your workflow and accelerate edge AI development.
Features
- Seamless Uploads: Upload your models directly from Python code or Jupyter Notebooks to your Barbara model library.
- Simplified Deployment: Deploy models directly to edge nodes with just a few lines of code.
- Enhanced Efficiency: Automate model training & deployment tasks and save valuable development time.
- Streamlined Workflow: Integrate edge AI development seamlessly into your existing Python environment.
Prerequisites
- Python (version 3.8 or higher)
Barbara API Credentials
To use this SDK you will need the following credentials:
- Username: Your Barbara username.
- Password: Your Barbara password.
- Client Secret: This credential is only available for users with an Enterprise License.
- Client Id: This credential is only available for users with an Enterprise License.
Obtaining Enterprise Credentials
If you have an Enterprise License and require the Client Secret and Client ID, please contact Barbara support by sending an email to support@barbara.tech.
Security Note
We strongly recommend storing your username and password securely and avoiding embedding them directly in your code. Consider using environment variables or a secure credential management solution.
Installation with pip
pip install barbara-sdk
Usage
Import the SDK:
import barbara
Create an instance of the SDK
bbr = barbara.ApiClient('client_id', 'client_secret', 'username', 'password')
Replace 'client_id', 'client_secret', 'username' and 'password' with your actual API credentials.
Uploading models to your Library
- Tensorflow over TFX
bbr.models.upload('model_path', 'model_name')
or
bbr.models.upload('model_path', 'model_name', model_type=barbara.MODEL_TYPE=TENSORFLOW_SAVED_MODEL, engine=barbara.ENGINE_TYPE.TENSORFLOW_TFX)
- Tensorflow over NVIDIA Triton
bbr.models.upload('model_path', 'model_name', model_type=barbara.MODEL_TYPE.TENSORFLOW_SAVED_MODEL, engine=barbara.ENGINE_TYPE.NVIDIA_TRITON)
- Torchscript over NVIDIA Triton
bbr.models.upload('model_path', 'model_name', model_type=barbara.MODEL_TYPE.PYTORCH_TORCHSCRIPT, engine=barbara.ENGINE_TYPE.NVIDIA_TRITON)
- Onnx over NVIDIA Triton
bbr.models.upload('model_path', 'model_name', model_type=barbara.MODEL_TYPE.ONNX, engine=barbara.ENGINE_TYPE.NVIDIA_TRITON)
Listing models in your Library
bbr.models.list()
Listing Edge Nodes
bbr.nodes.list()
Deploy a model to an Edge Node
bbr.models.deploy('edge_node_name', 'model_name')
bbr.models.deploy('edge_node_name', 'model_over_tfx_name', grpc_port=9000, rest_port=9001)
bbr.models.deploy('edge_node_name', 'model_over_nvidia_triton_name', grpc_port=9000, rest_port=9001, monitoring_port=9002)
bbr.models.deploy('edge_node_name', 'model_over_mlflow_name', grpc_port=9000, rest_port=9001, monitoring_port=9002, release_notes='-Added new classes\n-Improved performance')
Deploy a model to an Edge Node with GPU
bbr.models.deploy('edge_node_name', 'model_name', gpu=True)
Documentation
For detailed API reference and code examples, please refer to Barbara Academy
License
See the LICENSE file for details.
Metadata
Release files for barbara-sdk 1.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| barbara_sdk-1.2.2.tar.gz | 15.2 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| barbara_sdk-1.2.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 31.3 kB
Release files / barbara_sdk-1.2.2.tar.gz
| Download URL | barbara_sdk-1.2.2.tar.gz |
|---|---|
| Size | 15.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
45837482f42cd8f39831f95a546b160f2016c3f0f43105d73455b2955fbc8617
|
|
BLAKE2b-256 checksum How to use checksums |
0b34a19e6a675e581b919e3fa749154da9ee45db239f7297406e2e7442f2d9f2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.7
|
Release files / barbara_sdk-1.2.2-py3-none-any.whl
| Download URL | barbara_sdk-1.2.2-py3-none-any.whl |
|---|---|
| Size | 16.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d45043435e43930df553f5af3dd4e0ba6bf6830fde4de7a782d64e0540560141
|
|
BLAKE2b-256 checksum How to use checksums |
60f1e811df0fef8661779da44c78ff62a17949d79818ca2f4b5e216080bf56b2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.7
|
Security for barbara-sdk 1.2.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.