databricks-dbapi
A DBAPI 2.0 interface and SQLAlchemy dialect for Databricks interactive clusters.
Decision gist · record as of 2026-08-14
No, not recommended for new projects. The package is abandoned (last release November 2021, last commit January 2022) and receives no maintenance. Databricks likely provides official or better-maintained connectors; you should check the current Databricks documentation for supported Python drivers before choosing this package. If you have legacy code already using it, it may still work, but migration to an actively maintained alternative is advisable.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- For odbc mode, the Simba ODBC driver must be installed separately on your system; for hive mode, pyhive and thrift are required as optional dependencies.
- Installation is low-friction as a pure-Python wheel, but the package is abandoned as of January 2022 with no recent maintenance.
- You must explicitly install at least one extra (hive or odbc), and the odbc path requires the separate Simba ODBC driver to be installed on your system.
License · maintenance · safety
MIT (permissive) — Licensed under MIT (permissive), so you can use, modify, and distribute it freely with minimal restrictions.
last release 2021-11-22 (1726 days) · last repo commit 2022-01-06 · 22 stars · archived
0 known vulnerabilities (OSV.dev, 2026-08-14) · 147,461 downloads/mo, #11,065 on PyPI
Alternatives
Verify before relying
pip install databricks-dbapi[hive]
from databricks_dbapi import hive
import os
connection = hive.connect(
host=os.environ["DATABRICKS_HOST"],
http_path=os.environ["DATABRICKS_HTTP_PATH"],
token=os.environ["DATABRICKS_TOKEN"]
)
cursor = connection.cursor()
cursor.execute("SELECT * FROM some_table LIMIT 100")
print(cursor.fetchone())- Whether pyhive and pyodbc are declared as optional dependencies in the package metadata (not shown in fact sheet).
- Current compatibility with modern Databricks APIs and authentication methods beyond token-based auth.
- Whether the abandoned status affects functionality with current Databricks cluster versions.
What it is and what it does
databricks-dbapi is a thin wrapper around pyhive and pyodbc that implements the Python DBAPI 2.0 standard for connecting to Databricks clusters. It lets you execute SQL queries against Databricks Workspace and SQL Analytics clusters using either a Thrift-based connection (via pyhive) or an ODBC connection (via pyodbc with the Simba driver). The package also registers SQLAlchemy dialects so you can use Databricks as a backend with SQLAlchemy's ORM and query builder.
The main use case is integrating Databricks query execution into Python applications that expect a standard DBAPI interface or SQLAlchemy support. It handles authentication via Databricks tokens and cluster endpoints, and supports both synchronous queries and asynchronous polling for long-running operations. However, the package has been abandoned since January 2022 and receives no maintenance, so compatibility with recent Databricks API changes or authentication schemes is uncertain.
Use it for
- Execute SQL queries against Databricks clusters from Python scripts using standard DBAPI cursor methods.
- Integrate Databricks as a SQLAlchemy backend for ORM-based data access in Python applications.
- Run asynchronous queries on Databricks clusters and poll for results without blocking.
- Connect to SQL Analytics clusters via ODBC when pyhive is not suitable or available.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
No, not recommended for new projects.
The package is abandoned (last release November 2021, last commit January 2022) and receives no maintenance. Databricks likely provides official or better-maintained connectors; you should check the current Databricks documentation for supported Python drivers before choosing this package. If you have legacy code already using it, it may still work, but migration to an actively maintained alternative is advisable.
Install
databricks-dbapi on PyPI
Before you install
Installation is low-friction as a pure-Python wheel, but the package is abandoned as of January 2022 with no recent maintenance. You must explicitly install at least one extra (hive or odbc), and the odbc path requires the separate Simba ODBC driver to be installed on your system.
For odbc mode, the Simba ODBC driver must be installed separately on your system; for hive mode, pyhive and thrift are required as optional dependencies.
License in practice
Licensed under MIT (permissive), so you can use, modify, and distribute it freely with minimal restrictions.
Quickstart
pip install databricks-dbapi[hive]
from databricks_dbapi import hive
import os
connection = hive.connect(
host=os.environ["DATABRICKS_HOST"],
http_path=os.environ["DATABRICKS_HTTP_PATH"],
token=os.environ["DATABRICKS_TOKEN"]
)
cursor = connection.cursor()
cursor.execute("SELECT * FROM some_table LIMIT 100")
print(cursor.fetchone())
Verify before relying
- Whether pyhive and pyodbc are declared as optional dependencies in the package metadata (not shown in fact sheet).
- Current compatibility with modern Databricks APIs and authentication methods beyond token-based auth.
- Whether the abandoned status affects functionality with current Databricks cluster versions.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.* |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Abandoned 1,726 days since the last release |
| Last repo commit | repository archived |
| First released | |
| Downloads | 147,461 / month, #11,065 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | License :: OSI Approved :: MIT LicenseNatural Language :: EnglishProgramming Language :: Python :: 2Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonTopic :: DatabaseTopic :: Database :: Front-Ends |
Evidence: databricks_dbapi-0.6.0-py2.py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “databricks sql connection”
- databricks-dbapiProvides a DBAPI 2.0 connection interface and SQLAlchemy dialects to…
- databricks-sqlalchemyProvides a SQLAlchemy 2.0 dialect that bridges SQLAlchemy…
- databricks-sql-connectorA Python client library that connects to Databricks clusters and SQL…
Give your agent the search over MCP, or paste the wish link into any chat.
More Database packages
psycopg2-binary is a PostgreSQL database adapter for Python that implements the DB API 2.0 specification, enabling Python applications to connect to and query PostgreSQL databases with thread-safe concurrent operations.
Python client library for connecting to and executing commands against Redis key-value stores, supporting both synchronous and asynchronous operations.
Install it if your application needs to interact with Redis; the only prerequisite is a running Redis server instance.
YDB Python SDK is the official client library for connecting to and querying YDB databases from Python applications.
Install it if you need to connect Python applications to YDB databases.
Connects Python applications to Snowflake data warehouses using the DB API 2.0 specification, enabling SQL queries, data transfers, and warehouse operations.
sqlparse tokenizes SQL text into a tree of statements, clauses, and expressions, and provides functions to split scripts, format queries, and inspect parsed tokens without validating dialect or syntax.
Install it if you need to manipulate, format, or analyze SQL text programmatically.
Provides base adapter protocols and shared functionality that database adapters use to integrate with dbt-core, handling connections, dialect translation, relation caching, and core interface management.
See also elasticsearch-dbapi · PyHive · sqlalchemy-databricks · databricks-sql-connector · ydb-dbapi · databricks-sqlalchemy · dbapi · pydynamodb · trino · sqlalchemy-jdbcapi