Skip to main content

arrowbricks logo

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]'; sqlglot expressions as SQL need [sqlglot]. On Python 3.14+ pass values as a t-string (t"... WHERE id = {x}") and they are bound as parameters -- see SQL safety.

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

License

MIT

Metadata

Release files for arrowbricks 6.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for arrowbricks 6.1.0
File Size Uploaded
arrowbricks-6.1.0.tar.gz 255.3 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for arrowbricks 6.1.0
File
arrowbricks-6.1.0-cp311-abi3-win_amd64.whl CPython 3.11 abi3 Windows x86-64 Details
arrowbricks-6.1.0-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.11 abi3 Linux glibc 2.17+ x86-64 Details
arrowbricks-6.1.0-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.11 abi3 Linux glibc 2.17+ ARM64 Details
arrowbricks-6.1.0-cp311-abi3-macosx_11_0_arm64.whl CPython 3.11 abi3 macOS 11.0+ ARM64 Details
arrowbricks-6.1.0-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.1.0.tar.gz

Download URL arrowbricks-6.1.0.tar.gz
Size 255.3 kB
Tags Source
SHA-256 checksum
How to use checksums
cd9546db0333361d915e24404d9c04c9ca78ae97db3308d5e904922328b387f0
BLAKE2b-256 checksum
How to use checksums
444b266578aafd43bae15376745d62593660d28a799aa78432c4628ad6ce1929
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 12, 2026.

Transparency log

Release files / arrowbricks-6.1.0-cp311-abi3-win_amd64.whl

Download URL arrowbricks-6.1.0-cp311-abi3-win_amd64.whl
Size 2.6 MB
Tags CPython 3.11 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
b985f3db8fc7b1fa3fb6c6479908e5950655d19f52627eb3de067b79f28ca4eb
BLAKE2b-256 checksum
How to use checksums
e7bb8f34a4b30a8fb119d397de11a8b3db705f22ce958b9a521549a48f5fb17c
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 12, 2026.

Transparency log

Release files / arrowbricks-6.1.0-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL arrowbricks-6.1.0-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
27d05674b0a438674907c91498fd3e848a8bd990adfbcc4f2ebf43bc6ff44af5
BLAKE2b-256 checksum
How to use checksums
1eabb7ceebb9f8cc05bbb7dd8f1b3741f45892a714ef2f54019018c68fe7af7f
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 12, 2026.

Transparency log

Release files / arrowbricks-6.1.0-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL arrowbricks-6.1.0-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
71fb33b37eec440a44b140dac9e42bb016d9d565c8a0ef38c076d99989f36f19
BLAKE2b-256 checksum
How to use checksums
757572c22b65fd933f3ac6c0243abb5937ad28da5dd23450bf10470cf3eb0de3
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 12, 2026.

Transparency log

Release files / arrowbricks-6.1.0-cp311-abi3-macosx_11_0_arm64.whl

Download URL arrowbricks-6.1.0-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
5fcbe5767f2681ec9b104c5c8f50d0b41828a5bb8dd7cd48a90fdd764eb19979
BLAKE2b-256 checksum
How to use checksums
9ea2ed4e6b58e845975692202cb3f3eef2ecfcfde170796dbb868c33a8857197
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 12, 2026.

Transparency log

Release files / arrowbricks-6.1.0-cp311-abi3-macosx_10_12_x86_64.whl

Download URL arrowbricks-6.1.0-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
8f295f1de33a690dbdff09f17c7dc2497eef36c920d8fdb6cb50410c1c4785c6
BLAKE2b-256 checksum
How to use checksums
c3c8366cafac7f92d37a792c22f5c6702728222e481b5b4bf243413c12761406
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 12, 2026.

Transparency log

Release history Release notifications | RSS feed

6.2.0

6 release files

This release

6.1.0 This release

6 release files

6.0.1

6 release files

6.0.0

6 release files

5.2.2

6 release files

5.2.1

6 release files

5.1.2

6 release files

5.1.1

6 release files

5.1.0

6 release files

5.0.3

6 release files

5.0.2

6 release files

5.0.1

6 release files

5.0.0

6 release files

4.0.0

6 release files

3.2.0

6 release files

3.1.4

6 release files

3.1.3

6 release files

3.1.2

6 release files

3.1.1

6 release files

3.1.0

6 release files

3.0.4

6 release files

3.0.3

6 release files

3.0.2

6 release files

3.0.1

6 release files

3.0.0

6 release files

2.0.0

6 release files

1.5.0

6 release files

1.4.1

6 release files

1.4.0

6 release files

1.3.3

6 release files

1.3.2

6 release files

1.3.1

6 release files

1.3.0

6 release files

1.2.0

6 release files

1.1.1

6 release files

1.1.0

6 release files

1.0.1

6 release files

1.0.0

6 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page