Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

bella-baxter

Python SDK for the Bella Baxter secrets management platform. Includes built-in end-to-end encryption and webhook signature verification.

When to use bella-baxter directly

Most applications should use a framework integration instead:

Framework Package
Django bella-baxter-django
FastAPI bella-baxter-fastapi
Flask bella-baxter-flask
Scripts, tools, custom integrations bella-baxter (this package)

Installation

pip install --pre bella-baxter

Quickstart

from bella_baxter import BaxterClient, BaxterClientOptions

client = BaxterClient(BaxterClientOptions(
    baxter_url="https://api.bella-baxter.io",
    api_key="bax-...",
))

# Fetch all secrets (sync — works in Django, Flask, scripts)
secrets = client.get_all_secrets()
db_url = secrets.secrets["DATABASE_URL"]

# Async (FastAPI, asyncio)
secrets = await client.get_all_secrets_async()

Authentication

# Generate a key via the CLI
bella api-keys create --env production --name "MyApp Production"
# Returns: bax-<keyId>-<secret>
import os
from bella_baxter import BaxterClient, BaxterClientOptions

client = BaxterClient(BaxterClientOptions(
    baxter_url=os.environ["BELLA_BAXTER_URL"],
    api_key=os.environ["BELLA_BAXTER_API_KEY"],
))

API keys encode the project and environment slug — no config file needed. Generate via bella api-keys create or the Bella WebApp.

OAuth (local dev)

bella login           # opens browser, stores token in .bella file
bella sdk run -- python app.py   # injects BELLA_BAXTER_API_KEY + BELLA_BAXTER_URL automatically

Writing and deleting secrets

# Create or update one secret (an upsert). `provider` is the provider's slug or UUID and is required.
client.set_secret("RDS_PASSWORD", "s3cr3t", provider="vault-main", description="rotated by CI")

# Delete one. Returns True when it was deleted, False when it was already absent (404).
client.delete_secret("OLD_KEY", provider="vault-main")
  • project_slug and env_slug are optional keyword arguments; they default to the API key's own project and environment. Environments are addressed by slug, never by UUID.
  • Everything after key/value is keyword-only, so a provider can never be passed where a project was meant.
  • Writing needs a Manager API key or higher. A Consumer key is read-only and the API answers 403.
  • A scope-limited key gets 404 from the update when the key does not exist yet; set_secret then creates it (which also stamps the key's scopes on it), as bella secrets set does. Any other error raises.
  • Async variants: set_secret_async() and delete_secret_async().

End-to-end encryption

Secret values are encrypted client-side using ECIES (Elliptic Curve Integrated Encryption Scheme) before being sent to the Baxter API. Decryption happens transparently in the SDK.

E2EE is included — no extra install needed (cryptography>=41 is a core dependency).

Lightweight version polling

For long-running processes that need to detect secret rotations:

# Check if secrets have changed without fetching values
version = client.get_secrets_version()
if version.version != last_known_version:
    secrets = client.get_all_secrets()
    last_known_version = version.version

Webhook signature verification

from bella_baxter import verify_webhook_signature

is_valid = verify_webhook_signature(
    payload=request.body,
    signature_header=request.headers["X-Bella-Signature"],
    secret="whsec-...",
)

Full API access (Kiota client)

# Access the underlying Kiota client for full API coverage
kiota = client.client

# List projects
projects = await kiota.api.v1.projects.get()

# Manage environments, providers, users, API keys, etc.

Regenerating the generated client

bella-baxter embeds a Kiota-generated HTTP client. To regenerate after an API change:

cd apps/sdk
./generate.sh

Metadata

Release files for bella-baxter 0.1.1rc147

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bella-baxter 0.1.1rc147
File Size Uploaded Provenance Actions
bella_baxter-0.1.1rc147.tar.gz 221.3 kB With provenance Details for bella_baxter-0.1.1rc147.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for bella-baxter 0.1.1rc147
File Interpreter ABI Platform Actions
bella_baxter-0.1.1rc147-py3-none-any.whl Python 3 none any Details for bella_baxter-0.1.1rc147-py3-none-any.whl

Total release size: 1.1 MB

Release files / bella_baxter-0.1.1rc147.tar.gz

Download URL bella_baxter-0.1.1rc147.tar.gz
Size 221.3 kB
Tags Source
SHA-256 checksum
How to use checksums
4b2b3738041c9ec24ec479e94ae57126180c28e932e14e3b7b88665746c4886d
BLAKE2b-256 checksum
How to use checksums
eb9eec6a38e217c747ef785483937da0a8b912f50b69bffab011e7db5978ddac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 15, 2026.

Transparency log

Release files / bella_baxter-0.1.1rc147-py3-none-any.whl

Download URL bella_baxter-0.1.1rc147-py3-none-any.whl
Size 924.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8725c5b66ca116147ab268a12afbf9c141fa8e8aa362ba163b294ffb1ac70de0
BLAKE2b-256 checksum
How to use checksums
343c6b98c5e7bc56dcefa24fcb897386b6c6cf2c3a58d227cdb8ffc4fcc4b021
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 15, 2026.

Transparency log

Security for bella-baxter 0.1.1rc147

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for bella_baxter-0.1.1rc147.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 15, 2026.

Transparency log

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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release
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