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 TSV (or a Markdown table), 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

Output is tab-separated by default (cheapest to read; tabs, newlines and backslashes in values are escaped, NULL is \N). --format markdown / output_format="markdown" gives a pipe table instead.

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)  # TSV 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.2.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.2.0
File Size Uploaded
arrowbricks-6.2.0.tar.gz 258.8 kB Details

Built distributions (wheels)

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

Download URL arrowbricks-6.2.0.tar.gz
Size 258.8 kB
Tags Source
SHA-256 checksum
How to use checksums
c2ab80635aab5537cea85030587e638660547c21fa523ada803a1d7ed281533c
BLAKE2b-256 checksum
How to use checksums
bd2b18b6f0c5b127ea647ec6c5e5b45b4c7b49c5648ada314dd2f761f3d99a42
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.2.0-cp311-abi3-win_amd64.whl

Download URL arrowbricks-6.2.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
c09e228ea758cff1f9b42c36015dd53b8b7f3ebc37f23bb2db262081e7e10771
BLAKE2b-256 checksum
How to use checksums
19c01659ada5b1cf8838f8c3365358bdad8a5857fe3180e9da478abbe8e7bab9
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.2.0-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL arrowbricks-6.2.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
1f0ec831b1b2c8777f4d554332d944315c826bf5e86c1b33179d86a7d03f0e0f
BLAKE2b-256 checksum
How to use checksums
fa67023df70057d214a14655e17c08a3445c51f9339d92431dc88d5aa84e3e9d
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.2.0-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL arrowbricks-6.2.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
12a7f24be5f6bb1ad5009fb39ceec412b1eb34d0ff29e5496c4e8d43380bec9d
BLAKE2b-256 checksum
How to use checksums
337e69ff1207b21fdc131064f3ab77e2844cc04e188b7dd4978dec84a41f6b21
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.2.0-cp311-abi3-macosx_11_0_arm64.whl

Download URL arrowbricks-6.2.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
bdfc93b8bd725f03591df0b4bf92bd0c216ad862e0b8299d34d17e2f6382b3ea
BLAKE2b-256 checksum
How to use checksums
24d1e9f3647eed8f6d91a931e5b1915f440a3613e9a397425dd97a0be33bf3dc
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.2.0-cp311-abi3-macosx_10_12_x86_64.whl

Download URL arrowbricks-6.2.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
06013d7d91bb6024754a567583d0e0b447d7ecff99c7c9575853d58509a8d75e
BLAKE2b-256 checksum
How to use checksums
ca900e58f3c0588e05db8ae36837c40fd4e91989a75782ddb8d02b6a70fa61fb
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

This release

6.2.0 This release

6 release files

6.1.0

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