BSO Python SDK
Python client library for the Docker Release Registry.
Installation
pip install bso
Quick Start
from bso import Registry
# Initialize client
registry = Registry(
base_url="http://localhost/api",
api_key="your-api-key"
)
# Or use environment variables
# REGISTRY_URL=http://localhost/api
# REGISTRY_API_KEY=your-api-key
registry = Registry.from_env()
# Create a model
model = registry.create_model(
name="myorg/pytorch-model",
storage_path="s3://models/myorg/pytorch-model",
description="My PyTorch model"
)
# Create a release
release = registry.create_release(
model_name="myorg/pytorch-model",
version="1.0.0",
tag="v1.0.0",
digest="sha256:abc123...",
metadata={
"pytorch_version": "2.1.0",
"accuracy": 0.95,
"git_commit": "abc123"
}
)
# Record a deployment
deployment = registry.deploy(
release_id=release.id,
environment="production",
metadata={"replicas": 3}
)
# Get latest release
latest = registry.get_latest_release(
model_name="myorg/pytorch-model",
environment="production"
)
print(f"Latest release: {latest.version}")
API Reference
See the documentation for complete API reference.
License
MIT
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
boson_release-1.0.0.tar.gz
(5.1 kB
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 boson_release-1.0.0.tar.gz.
File metadata
- Download URL: boson_release-1.0.0.tar.gz
- Upload date:
- Size: 5.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
28e355166baf058a7364cdf798547bf2e2d5f415c004c616ace0837e39e5fbc3
|
|
| MD5 |
ca8752295a697465d3158ae17a00078e
|
|
| BLAKE2b-256 |
cef8aaf3a3c7f4f31c1f79c429f858377142dbfbb16329a963261c791aad957d
|
File details
Details for the file boson_release-1.0.0-py3-none-any.whl.
File metadata
- Download URL: boson_release-1.0.0-py3-none-any.whl
- Upload date:
- Size: 5.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
54a77c3bfd2ae73f9fd6b0ac9b92637ca2508f58e91392b35db70d235d1c5976
|
|
| MD5 |
dbc8092b4083d754fa4441db70ec9a08
|
|
| BLAKE2b-256 |
71c69774f4278049a7239984f62fbc365185438719c5fe96c91bfb01b868541c
|