Registry / devops / dbx
library0.8.19pypypiunverified

dbx is a Python CLI extension for Databricks that simplifies project development, deployment, and management workflows, especially for MLOps. It provides tools for structuring Databricks projects, building artifacts, and deploying them to various Databricks environments. The current version is 0.8.19, and it maintains an active release cadence with frequent updates.

pip install dbx
INSTALL
IMPORT
SIG · DBX
D
dbx
devopspythonv0.8.19
Install
16.5s avg
Import
Disk
145MB
Pass rate
6/ 10
Env Coverage6 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.8.19 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
✓ —
✓ 16.3s
py 3.11
✓ —
✓ 15.03s
py 3.12
✕ build_error
✕ build_error
py 3.13
✕ build_error
✕ build_error
py 3.9
✓ —
✓ 18.3s
145MB installed
● package 145MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

dbx_api
from dbx.api import dbx_api
Provides programmatic access to dbx project operations like building, deploying, and managing profiles. Assumes prior CLI configuration.

Demonstrates programmatic access to `dbx` for retrieving project configuration and listing profiles. This requires an existing `dbx` project setup with `dbx.json` and `deployment.yml` files, and configured Databricks credentials (e.g., via `dbx configure` or environment variables).

import os from dbx.api import dbx_api # This example assumes you have a 'dbx.json' and 'deployment.yml' # in your current working directory, defining a dbx project. # It also assumes you have configured dbx credentials (e.g., via `dbx configure`) # or set environment variables like DBX_HOST and DBX_TOKEN. print("Attempting to get project configuration...") try: # Load the project configuration from dbx.json in the current directory project_config = dbx_api.get_project_config() print(f"Project Name: {project_config.project_name}") print(f"Project Type: {project_config.project_type}") # A simpler example: listing current connection profiles print("\nListing configured dbx connection profiles:") profiles = dbx_api.get_available_profiles() if profiles: for profile in profiles: print(f"- {profile}") else: print("No profiles found. Run `dbx configure` to set one up.") except Exception as e: print(f"Error interacting with dbx API. Ensure dbx is configured and project files exist. Error: {e}") print("Hint: Run `dbx configure` in your terminal to set up credentials.")
dbx --version
Debug
Known issues
breakingProject configuration format changed from `dbx_project.py` (Python object) to `dbx.json` (JSON file) starting with dbx v0.8.0. Old projects will not be recognized without migration.
fix
Migrate your project configuration from `dbx_project.py` to the new `dbx.json` format. Refer to the official dbx migration guide for detailed steps.
affects: >=0.8.0
gotchadbx relies on correctly configured Databricks credentials and host information. This can be managed via `dbx configure` (which stores profiles locally) or by setting `DBX_HOST` and `DBX_TOKEN` environment variables.
fix
Ensure you have run `dbx configure` to set up a profile, or explicitly set `DBX_HOST` and `DBX_TOKEN` environment variables for your session. Use `dbx configure --profile <profile_name>` to manage multiple profiles.
affects: All versions
gotchaWhen deploying, it's common to misconfigure the `workspace_path` or `target` in `deployment.yml`, leading to resources being deployed to unintended locations or errors.
fix
Always double-check your `deployment.yml` to ensure the `workspace_path` and `target` definitions (e.g., `dev`, `staging`, `prod`) correctly point to your desired Databricks workspace locations and clusters.
affects: All versions
Upgrade
Version history
0.8.19latest on PyPI · released Jul 2, 2024
Audit
Dependencies
databricks-clirequiredCore dependency for interacting with Databricks workspace APIs. Its configuration (`databricks configure`) is often managed alongside `dbx`.
Agent activity
31 hits · last 30 days
node
26
OpenAI (training)
1
Resources
dbx — pip install dbx · libregistry