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.6.0

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.6.0
File
grainlift_adbc_gateway-0.6.0-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details
grainlift_adbc_gateway-0.6.0-py3-none-manylinux_2_28_x86_64.whl Python 3 none Linux glibc 2.28+ x86-64 Details
grainlift_adbc_gateway-0.6.0-py3-none-manylinux_2_28_aarch64.whl Python 3 none Linux glibc 2.28+ ARM64 Details
grainlift_adbc_gateway-0.6.0-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details

Total release size: 51.0 MB

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

Download URL grainlift_adbc_gateway-0.6.0-py3-none-win_amd64.whl
Size 11.9 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
cead88f5283ec39d1c24faf74872ef0ef0244a8bb21ec206848731074d5bba81
BLAKE2b-256 checksum
How to use checksums
09965f5b909af25ca1e89b55f566223767ecc66423347ad5f06c0f252b9519fb
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 8, 2026.

Transparency log

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

Download URL grainlift_adbc_gateway-0.6.0-py3-none-manylinux_2_28_x86_64.whl
Size 13.9 MB
Tags Linux glibc 2.28+ x86-64 Python 3
SHA-256 checksum
How to use checksums
c30acc371a7a6456e1d9d5a2fac9dfe0f74dc9291a035e5f88355b812a9989b3
BLAKE2b-256 checksum
How to use checksums
7f6ab473b971015dc560aa5c325da57c04242ac20a9641828348a179592bb862
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 8, 2026.

Transparency log

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

Download URL grainlift_adbc_gateway-0.6.0-py3-none-manylinux_2_28_aarch64.whl
Size 13.7 MB
Tags Linux glibc 2.28+ ARM64 Python 3
SHA-256 checksum
How to use checksums
d1a143d0896aaa84e5c0e971e844bc9b2a8be84367310782c8e5b08dfa33c1c5
BLAKE2b-256 checksum
How to use checksums
5856769c61fe201fabc223b460a11ddf6b3fae2bed28e9227d29ae3f7c11f215
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 8, 2026.

Transparency log

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

Download URL grainlift_adbc_gateway-0.6.0-py3-none-macosx_11_0_arm64.whl
Size 11.5 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
853662c2cabc8dba04d1539b76aedd5d78b7bd2ff3f0db1ca214faddddd649cc
BLAKE2b-256 checksum
How to use checksums
3527b0f16fc7144b8133223ba09c85bb184a9d7e3701252778a6b4cffac4d293
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 8, 2026.

Transparency log

Release history Release notifications | RSS feed

0.6.1

4 release files

This release

0.6.0 This release

4 release files

0.5.0

4 release files

0.4.3

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