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

Total release size: 49.8 MB

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

Download URL grainlift_adbc_gateway-0.5.0-py3-none-win_amd64.whl
Size 11.6 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
c1427e38fca689f3898605a8bf5d0c7c542122af56daf2ee34e3b061738f7772
BLAKE2b-256 checksum
How to use checksums
8b9dc0ac64eb61a25a034893b48815f80d52140dd8b0070284c732f21bf68b0b
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 7, 2026.

Transparency log

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

Download URL grainlift_adbc_gateway-0.5.0-py3-none-manylinux_2_28_x86_64.whl
Size 13.6 MB
Tags Linux glibc 2.28+ x86-64 Python 3
SHA-256 checksum
How to use checksums
fcbe689a3a62392e432d4e30be34666fbdd1771557409fec18fe8c51b115be00
BLAKE2b-256 checksum
How to use checksums
2c80f1383c412cc4efa471fb00f703930515166ffe2d685d66b385be854a1af5
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 7, 2026.

Transparency log

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

Download URL grainlift_adbc_gateway-0.5.0-py3-none-manylinux_2_28_aarch64.whl
Size 13.4 MB
Tags Linux glibc 2.28+ ARM64 Python 3
SHA-256 checksum
How to use checksums
7e0df0d3dc46a98701d56d67b7495e932f80711a4dff0375777a93cecb275df9
BLAKE2b-256 checksum
How to use checksums
74d8c6479cf22c4c9cfde05eaca712b6c493cb76394ed26f57a1e3973325251f
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 7, 2026.

Transparency log

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

Download URL grainlift_adbc_gateway-0.5.0-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
6ad1fa5341c16168f663d2b4f993d7dd2fd692b3f574e0fadd29ab0b75a3b92c
BLAKE2b-256 checksum
How to use checksums
faa7749ad6961ed6bdc0a8ae12f682bcb47d91d7044779ba6b77ccbc2f22c8a7
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 7, 2026.

Transparency log

Release history Release notifications | RSS feed

0.6.1

4 release files

0.6.0

4 release files

This release

0.5.0 This release

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