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

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

Download URL grainlift_adbc_gateway-0.6.1-py3-none-win_amd64.whl
Size 11.9 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
7814cb8a4e701b33e4e19a4867b231468e5818a3bccb83c88b639368949c9475
BLAKE2b-256 checksum
How to use checksums
652bfbcc1c146c37b867ee97af23f68f79a9216a353408bf92caae5f3ed0d5d8
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 9, 2026.

Transparency log

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

Download URL grainlift_adbc_gateway-0.6.1-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
b13d903c59b3ab759fdf771e7c47362ad675bf40782b107a6fc92861ad2276de
BLAKE2b-256 checksum
How to use checksums
8cad23e40282f2c7d538556d77cbf0987a6661cbaa99c4deaafe0884363fd71e
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 9, 2026.

Transparency log

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

Download URL grainlift_adbc_gateway-0.6.1-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
48cf5ff4c47a7fc2b9fb139e4f9328c486fded01e2d1b492099ae4963e4f2a6b
BLAKE2b-256 checksum
How to use checksums
f075e11669a111d9cb54d9a0215d4469ba6de6ec1caf6be41e4607d37a7620a4
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 9, 2026.

Transparency log

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

Download URL grainlift_adbc_gateway-0.6.1-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
44dbd380ab477c800a4b0c081067eabbb6dfe054fbaeddf044c05cee6af0247f
BLAKE2b-256 checksum
How to use checksums
2773ed98449ca75abca7bd34bce738308666c8ab9e29edf0fb03018c67cb1090
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 9, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.6.1 This release

4 release files

0.6.0

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