Skip to main content

baseten-bdn

Python SDK for working with BDN inside and outside Baseten.

⚠️ SDK may change in incompatible ways between releases until the SDK reaches 1.0.

This package is under initial development. It installs as baseten-bdn and imports as baseten.bdn. The baseten package is a namespace shared with other Baseten SDKs such as baseten and baseten-loops.

Installation

pip install baseten-bdn

Volumes

From any machine with a Baseten API key, baseten.bdn.volumes reads a volume version's manifest or pulls a version into a local directory. The client mints a short-lived token through the Baseten API, resolves the ref, and reads the volume's objects directly from storage with the credentials it is given, verifying every object against its recorded digest.

from baseten.bdn.volumes import VolumeClient

with VolumeClient(api_key="...") as volumes:
    result = volumes.pull("bdn:loops/sampler-abc123:step-100", "./checkpoint")

print(result.version_ref, result.file_count, result.bytes_written)

Refs are bdn:<namespace>/<volume> with an optional :<tag> or @<digest> selector and an optional /path inside the version; VolumeRef parses and renders them. A path on the ref, or include=[...], narrows a pull to those entries without moving them. A pull is staged next to dest_dir and renamed into place once complete, so a failed pull leaves nothing behind; pass overwrite=True to write into an existing directory in place. Pulling is supported on Linux and macOS.

Hot Load

Inside a model pod that is opted in to BDN Hot Load, baseten.bdn.hotload attaches BDN volumes below /bdn/mounts at runtime. An attach returns once the directory is readable.

from baseten.bdn.hotload import HotLoadClient

with HotLoadClient() as hotload:
    adapter = hotload.attach("bdn:adapters/sql-lora@b3:2547…", target="sql-lora")

load_adapter(adapter.path)  # /bdn/mounts/sql-lora

AsyncHotLoadClient offers the same methods as coroutines. Attachments belong to the pod and stay mounted after the client is closed; call detach to free a target name for reuse.

Development

Requires uv.

uv sync
uv run poe lint
uv run poe typecheck
uv run poe test

Run uv run poe format to apply formatting and lint fixes.

License

MIT. See LICENSE.

Metadata

Release files for baseten-bdn 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 baseten-bdn 0.1.2
File Size Uploaded Provenance Actions
baseten_bdn-0.1.2.tar.gz 82.6 kB With provenance Details for baseten_bdn-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for baseten-bdn 0.1.2
File Interpreter ABI Platform Actions
baseten_bdn-0.1.2-py3-none-any.whl Python 3 none any Details for baseten_bdn-0.1.2-py3-none-any.whl

Total release size: 119.9 kB

Release files / baseten_bdn-0.1.2.tar.gz

Download URL baseten_bdn-0.1.2.tar.gz
Size 82.6 kB
Tags Source
SHA-256 checksum
How to use checksums
46230fc7d14b3daf54305081bd01f57edbab9f236c07c6668b2176900be4ed04
BLAKE2b-256 checksum
How to use checksums
26430593426406a707765589ac524b7d40a0a93fb7645c09a18d98a00cbcb7e0
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 21, 2026.

Transparency log

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

Download URL baseten_bdn-0.1.2-py3-none-any.whl
Size 37.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
41b824d7eba8cd55d4bd38531d2a7d668f7e1322f72fb2cf5dab004cda7980cf
BLAKE2b-256 checksum
How to use checksums
7d6e966ff6922df25938597c8d99994189d98ea8a9ebb42541ca9e244a9110f3
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 21, 2026.

Transparency log

Security for baseten-bdn 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 baseten_bdn-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 Oct 21, 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