Skip to main content

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.2

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.2
File Size Uploaded Provenance Actions
bella_baxter-0.1.2.tar.gz 239.1 kB With provenance Details for bella_baxter-0.1.2.tar.gz

Built distribution (wheel)

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

Total release size: 1.3 MB

Release files / bella_baxter-0.1.2.tar.gz

Download URL bella_baxter-0.1.2.tar.gz
Size 239.1 kB
Tags Source
SHA-256 checksum
How to use checksums
94b7d2ddb637d8575d98fd8fdef5639206fdc99c71bf832725ab5239e02d6f27
BLAKE2b-256 checksum
How to use checksums
d4ad4521da9c9818d505273110f5365007773b036c4185c22fbfd77eab5cd777
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 18, 2026.

Transparency log

Release files / bella_baxter-0.1.2-py3-none-any.whl

Download URL bella_baxter-0.1.2-py3-none-any.whl
Size 1.0 MB
Tags Python 3
SHA-256 checksum
How to use checksums
9f236f35defe1a1ee9764eb7227cc69d9903f0ed5fabf0d8839db49df4f76899
BLAKE2b-256 checksum
How to use checksums
3d3faf6fb6e7941a323b657e107fa4332015e9c74e142149e5a92e5265bb0386
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 18, 2026.

Transparency log

Security for bella-baxter 0.1.2

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.2.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 18, 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

0.1.2 This release

2 release files Full provenance

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