Skip to main content

Bailo Python Client

PyPI - Python Version PyPI - Version License Contributor Covenant

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
  1. Quickstart
  2. Documentation
  3. Development

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-skinny | awk '/Version:/ {print $2}')" \
    mlflow server --host 0.0.0.0 --port 5000

pytest -m mlflow

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bailo-3.9.0.tar.gz (28.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bailo-3.9.0-py3-none-any.whl (34.0 kB view details)

Uploaded Python 3

File details

Details for the file bailo-3.9.0.tar.gz.

File metadata

  • Download URL: bailo-3.9.0.tar.gz
  • Upload date:
  • Size: 28.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for bailo-3.9.0.tar.gz
Algorithm Hash digest
SHA256 97509b9cd09ce77683dce7d40dae3c778c5b79046d29125b8a37cf192aab7ec8
MD5 90ec5783053fa1bab22109fd3fc2a47e
BLAKE2b-256 c1b481bcada7700d7a0c384ffcc2fbad7e907ef247d40e0c42260c0d49cae60a

See more details on using hashes here.

Provenance

The following attestation bundles were made for bailo-3.9.0.tar.gz:

Publisher: python-publish.yml on gchq/Bailo

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file bailo-3.9.0-py3-none-any.whl.

File metadata

  • Download URL: bailo-3.9.0-py3-none-any.whl
  • Upload date:
  • Size: 34.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for bailo-3.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 78853ecc16aad9af13d67c16dcbec45f92ab573d25bd5aa8873ddb79709f5ac4
MD5 88f46305141f98e2c94efc3cbf8072cf
BLAKE2b-256 533be4046f5eef4a97be5ec66ec4dfda8ce33402891bd85d63fd3184431dadf4

See more details on using hashes here.

Provenance

The following attestation bundles were made for bailo-3.9.0-py3-none-any.whl:

Publisher: python-publish.yml on gchq/Bailo

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

3.10.0

2 files

This release

3.9.0 This release

2 files

3.8.0

2 files

3.7.2

2 files

3.7.1

2 files

3.7.0

2 files

3.6.0

2 files

3.5.0

2 files

3.4.0

2 files

3.3.0

2 files

3.2.1

2 files

3.2.0

2 files

3.1.2

2 files

3.1.1

2 files

3.1.0

2 files

3.0.0

2 files

2.5.0

2 files

2.4.0

2 files

2.3.4

2 files

2.3.3

2 files

2.3.2

2 files

2.3.1

2 files

2.3.0

2 files

2.2.1

2 files

2.2.0

2 files

2.1.2

2 files

2.1.1

2 files

2.1.0

2 files

2.0.1

2 files

2.0.0

2 files

0.4.4

2 files

0.4.3

2 files

0.4.2

2 files

0.4.1

2 files

0.4.0

2 files

0.3.0

2 files

0.2.3

2 files

0.2.2

2 files

0.2.0

2 files

0.1.1

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page