Registry / devops / databricks

databricks

JSON →
library0.2pypypiunverified

This is an outdated Python library for interacting with Databricks, primarily as a command-line interface. Its last release was in 2017 (version 0.2), and it has been superseded by the `databricks-cli` and more recently the `databricks-sdk` for programmatic API access. Users seeking modern Databricks integration should use the `databricks-sdk` or `databricks-sql-connector` libraries.

pip install databricks==0.2
INSTALL
IMPORT
SIG · DATABRICKS
D
databricks
devopspythonv0.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

The `databricks` library (v0.2) is primarily a command-line utility, and its direct programmatic Python API is not well-documented or intended for modern use. The quickstart above provides examples for the recommended modern alternatives: `databricks-sdk` and `databricks-sql-connector`.

# This package (databricks==0.2) is a very old command-line utility. # Direct programmatic Python usage is not well documented or supported. # # For modern Databricks API interactions, use databricks-sdk: # from databricks.sdk import WorkspaceClient # w = WorkspaceClient() # for c in w.clusters.list(): # print(c.cluster_name) # # For Databricks SQL connectivity, use databricks-sql-connector: # from databricks.sql import connect # with connect(server_hostname=os.environ.get('DATABRICKS_SERVER_HOSTNAME'), # http_path=os.environ.get('DATABRICKS_HTTP_PATH'), # access_token=os.environ.get('DATABRICKS_TOKEN')) as connection: # with connection.cursor() as cursor: # cursor.execute('SELECT 1') # print(cursor.fetchall())
databricks --version
Debug
Known issues
breakingThis `databricks` package (version 0.2, last updated 2017) is obsolete and considered abandoned. It is not compatible with modern Databricks APIs or best practices. Attempting to use it will likely result in functional failures, authentication issues, or compatibility problems.
fix
Migrate to the official Databricks SDK for Python (`databricks-sdk`) for API interactions or `databricks-cli` for command-line usage. For SQL connectivity, use `databricks-sql-connector`.
affects: <=0.2
deprecatedThe `databricks` package has been deprecated and superseded by `databricks-sdk` (for API operations) and `databricks-cli` (for command-line interfaces). The Python 3.7 support for `databricks-sdk` was dropped in June 2023, requiring Python 3.8+ for modern SDKs.
fix
Use `pip install databricks-sdk` for modern API client functionality. The `databricks-sdk` is officially supported for production use cases, despite being in 'Beta'.
affects: <=0.2
gotchaThe authentication mechanisms used by this old library (v0.2) are likely incompatible with current Databricks authentication methods (e.g., Databricks personal access tokens, OAuth). Modern SDKs implement a robust default authentication flow.
fix
When migrating to `databricks-sdk`, refer to its official authentication documentation for setting up access tokens, environment variables (e.g., `DATABRICKS_HOST`, `DATABRICKS_TOKEN`), or other methods.
affects: <=0.2
gotchaDatabricks Runtime environments (especially 13.3 LTS and above) come with the `databricks-sdk` pre-installed. Using `%pip install --upgrade databricks-sdk` is recommended in Databricks notebooks to ensure the latest version.
fix
Within a Databricks notebook, use `%pip install --upgrade databricks-sdk` followed by `dbutils.library.restartPython()` to ensure the latest SDK is available and the environment is refreshed.
affects: All versions, when used within Databricks notebooks/clusters.
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'databricks.sdk'
Users often confuse the outdated `databricks` (version 0.2) package with the modern `databricks-sdk` package. The `databricks.sdk` module is part of the `databricks-sdk` library, not the deprecated `databricks` (0.2) library.
fix
Uninstall the old `databricks` package if present, and install the correct modern SDK package: `pip uninstall databricks` (if installed) then `pip install databricks-sdk`.
ImportError: cannot import name 'sql' from 'databricks'
The outdated `databricks` (version 0.2) package does not export a `sql` module. Users typically encounter this when attempting to use SQL connector functionality that belongs to the `databricks-sql-connector` library.
fix
Install the dedicated SQL connector library and import from it: `pip install databricks-sql-connector` then `from databricks.sql import connect`.
AttributeError: module 'databricks' has no attribute 'WorkspaceClient'
Users have installed the outdated `databricks` (version 0.2) package but are attempting to use classes or methods from the modern `databricks-sdk` (e.g., `WorkspaceClient`), which are not present in the old library.
fix
Uninstall the old `databricks` package and install the modern `databricks-sdk`: `pip uninstall databricks` then `pip install databricks-sdk`. You should then import from `databricks.sdk`.
ModuleNotFoundError: No module named 'databricks'
This error occurs when Python cannot find a module named 'databricks'. This could happen if no Databricks-related Python package is installed, or if the user installed `databricks-cli` or `databricks-sdk` but is incorrectly trying to `import databricks` expecting it to be the entry point to the SDK.
fix
If you intend to use the modern SDK, install it with `pip install databricks-sdk` and import using `from databricks.sdk import WorkspaceClient`. If you need the CLI, install `pip install databricks-cli`.
Upgrade
Version history
0.2latest on PyPI · released Nov 15, 2018
Audit
Dependencies

No dependency data recorded yet.

Agent activity
11 hits · last 30 days
node
8
Resources
databricks — pip install databricks · libregistry