Repolode
databricks

databricks/databricks-sdk-py

Python SDK for the Databricks platform, giving programmatic access to the Databricks REST API from Python code.

Stars
577
Forks
228
Open issues
344
Last commit
3 days ago

What is it?

The Databricks SDK for Python is a client library for working with Databricks workspaces and accounts from Python. It covers the public Databricks REST API, exposing each service as a typed client (for example, clusters, jobs, and repos) through a WorkspaceClient or AccountClient object.

The SDK handles authentication across Databricks native tokens, OAuth, Azure, and Google Cloud credentials, and automatically resolves configuration such as the cloud provider and workspace ID. Its HTTP client retries requests that are safe to retry, such as on HTTP 429 and 503 responses, using backoff with jitter. Long-running operations provide wait helpers that block until a resource reaches the expected state, and paginated list calls are exposed as Python iterators.

The package is installed with pip and supports Python 3.8 through 3.11 according to the docs, and it is bundled with recent Databricks Runtime versions. It is in Beta, with interface changes possible in future releases.

Key features

  • 01Typed Python clients for Databricks REST API services such as clusters, jobs, and repos.
  • 02Multiple authentication methods, including personal access tokens, OAuth, Azure, and Google Cloud credentials.
  • 03Automatic retries with backoff for rate-limited and temporarily unavailable responses.
  • 04Wait helpers for long-running operations like cluster creation and job runs.
  • 05Pagination handled through Python iterators.
  • 06Configurable logging and debug output for HTTP requests and responses.

Use cases

  • Automating cluster, job, and workspace administration from Python scripts.
  • Building internal web apps that act on Databricks resources with per-user OAuth login.
  • Running scheduled data pipeline checks that query job run status and history.
  • Managing Databricks resources from CI/CD pipelines written in Python.

Quick start

  1. 1

    Install the SDK from PyPI

    pip install databricks-sdk
  2. 2

    Create a WorkspaceClient and list clusters

    from databricks.sdk import WorkspaceClient w = WorkspaceClient() for c in w.clusters.list(): print(c.cluster_name)

Things to know

  • Requires a Databricks workspace and valid credentials to make any API calls.
  • Still in Beta, so future releases may include interface changes.

In collections

Topics

FAQ

What is databricks-sdk-py?
Python SDK for the Databricks platform, giving programmatic access to the Databricks REST API from Python code. The Databricks SDK for Python is a client library for working with Databricks workspaces and accounts from Python. It covers the public Databricks REST API, exposing each service as a typed client (for example, clusters, jobs, and repos) through a WorkspaceClient or AccountClient object.
Is databricks-sdk-py free to use? What license does it have?
databricks-sdk-py is open source under the Apache-2.0 license. Check the license terms before using it in commercial products.
Is databricks-sdk-py still maintained?
Actively maintained. The last commit to databricks-sdk-py was on Nov 5, 2026.
What can I use databricks-sdk-py for?
Automating cluster, job, and workspace administration from Python scripts. Building internal web apps that act on Databricks resources with per-user OAuth login. Running scheduled data pipeline checks that query job run status and history. Managing Databricks resources from CI/CD pipelines written in Python.
How do I install databricks-sdk-py?
Install the SDK from PyPI: pip install databricks-sdk Create a WorkspaceClient and list clusters: from databricks.sdk import WorkspaceClient w = WorkspaceClient() for c in w.clusters.list(): print(c.cluster_name)
Where can I get databricks-sdk-py?
The source code and installation instructions are on GitHub: https://github.com/databricks/databricks-sdk-py

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects