arrowbricks
Fast Databricks SQL for Python applications and AI agents.
- Zero required Python dependencies. One precompiled wheel. No Rust toolchain or cloud SDK needed.
- Fast Rust core. Concurrent chunk downloads, lazy Arrow decoding, and streaming NDJSON, with result order preserved.
- Agent mode, new in 6.0. A CLI and Python API that return compact typed Markdown, explicit truncation, and actionable JSON errors. Formatting stays in Rust.
Use Thrift by default or the Statement Execution API with protocol="sea".
Bring a token or your own token-refresh callable.
Install
pip install arrowbricks
Wheels cover Linux, macOS, and Windows; Python 3.11+.
Arrow, NDJSON, and agent mode work without extras. Python row tuples need
pip install 'arrowbricks[arro3]'.
Query from an agent or terminal
export DATABRICKS_HOST='your-workspace.azuredatabricks.net'
export DATABRICKS_WAREHOUSE_ID='your-warehouse-id'
export DATABRICKS_TOKEN='your-access-token'
arrowbricks -c 'SELECT 1 AS answer'
| answer (Int32) |
| --- |
| 1 |
rows_shown=1; complete=true; total_rows=1
Agent mode is the CLI default. SQL files and piped stdin work too:
arrowbricks --file query.sql --max-rows 20 --max-bytes 4000
printf 'SELECT 1 AS answer' | arrowbricks
Previews have row, byte, cell, and deadline limits. The footer tells you when results are incomplete. Query errors go to stderr as JSON, preserving the warehouse's diagnostic and suggestions with a recovery hint; the CLI exits 1. Preview limits bound output and fetching, not warehouse scan cost.
For Python agents:
from arrowbricks import DatabricksClient
async with DatabricksClient(host=..., warehouse_id=..., token=...) as client:
text = await client.query_agent("SELECT 1 AS answer", max_bytes=4000)
print(text) # Markdown on success; JSON on query failure
Give your agent the reusable Arrowbricks skill. See CLI options and skill installation and agent budgets, completeness, and cancellation.
Query from an application
The async cursor offers familiar execute and fetch* methods.
Arrow results work directly with DuckDB, PyArrow, and Polars:
from arrowbricks import connect
async with connect(host=..., warehouse_id=..., token=...) as conn:
cursor = conn.cursor()
await cursor.execute("SELECT * FROM my_catalog.my_schema.my_table LIMIT 100")
table = await cursor.fetchall_arrow()
Or consume ready-to-send NDJSON without building Python rows:
from arrowbricks import HEARTBEAT, DatabricksClient
async with DatabricksClient(host=..., warehouse_id=..., token=...) as client:
async for item in client.stream_query_json("SELECT * FROM range(100)"):
if item is not HEARTBEAT:
print(item)
Performance
The query and formatting work runs in Rust. Agent previews render directly from Arrow, avoiding intermediate Python rows or JSON. In a real warehouse test, a 100-row preview used 44% fewer bytes and 24% fewer tokens than NDJSON. See agent measurements and methodology and client benchmarks for workloads, comparisons, and limits.
Learn more
- Usage and API reference: authentication, errors, cancellation, observability, and Arrow interop.
- Runnable examples: cursors, agents, OAuth, and FastAPI streaming.
- Rust core: implementation and native APIs.
- Real warehouse verification.
- Changelog.
License
MIT
Metadata
Release files for arrowbricks 6.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| arrowbricks-6.0.1.tar.gz | 250.8 kB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| arrowbricks-6.0.1-cp311-abi3-win_amd64.whl | CPython 3.11 | abi3 | Windows x86-64 | Details |
| arrowbricks-6.0.1-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.11 | abi3 | Linux glibc 2.17+ x86-64 | Details |
| arrowbricks-6.0.1-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl | CPython 3.11 | abi3 | Linux glibc 2.17+ ARM64 | Details |
| arrowbricks-6.0.1-cp311-abi3-macosx_11_0_arm64.whl | CPython 3.11 | abi3 | macOS 11.0+ ARM64 | Details |
| arrowbricks-6.0.1-cp311-abi3-macosx_10_12_x86_64.whl | CPython 3.11 | abi3 | macOS 10.12+ x86-64 | Details |
Total release size: 12.9 MB
Release files / arrowbricks-6.0.1.tar.gz
| Download URL | arrowbricks-6.0.1.tar.gz |
|---|---|
| Size | 250.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a3a5b3ce8eb4b778851ff4ffaaf49892a2983af75c116ba64a336b79dbe1f624
|
|
BLAKE2b-256 checksum How to use checksums |
49923845746953daaef10006cf0610a9a304bcb1994e0ce4de5239e23946d8cf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 11, 2026.
Transparency logRelease files / arrowbricks-6.0.1-cp311-abi3-win_amd64.whl
| Download URL | arrowbricks-6.0.1-cp311-abi3-win_amd64.whl |
|---|---|
| Size | 2.6 MB |
| Tags | CPython 3.11 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
c31a39adeb03c97614e068eb6103d0d586196ba453e35703de854ec7d38dcfab
|
|
BLAKE2b-256 checksum How to use checksums |
23a3eb4851559c603aa310d31bcf6c135bd9b4fbabc470808f119ff930972436
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 11, 2026.
Transparency logRelease files / arrowbricks-6.0.1-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | arrowbricks-6.0.1-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 2.6 MB |
| Tags | CPython 3.11 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
164d258bc5239b30e0acc228b36c2607543c8aa315971c5d032990f1e08ab8a9
|
|
BLAKE2b-256 checksum How to use checksums |
bf201ada17910ee04c705c79b4600fa4eab4866345ddedc6e45f9cb667333db3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 11, 2026.
Transparency logRelease files / arrowbricks-6.0.1-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | arrowbricks-6.0.1-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 2.5 MB |
| Tags | CPython 3.11 Linux glibc 2.17+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
17919d4eb0ca17f14f19053b7580360c657a02c052d58ccf74f8ecb085cd6eea
|
|
BLAKE2b-256 checksum How to use checksums |
cab067392acf8fc752faa222c25a70147a6688042b064da646827fccd61f0d4c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 11, 2026.
Transparency logRelease files / arrowbricks-6.0.1-cp311-abi3-macosx_11_0_arm64.whl
| Download URL | arrowbricks-6.0.1-cp311-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 2.4 MB |
| Tags | CPython 3.11 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
e2c2688035d6572401d5a6344732fe0da2e8a5ad8788168eb31310300baf9971
|
|
BLAKE2b-256 checksum How to use checksums |
f8f7120fa57928ec8c865d0dc4fab2b02da1f52d5de36489116d7909422d67aa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 11, 2026.
Transparency logRelease files / arrowbricks-6.0.1-cp311-abi3-macosx_10_12_x86_64.whl
| Download URL | arrowbricks-6.0.1-cp311-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 2.5 MB |
| Tags | CPython 3.11 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
5603225a5a9dd20e070f926453d3cfca73cf8a44d4df8016c86aacd1eb74e7cc
|
|
BLAKE2b-256 checksum How to use checksums |
ec09278f43d0f73cccbfebc033bcf63b207796fb2b1276e4654d2c564b6b7070
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 11, 2026.
Transparency log