Skip to main content

Reusable CLI for uploading, submitting, validating, fetching logs, and cleaning Databricks job runs

Project description

databricks-job-runner

PyPI version

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

databricks_job_runner-0.6.1.tar.gz (35.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

databricks_job_runner-0.6.1-py3-none-any.whl (45.6 kB view details)

Uploaded Python 3

File details

Details for the file databricks_job_runner-0.6.1.tar.gz.

File metadata

  • Download URL: databricks_job_runner-0.6.1.tar.gz
  • Upload date:
  • Size: 35.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for databricks_job_runner-0.6.1.tar.gz
Algorithm Hash digest
SHA256 eab15d31c2e9562851c2fd638ccc1c1c115a06da62db6ebbbb35fc646d1ea36e
MD5 02dcb516e39fb7c2f66fa92499648344
BLAKE2b-256 52bb1d385e9cf80df1d66f25f2a7434fffbd221fe279d7d71988b5143d41ef4b

See more details on using hashes here.

Provenance

The following attestation bundles were made for databricks_job_runner-0.6.1.tar.gz:

Publisher: publish.yml on neo4j-partners/databricks-job-runner

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file databricks_job_runner-0.6.1-py3-none-any.whl.

File metadata

File hashes

Hashes for databricks_job_runner-0.6.1-py3-none-any.whl
Algorithm Hash digest
SHA256 112b2e18ea9cf95cad751dc3e52be1bbad25ab2adfa35425164cac7efb07a849
MD5 db4c6fb6756cbcfa98d262402c66677f
BLAKE2b-256 cee909e15f94fef3f6a1b1f4acffc42b6c75baef87b50a51f33e953281b3e516

See more details on using hashes here.

Provenance

The following attestation bundles were made for databricks_job_runner-0.6.1-py3-none-any.whl:

Publisher: publish.yml on neo4j-partners/databricks-job-runner

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page