Reusable CLI for uploading, submitting, validating, fetching logs, and cleaning Databricks job runs
Project description
databricks-job-runner
Reusable CLI for uploading, submitting, and cleaning Databricks job runs.
databricks-job-runner wraps the
Databricks Python SDK
into a small library that each project configures with a Runner instance.
One Runner gives you nine CLI subcommands (upload, download, submit,
validate, logs, clean, catalog, schema, volume) without writing any
Databricks API code in your project.
Install
uv add databricks-job-runner
Or with pip:
pip install databricks-job-runner
Quick start
databricks-job-runner is a library, not a standalone CLI. There is no
__main__ in this repo. Each project wires one Runner.
Create a cli/ package with two files:
cli/__init__.py
from databricks_job_runner import Runner
runner = Runner(
run_name_prefix="my_project",
wheel_package="my_package", # optional
)
cli/__main__.py
from cli import runner
runner.main()
Add a .env to your project root with at least:
DATABRICKS_PROFILE=my-profile
DATABRICKS_CLUSTER_ID=0123-456789-abcdef
DATABRICKS_WORKSPACE_DIR=/Users/you@example.com/my_project
Then run the core lifecycle from your project root:
uv run python -m cli upload --all # upload agent_modules/
uv run python -m cli submit test_hello.py # submit a job and wait
uv run python -m cli logs # stdout/stderr from the last run
uv run python -m cli clean --yes # tear down
.env + cli/ -> upload -> submit -> (Databricks run) -> logs -> clean
| | |
workspace/ one-shot tail 5MB
agent_modules SubmitRun stdout/err
Documentation
| Page | What it covers |
|---|---|
| Getting started | Install, project-layout contract, first job end to end, architecture overview. |
| Configuration | Every .env key, precedence, compute modes, parameter injection, inject_params. |
| Workflows | Common workflows with diagrams: classic vs serverless, wheels, data, Unity Catalog. |
| Command reference | Every subcommand, flag, and positional argument. |
| Bootstrap-from-Volume | Run-startup wheel install, BootstrapConfig, per-run isolation. |
| Preflight hooks | Fail-fast compute checks before submit/validate, cluster-library helpers. |
| API reference | Runner, RunnerConfig, Compute, inject_params, RunnerError. |
| Examples and smoke tests | The two runnable example projects and the serverless test matrix. |
| Releasing | PyPI tag-based release flow. |
Requirements
- Python 3.12+
- Databricks authentication: a
Databricks CLI profile,
env vars (
DATABRICKS_HOST/DATABRICKS_TOKEN), or any other unified-auth method - Either a Databricks all-purpose cluster (auto-started if terminated) or serverless compute enabled for the workspace
- uv (for wheel building only)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file databricks_job_runner-0.6.tar.gz.
File metadata
- Download URL: databricks_job_runner-0.6.tar.gz
- Upload date:
- Size: 35.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f9e8335bc7a922b98392aeb314f771a057e40eda7f463d9885ee3333f758b26f
|
|
| MD5 |
de691c675d2696a9a6e76ffe38b040c3
|
|
| BLAKE2b-256 |
034d0e3d1896bd813ea5bec0cdde1c74180482a5ddaf8af12a53a6fba6d7e308
|
Provenance
The following attestation bundles were made for databricks_job_runner-0.6.tar.gz:
Publisher:
publish.yml on neo4j-partners/databricks-job-runner
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
databricks_job_runner-0.6.tar.gz -
Subject digest:
f9e8335bc7a922b98392aeb314f771a057e40eda7f463d9885ee3333f758b26f - Sigstore transparency entry: 1552538711
- Sigstore integration time:
-
Permalink:
neo4j-partners/databricks-job-runner@7be6e51808b7510296323ee26c07cae64fa55f00 -
Branch / Tag:
refs/tags/v0.6 - Owner: https://github.com/neo4j-partners
-
Access:
internal
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@7be6e51808b7510296323ee26c07cae64fa55f00 -
Trigger Event:
push
-
Statement type:
File details
Details for the file databricks_job_runner-0.6-py3-none-any.whl.
File metadata
- Download URL: databricks_job_runner-0.6-py3-none-any.whl
- Upload date:
- Size: 45.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
51849efa336268a60eec07f44bda866a30f1ffde50601d35658f744c1954253a
|
|
| MD5 |
7e3b6fc2f4e7d08bab89a51f1af6ee5c
|
|
| BLAKE2b-256 |
8964a951248cd20aa8b3fd857bbd2c6d8838db94f370e58400ee52c50f7a789d
|
Provenance
The following attestation bundles were made for databricks_job_runner-0.6-py3-none-any.whl:
Publisher:
publish.yml on neo4j-partners/databricks-job-runner
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
databricks_job_runner-0.6-py3-none-any.whl -
Subject digest:
51849efa336268a60eec07f44bda866a30f1ffde50601d35658f744c1954253a - Sigstore transparency entry: 1552538754
- Sigstore integration time:
-
Permalink:
neo4j-partners/databricks-job-runner@7be6e51808b7510296323ee26c07cae64fa55f00 -
Branch / Tag:
refs/tags/v0.6 - Owner: https://github.com/neo4j-partners
-
Access:
internal
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@7be6e51808b7510296323ee26c07cae64fa55f00 -
Trigger Event:
push
-
Statement type: