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 without materializing the full result, 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.

Performance tips

Numbers are measurements from one ~30 MB/s link to one warehouse, not guarantees.

  • Select only the columns you need. Selecting 3 columns instead of SELECT * was 1.5-6x faster and moved 1.9-15.8x fewer bytes across 5 tables.
  • Keep compress_results at its default (True) unless the link is very fast. Here it was 1.8-4.7x faster with 2-5.5x fewer bytes. Turning it off on a very fast link was not tested.
  • Keep the Thrift default for small lookups. It was about 0.15 s faster per tiny statement than protocol="sea" (a constant gap in these runs).

Learn more

License

MIT

Metadata

Release files for arrowbricks 6.3.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.3.0
File Size Uploaded Provenance Actions
arrowbricks-6.3.0.tar.gz 264.2 kB With provenance Details for arrowbricks-6.3.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for arrowbricks 6.3.0
File Actions
arrowbricks-6.3.0-cp311-abi3-win_amd64.whl CPython 3.11 abi3 Windows x86-64 Details for arrowbricks-6.3.0-cp311-abi3-win_amd64.whl
arrowbricks-6.3.0-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.11 abi3 Linux glibc 2.17+ x86-64 Details for arrowbricks-6.3.0-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
arrowbricks-6.3.0-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.11 abi3 Linux glibc 2.17+ ARM64 Details for arrowbricks-6.3.0-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
arrowbricks-6.3.0-cp311-abi3-macosx_11_0_arm64.whl CPython 3.11 abi3 macOS 11.0+ ARM64 Details for arrowbricks-6.3.0-cp311-abi3-macosx_11_0_arm64.whl
arrowbricks-6.3.0-cp311-abi3-macosx_10_12_x86_64.whl CPython 3.11 abi3 macOS 10.12+ x86-64 Details for arrowbricks-6.3.0-cp311-abi3-macosx_10_12_x86_64.whl

Total release size: 12.9 MB

Release files / arrowbricks-6.3.0.tar.gz

Download URL arrowbricks-6.3.0.tar.gz
Size 264.2 kB
Tags Source
SHA-256 checksum
How to use checksums
320638fa0d4e205256addcbeda755848f9047ba8e8b88f05f8aed3932f490b31
BLAKE2b-256 checksum
How to use checksums
26a34b2876c631bda0150ac93f40382e9bd1a24f0007d5b77fa1d6f56a7951d4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 27, 2026.

Transparency log

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

Download URL arrowbricks-6.3.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
ccf8c2ebd8ffcadc86836e207f446895d061212fd43e0e2814661f5d1ce499ed
BLAKE2b-256 checksum
How to use checksums
d3474efe14aba60fd78c62d390a3f03e102d72ef2b4e801b9d39bc7a0b161510
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 27, 2026.

Transparency log

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

Download URL arrowbricks-6.3.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
9e73832a891c8e8b9755e71ca68a45a9e5d6500702af7a260768a65700361b14
BLAKE2b-256 checksum
How to use checksums
927093b53dd3963f1473823591f12a79b3a5c96b0655a1f3eb1d03d9680df825
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 27, 2026.

Transparency log

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

Download URL arrowbricks-6.3.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
37357132dd6d62bd5e798135d2e894945b82d7cf52ae1150fff63a944c79685e
BLAKE2b-256 checksum
How to use checksums
a389b71b83f304f0b0407c6123d5b08a36c5e3da7c8e186a906fc91caaaf5cad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 27, 2026.

Transparency log

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

Download URL arrowbricks-6.3.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
52cf9274326d5a15769afeee4004565863c9d16f3466c19248036a0f3c748699
BLAKE2b-256 checksum
How to use checksums
bce6381980b83b6a48b58d58d25b0cdafa7812722b582be187d6ab03d5c1999e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 27, 2026.

Transparency log

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

Download URL arrowbricks-6.3.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
5e529e081c33cbdccd9c53a82ac24e32dab63810dd9fd21a3c95db1130df187e
BLAKE2b-256 checksum
How to use checksums
6b818f207a5d109fd2bc086a3cfccd53cf3db39e04ca75520c0067a0054e9d29
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 27, 2026.

Transparency log

Security for arrowbricks 6.3.0

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.

Full provenance

All 6 files in this release have been uploaded with provenance metadata.

Select from 6 files

Attestation for arrowbricks-6.3.0.tar.gz

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 27, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

6.3.0 This release

6 release files Full provenance

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