- Overview
- Users
- Managing Models and Releases
- Uploading Artifacts
- Creating a Model
- Completing the Model
- Creating a Release
- Uploading Files
- Uploading Images
- Using a Model
- Requesting Access
- Personal Access Tokens
- Using a a Pushed Docker Image
- Downloading files
- Reviews
- Reviewing Releases and Access Requests
- Reviewing a Release
- Reviewing an Access Request
- Reviewed Releases and Access Requests
- Releases
- Access Requests
- Programmatically using Bailo
- Authentication
- Open API
- Webhooks
- Python Client
- Administration
- Getting Started
- App Configuration
- Microservices
- File Scanners
- Helm
- Basic Usage
- Configuration
- Isolated Environments
- Schema
- Create a Schema
- Upload a Schema
- Migrations
- Bailo v0.4
- Bailo v2.0
- DataBase Scripts
Programmatic Authentication with Bailo
Public Key Infrastructure
PKI is used to create a secure environment for authentication. You can use the Python Client to sign requests to Bailo.
from bailo import PkiAgent
pki_agent = PkiAgent()
Client("http://127.0.0.1:8080", cert="path/to/cert.pem", key="path/to/key.pem",
auth="path/to/certificate/authority/file.pem") # <- INSERT BAILO URL (if not hosting locally)
# YOUR SCRIPT GOES HERE
Token Agents
If you are not using PKI then Bailo allows the usage of access tokens to allow for fine-grained access. Tokens are used
to grant access to models within Bailo to specific models and specific actions. These can be found in
Settings > Authentication
.
To create a new access token, press Add token
and select the options from below.
image:read
Allows you to download images from Bailofile:read
Allows you to download files from Bailo
Copy and paste the Access key
and Secret Key
and store these safely.
The Python Client allows support for using access tokens. Instead of using the default Agent
class you can use The
TokenAgent
class. The client works in the same way as before but will authenticate using access tokens.
from bailo import TokenAgent
ACCESS_KEY = xOHuJiwAZI
SECRET_KEY = OxJWI8FobvdhRFPQFRYXB
token_agent = TokenAgent(ACCESS_KEY, SECRET_KEY)
Client("http://127.0.0.1:8080", agent=token_agent) # <- INSERT BAILO URL (if not hosting locally)
# YOUR SCRIPT GOES HERE
Base Agent
The full Python docs for the Agent
class and subsequent child-classes is available
here. It is possible to pass kwargs
to the base Agent
class
such as verify
.
Copyright © Crown Copyright 2025.