Simplifies interacting with Bailo programmatically
Project description
Bailo Python Client
A lightweight, Python API wrapper for Bailo, providing streamlined programmatic access to its core functionality - designed for Data Scientists, ML Engineers, and Developers who need to integrate Bailo capabilities directly into their workflows.
Table of Contents
Quickstart
Requires: Python 3.10 to 3.14
Installation
pip install bailo
Optional: enable integration with MLFlow for advanced model tracking:
pip install bailo[mlflow]
Basic Usage
from bailo import Client, Model
# Connect to Bailo server
client = Client("http://localhost:8080")
# Create a model
yolo = Model.create(
client=client,
name="YoloV4",
description="You only look once!"
)
# Populate datacard using a predefined schema
yolo.card_from_schema("minimal-general-v10")
# Create a new release
my_release = yolo.create_release(
version="0.1.0",
notes="Beta"
)
# Upload a binary file to the release
with open("yolo.onnx") as f:
my_release.upload("yolo", f)
Core Features
- Upload and download model binaries
- Manage Models & Releases
- Handle Datacards & Schemas
- Manage Schemas
- Process Access Requests
Note: Certain collaborative actions (approvals, review threads, etc.) are best handled via the Bailo web interface.
Documentation
Full Python client documentation: Bailo Python Docs.
Building locally
Refer to backend/docs/README.md for local build steps.
Development
The following steps are only required for users who wish to extend or develop the Bailo Python client locally.
Python Setup
From within the lib/python directory:
python3 -m venv libpythonvenv
source libpythonvenv/bin/activate
pip install -e .[test]
Running Tests
To run the unit tests:
pytest
To run the integration tests (requires Bailo running on https://localhost:8080):
pytest -m integration
To run the mlflow integration tests (requires Bailo running on https://localhost:8080 and mlflow running on https://localhost:5050 e.g. via docker):
docker run -p 5050:5000 \
"ghcr.io/mlflow/mlflow:v$(python -m pip show mlflow | awk '/Version:/ {print $2}')" \
mlflow server --host 0.0.0.0 --port 5000
pytest -m mlflow
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
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 bailo-3.5.0.tar.gz.
File metadata
- Download URL: bailo-3.5.0.tar.gz
- Upload date:
- Size: 25.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5f29c685f067152ae1c31dd61265f1fb81718eb675b02215bd56bb8055d3c3d5
|
|
| MD5 |
2ceb4e7af50da62f973d8005f9e1b783
|
|
| BLAKE2b-256 |
aa28acd412c1f216c1b865fe17f3e54dadbb89e221ecabf2f32df3b8c337f9c6
|
Provenance
The following attestation bundles were made for bailo-3.5.0.tar.gz:
Publisher:
python-publish.yml on gchq/Bailo
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bailo-3.5.0.tar.gz -
Subject digest:
5f29c685f067152ae1c31dd61265f1fb81718eb675b02215bd56bb8055d3c3d5 - Sigstore transparency entry: 908105844
- Sigstore integration time:
-
Permalink:
gchq/Bailo@865ef3b9305d75dcb9850ecf9f1b0a4af2054ab7 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/gchq
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@865ef3b9305d75dcb9850ecf9f1b0a4af2054ab7 -
Trigger Event:
push
-
Statement type:
File details
Details for the file bailo-3.5.0-py3-none-any.whl.
File metadata
- Download URL: bailo-3.5.0-py3-none-any.whl
- Upload date:
- Size: 31.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
da14455e6046f7516d4fa0c38448b55b926dbeecec382adaf9c25db50dcf1f4c
|
|
| MD5 |
282126c6fb37e6a0fa53673ff331dc64
|
|
| BLAKE2b-256 |
fba250685a0e742ece80a387e71bf156a9667548684b0cc66f3ee8c64f19ac64
|
Provenance
The following attestation bundles were made for bailo-3.5.0-py3-none-any.whl:
Publisher:
python-publish.yml on gchq/Bailo
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bailo-3.5.0-py3-none-any.whl -
Subject digest:
da14455e6046f7516d4fa0c38448b55b926dbeecec382adaf9c25db50dcf1f4c - Sigstore transparency entry: 908105849
- Sigstore integration time:
-
Permalink:
gchq/Bailo@865ef3b9305d75dcb9850ecf9f1b0a4af2054ab7 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/gchq
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@865ef3b9305d75dcb9850ecf9f1b0a4af2054ab7 -
Trigger Event:
push
-
Statement type: