Skip to main content

bd-utils

bd-utils provides a dbutils-like interface that works in both Databricks and local environments.

Goals

  • Use native Databricks dbutils when running on Databricks.
  • Use a predictable local implementation for tests and local scripts.
  • Keep unsupported APIs explicit with actionable errors.

API compatibility target

bdutils mirrors the Databricks module layout:

  • credentials, data, fs, jobs.taskValues, library, meta, notebook, preview, secrets, widgets, api

Locally, commonly used commands are implemented (widgets, secrets, fs, jobs.taskValues, notebook.exit); unsupported commands are present and raise NotImplementedError.

Quick start

import bdutils
value = bdutils.widgets.get("country")

Alternative (useful in tests when you need explicit config):

from bdutils import get_dbutils
dbutils = get_dbutils(force_adapter="local")
print(dbutils.fs.help("ls"))

Run tests

make test

This runs:

PYTHONPATH=src python -m pytest -q tests

Local widget lookup order

  1. Values set with widgets.text(...) in-process
  2. Environment variable DBX_WIDGET_<NAME_UPPER_SNAKE>

Local secret mapping

dbutils.secrets.get(scope, key) maps to environment variable:

DBX_SECRET__<SCOPE>__<KEY>

Notes

  • dbfs:/... paths are mapped to ~/.bd-utils/dbfs/... by default.
  • Unsupported methods raise NotImplementedError.

Metadata

Release files for bd-utils 0.1.1

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

Source distribution (sdist)

Source distribution for bd-utils 0.1.1
File Size Uploaded
bd_utils-0.1.1.tar.gz 10.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for bd-utils 0.1.1
File Interpreter ABI Platform
bd_utils-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 21.1 kB

Release files / bd_utils-0.1.1.tar.gz

Download URL bd_utils-0.1.1.tar.gz
Size 10.7 kB
Tags Source
SHA-256 checksum
How to use checksums
090bebb7d03345680efb0265339246e2e54f98439da07eaaf90fe831e9f8063f
BLAKE2b-256 checksum
How to use checksums
e0ba6f9758d062534e21ec73f443c90c8ade3d01fcb2dca2e438ae2c07a0b970
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 May 9, 2026.

Transparency log

Release files / bd_utils-0.1.1-py3-none-any.whl

Download URL bd_utils-0.1.1-py3-none-any.whl
Size 10.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d3048a8b146ccbdb3e94a133ab2e456e18598de27f355e1805f958daa2784f36
BLAKE2b-256 checksum
How to use checksums
9d344e5a377c3d433fdd3db13c752abe7874b5e63361292dafac9568868f7abb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 May 9, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

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