Skip to main content

Grainlift

Grainlift ADBC Gateway

Serve your database over the network. Keep the standard ADBC API.

PyPI version Python versions CLI wheels Apache 2.0 license Built with Query.Farm

Grainlift makes server-installed database drivers available to remote applications through Apache Arrow ADBC. Keep native drivers and database credentials on the server while clients use ordinary ADBC connections, SQL, transactions, and Arrow results.

grainlift-adbc-gateway packages the Rust gateway executable and installs Apache's SQLite ADBC driver as a dependency. Python launches the server; query execution runs in Rust and the downstream driver. Supported platform wheels need no Rust toolchain. Python 3.13 or newer is required.

  • Start with SQLite: serve a local database with one command.
  • Keep Arrow results: clients pull record batches from server-side cursors.
  • Control access centrally: configure authentication, target permissions, credentials, and resource limits at the gateway.
  • Use other ADBC databases: install their drivers on the server and define targets in a configuration file. Capabilities depend on the downstream driver.

Start a gateway

With uv, serve an existing SQLite database:

uvx grainlift-adbc-gateway serve sqlite ./database.sqlite

To create a new database, add --create:

uvx grainlift-adbc-gateway serve sqlite ./database.sqlite --create

The gateway listens on 127.0.0.1:8080, exposes target sqlite, and creates a random bearer token in .grainlift-token in the current directory. Later starts reuse that token file. The token is never printed; keep it private and out of source control. On Windows, restrict the directory's ACL to the service account. Database and token parent directories must already exist.

For a persistent command, install with uv tool install grainlift-adbc-gateway or pip install grainlift-adbc-gateway, then run grainlift-adbc-gateway directly.

Query from Python

In your client environment, install the Grainlift ADBC client and PyArrow:

pip install adbc-driver-grainlift pyarrow

With the gateway running, execute this from its working directory so the example can read .grainlift-token:

from pathlib import Path

import adbc_driver_grainlift.dbapi as adbc

with adbc.connect(
    db_kwargs={
        "grainlift.uri": "grainlift+http://127.0.0.1:8080",
        "grainlift.target": "sqlite",
        "grainlift.auth.bearer_token": Path(".grainlift-token").read_text().strip(),
    },
    autocommit=True,
) as connection:
    with connection.cursor() as cursor:
        cursor.execute("SELECT 42 AS answer")
        print(cursor.fetch_arrow_table())

Other ADBC applications can load the native Grainlift client driver directly. See the Python client guide and the DuckDB example.

Configure a deployment

The SQLite shorthand uses loopback HTTP. For remote access, multiple databases, or transport and authentication settings, use a configuration file:

grainlift-adbc-gateway check --config grainlift.toml
grainlift-adbc-gateway serve --config grainlift.toml

Start with the example configuration. check validates configuration and policy without loading drivers or connecting to databases. Configured deployments support HTTP(S), loopback TCP, mTLS TCP, and authenticated Iroh QUIC, with server-controlled database options and quotas.

Grant access only to callers trusted to use the configured database: the gateway is not a SQL or filesystem sandbox. Sessions, transactions, and live result cursors belong to one server process, so replicated deployments require session affinity. A server restart invalidates its sessions.

Read the security guide and process isolation guidance before deploying. Downstream drivers determine supported operations; see the known limitations for cancellation and native-driver caveats.

Choose the right package

Package Purpose
grainlift-adbc-gateway (this package) Run the native gateway with server-installed ADBC drivers.
adbc-driver-grainlift Connect applications to a running Grainlift service.
grainlift Write your own Grainlift workers in Python.

Documentation and support

An open source Query Farm project, licensed under Apache 2.0.

Metadata

Release files for grainlift-adbc-gateway 0.4.3

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

Built distributions (wheels)

Table of built distributions (wheels) for grainlift-adbc-gateway 0.4.3
File
grainlift_adbc_gateway-0.4.3-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details
grainlift_adbc_gateway-0.4.3-py3-none-manylinux_2_28_x86_64.whl Python 3 none Linux glibc 2.28+ x86-64 Details
grainlift_adbc_gateway-0.4.3-py3-none-manylinux_2_28_aarch64.whl Python 3 none Linux glibc 2.28+ ARM64 Details
grainlift_adbc_gateway-0.4.3-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details

Total release size: 49.5 MB

Release files / grainlift_adbc_gateway-0.4.3-py3-none-win_amd64.whl

Download URL grainlift_adbc_gateway-0.4.3-py3-none-win_amd64.whl
Size 11.5 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
ff302713763dc3ebf1bd258dba30bc0ed927113e166fc450d8bc5d6b8dcce9d9
BLAKE2b-256 checksum
How to use checksums
af3af61da5bf99c7f4c762acb09ac19d456b9903d254f46f74d0283327b332f9
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 2, 2026.

Transparency log

Release files / grainlift_adbc_gateway-0.4.3-py3-none-manylinux_2_28_x86_64.whl

Download URL grainlift_adbc_gateway-0.4.3-py3-none-manylinux_2_28_x86_64.whl
Size 13.5 MB
Tags Linux glibc 2.28+ x86-64 Python 3
SHA-256 checksum
How to use checksums
9c426a94cfdc6489f4896f5076bdc354cc114854c679e827cc736fc18abc8f05
BLAKE2b-256 checksum
How to use checksums
12521f3b40ba093d8393742c6b2264d39db854b44f146d75c0747aebe7e6a77c
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 2, 2026.

Transparency log

Release files / grainlift_adbc_gateway-0.4.3-py3-none-manylinux_2_28_aarch64.whl

Download URL grainlift_adbc_gateway-0.4.3-py3-none-manylinux_2_28_aarch64.whl
Size 13.3 MB
Tags Linux glibc 2.28+ ARM64 Python 3
SHA-256 checksum
How to use checksums
d18ad8b36d950fd26a1614e2d68beda07cc51b14f75bc5e7a6af334f62165c47
BLAKE2b-256 checksum
How to use checksums
49c8ab1089bfc64cd7b71b9001bc6056fe9f15559b8390387afcba823278cd4c
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 2, 2026.

Transparency log

Release files / grainlift_adbc_gateway-0.4.3-py3-none-macosx_11_0_arm64.whl

Download URL grainlift_adbc_gateway-0.4.3-py3-none-macosx_11_0_arm64.whl
Size 11.2 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
9375d6070f7191eb2b783039e10ff36bce965052577f772a2ef72270e1d62315
BLAKE2b-256 checksum
How to use checksums
b9e3fb158233fed475e000e69d01f5d0421a87db0c2cf23f6ef33344562de298
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 2, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.4.3 This release

4 release files

0.4.0

4 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