Install & Compatibility
Where this runs
tested against v0.6.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 17.9MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 1.6s · import 0.000s · 18MB
16MB installed
● package 16MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
Connection
✓ from databricks_dbapi import Connection
✗ from databricks_dbapi import Connection
Connect to Databricks interactive cluster using HTTP (default) with personal access token.
from databricks_dbapi import Connection
conn = Connection(
server_hostname='your-databricks-instance.cloud.databricks.com',
http_path='/sql/1.0/warehouses/your-warehouse-id',
access_token=os.environ.get('DATABRICKS_TOKEN', '')
)
cursor = conn.cursor()
cursor.execute('SELECT current_timestamp')
print(cursor.fetchall())
Upgrade
Version history
0.6.0latest on PyPI · released Nov 22, 2021
Audit
Dependencies
thriftoptionalRequired for Thrift-based HiveServer2 connection
requestsoptionalRequired for HTTP-based connection
sqlalchemyoptionalRequired for SQLAlchemy dialect support