{"id":1161,"library":"databricks-cli","title":"Databricks CLI","description":"The `databricks-cli` Python package provided a command-line interface for Databricks. As of version 0.18.0, this package is deprecated. Users are advised to migrate to the new Databricks CLI (an independent executable) for command-line operations and to the `databricks-sdk-py` Python SDK for programmatic interactions. Databricks plans no further support or new feature work for this legacy package.","status":"deprecated","version":"0.18.0","language":"python","source_language":"en","source_url":"https://github.com/databricks/databricks-cli","tags":["databricks","cli","cloud","data-engineering","deprecated","etl"],"install":[{"cmd":"pip install databricks-cli","lang":"bash","label":"Install legacy databricks-cli"},{"cmd":"pip install databricks-sdk","lang":"bash","label":"Recommended: Install new Databricks SDK for Python"},{"cmd":"curl -fsSL https://raw.githubusercontent.com/databricks/setup-cli/main/install.sh | sh","lang":"bash","label":"Recommended: Install new Databricks CLI executable"}],"dependencies":[{"reason":"Required for running the Python package.","package":"python","optional":false}],"imports":[{"wrong":"from databricks.sdk import WorkspaceClient","symbol":"initialize_cli_for_databricks_notebooks","correct":"from databricks_cli import initialize_cli_for_databricks_notebooks"}],"quickstart":{"code":"# Authenticate via environment variables (recommended for quickstart)\n# export DATABRICKS_HOST=\"https://<your-workspace-url>\"\n# export DATABRICKS_TOKEN=\"dapiXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\"\n\n# --- Old databricks-cli usage (deprecated) ---\n# The primary use was via the command line, e.g.:\n# databricks clusters list\n\n# --- New Databricks SDK for Python (recommended for programmatic access) ---\nimport os\nfrom databricks.sdk import WorkspaceClient\n\n# The SDK automatically uses DATABRICKS_HOST and DATABRICKS_TOKEN environment variables\nw = WorkspaceClient(\n    host=os.environ.get('DATABRICKS_HOST', ''),\n    token=os.environ.get('DATABRICKS_TOKEN', '')\n)\n\n# Example: List clusters using the new SDK\nprint(\"Listing Databricks clusters (using new SDK):\")\nfor c in w.clusters.list():\n    print(f\"  - {c.cluster_name} ({c.cluster_id})\")\n\n# --- New Databricks CLI executable (recommended for command-line access) ---\n# After installing the new CLI executable (not this Python package):\n# databricks auth login --host https://<your-workspace-url>\n# databricks clusters list\n","lang":"python","description":"This quickstart first demonstrates how to use the recommended `databricks-sdk` for Python to programmatically list Databricks clusters, assuming authentication via environment variables (`DATABRICKS_HOST`, `DATABRICKS_TOKEN`). It also highlights typical command-line usage for both the legacy `databricks-cli` and the recommended new `databricks` CLI executable. Users should migrate programmatic logic to `databricks-sdk` and command-line scripts to the new `databricks` CLI."},"warnings":[{"fix":"For Python SDK usage: `pip install databricks-sdk` and update imports/code to use `databricks.sdk.WorkspaceClient` or `databricks.sdk.AccountClient`. For CLI usage: Install the new Databricks CLI executable via `curl -fsSL https://raw.githubusercontent.com/databricks/setup-cli/main/install.sh | sh` and adapt scripts to use the new `databricks` commands.","message":"This `databricks-cli` Python package is deprecated. It receives no new features or support. For programmatic use, migrate to `databricks-sdk-py`. For command-line use, migrate to the new standalone `databricks/cli` executable. Failure to migrate will result in outdated functionality and potential compatibility issues.","severity":"breaking","affected_versions":"0.18.0 and below"},{"fix":"Transition authentication methods to Databricks unified authentication, prioritizing OAuth M2M/U2M. Update `DATABRICKS_TOKEN` usage to alternative methods where possible. Refer to Databricks authentication documentation for the latest best practices.","message":"Personal Access Token (PAT) authentication for Databricks is deprecated, and basic authentication (username/password) reached End-of-Life on July 10, 2024. New projects should use OAuth machine-to-machine (M2M) or user-to-machine (U2M) authentication.","severity":"deprecated","affected_versions":"All versions"},{"fix":"Ensure `urllib3` is updated to a compatible version alongside `databricks-cli` (or its recommended replacements, the `databricks-sdk` or new CLI) to avoid unexpected errors. If encountering issues, check the `urllib3` version in your environment and upgrade it or pin a known working version.","message":"Version 0.18.0 of `databricks-cli` removed the explicit pin on `urllib3 < 2`. While this unblocks newer `urllib3` versions, older environments might encounter compatibility issues if they upgrade `databricks-cli` but retain an old `urllib3` that has breaking changes with other dependencies.","severity":"gotcha","affected_versions":"0.18.0"}],"env_vars":null,"search_vec":"'0.18.0':20 'advis':27 'cli':2,6,34,69 'cloud':70 'command':12,40 'command-lin':11,39 'data':72 'data-engin':71 'databrick':1,5,16,33,47,55,68 'databricks-c':4 'databricks-sdk-pi':46 'deprec':24,74 'engin':73 'etl':75 'execut':37 'featur':62 'independ':36 'interact':54 'interfac':14 'legaci':66 'line':13,41 'migrat':29 'new':32,61 'oper':42 'packag':8,22,67 'plan':56 'programmat':53 'provid':9 'py':49 'python':7,50 'sdk':48,51 'support':59 'user':25 'version':19 'work':63","created_at":"2026-04-05T14:30:44.702147+00:00","updated_at":"2026-04-17T15:09:47.511079+00:00","problems":null,"ecosystem":"pypi","meta_description":null,"install_score":95,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"0.18.0","cli_name":"databricks","cli_version":"Version 0.18.0","type":"library","homepage":"https://docs.databricks.com/en/dev-tools/cli/index.html","github":"https://github.com/databricks/databricks-cli","docs":null,"changelog":null,"pypi":"https://pypi.org/project/databricks-cli/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["devops","aws","gcp","azure"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-06-30","last_verified":"2026-08-27","next_check":"2026-07-30","install_tag":"verified"}}