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.1rc142

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.1rc142
File Size Uploaded Provenance Actions
bella_baxter-0.1.1rc142.tar.gz 213.5 kB With provenance Details for bella_baxter-0.1.1rc142.tar.gz

Built distribution (wheel)

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

Total release size: 1.1 MB

Release files / bella_baxter-0.1.1rc142.tar.gz

Download URL bella_baxter-0.1.1rc142.tar.gz
Size 213.5 kB
Tags Source
SHA-256 checksum
How to use checksums
36621db3ab7242d2848bd8508797f18a8d960d02eacc8e47ff6b4ad78f41d4ea
BLAKE2b-256 checksum
How to use checksums
0c154cad8c14a62a0aa54b1d931101e26fc45e45bf38b5bb71a79bd356ad8e2d
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 Oct 28, 2026.

Transparency log

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

Download URL bella_baxter-0.1.1rc142-py3-none-any.whl
Size 884.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
33e8c31ec0aafe904866c10130adffeac84b2ddca5a348212e88c1657065afc8
BLAKE2b-256 checksum
How to use checksums
32df7dd7c0048967d0c243de6c84c7c51c3824dbf8eb74b6827166b3b739ee68
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 Oct 28, 2026.

Transparency log

Security for bella-baxter 0.1.1rc142

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.1rc142.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 Oct 28, 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