Metadata-Version: 2.4
Name: adbc-driver-redis
Version: 0.0.19
Summary: Redis ADBC driver and analytics integrations
License-Expression: Apache-2.0
Project-URL: Homepage, https://github.com/redis/redis-adbc-driver
Project-URL: Documentation, https://github.com/redis/redis-adbc-driver/blob/main/docs/python-integrations.md
Project-URL: Issues, https://github.com/redis/redis-adbc-driver/issues
Requires-Python: >=3.12
Description-Content-Type: text/markdown
Requires-Dist: adbc-driver-manager>=1.12.0
Provides-Extra: airflow
Requires-Dist: apache-airflow-providers-apache-arrow>=0.1.1; extra == "airflow"
Requires-Dist: pyarrow>=26.0.0; extra == "airflow"
Provides-Extra: dbapi
Requires-Dist: pyarrow>=26.0.0; extra == "dbapi"
Provides-Extra: sqlalchemy
Requires-Dist: sqlalchemy>=2.1.6; extra == "sqlalchemy"
Requires-Dist: pyarrow>=26.0.0; extra == "sqlalchemy"
Provides-Extra: superset
Requires-Dist: apache-superset>=6.1.0; extra == "superset"
Requires-Dist: sqlalchemy<2,>=1.4.54; extra == "superset"
Requires-Dist: pyarrow<19,>=18.1.0; extra == "superset"
Requires-Dist: flask-caching==2.3.1; extra == "superset"
Requires-Dist: cachetools>=7.2.4; extra == "superset"
Provides-Extra: dagster
Requires-Dist: dagster>=1.13.26; extra == "dagster"
Requires-Dist: pyarrow>=26.0.0; extra == "dagster"
Provides-Extra: dask
Requires-Dist: dask[dataframe,distributed]>=2026.8.0; extra == "dask"
Requires-Dist: pandas>=3.1.0; extra == "dask"
Requires-Dist: pyarrow>=26.0.0; extra == "dask"
Provides-Extra: ray
Requires-Dist: ray[data]==2.59.0; extra == "ray"
Requires-Dist: pyarrow>=26.0.0; extra == "ray"
Provides-Extra: prefect
Requires-Dist: prefect<4,>=3.9.0; extra == "prefect"
Requires-Dist: pyarrow>=26.0.0; extra == "prefect"
Provides-Extra: dlt
Requires-Dist: dlt[parquet]<2,>=1.31; extra == "dlt"
Requires-Dist: pyarrow>=26.0.0; extra == "dlt"
Provides-Extra: test
Requires-Dist: dlt[parquet]<2,>=1.31; extra == "test"
Requires-Dist: prefect<4,>=3.9.0; extra == "test"
Requires-Dist: pytest>=9.1.1; extra == "test"
Requires-Dist: pyarrow>=26.0.0; extra == "test"
Requires-Dist: sqlalchemy>=2.1.6; extra == "test"
Requires-Dist: dagster>=1.13.26; extra == "test"
Requires-Dist: dagster-adbc>=0.0.2; extra == "test"
Requires-Dist: pandas>=3.1.0; extra == "test"
Requires-Dist: polars>=2.0.0; extra == "test"
Requires-Dist: duckdb==2.0.0; extra == "test"
Requires-Dist: dask[dataframe,distributed]>=2026.8.0; extra == "test"

# Redis ADBC driver

SQL queries and Arrow bulk ingestion over Redis through the Arrow Database
Connectivity (ADBC) API. This community driver bundles its native library in
platform wheels for Linux x86_64/arm64 (glibc 2.28+) and macOS arm64 (macOS 12+).
Use Python 3.14 for the current integrations. Python 3.12+ remains installable
for the separate Superset compatibility environment. Windows and macOS Intel wheels are not provided.

For installation and diagnostics, see [Choose your tool and connect](https://github.com/redis/redis-adbc-driver/blob/main/docs/setup.md).

```sh
python -m pip install 'adbc-driver-redis[dbapi]' polars
python -m adbc_driver_redis doctor --offline
```

**Recommended Redis configuration:** Redis Search (Query Engine) enabled
and query performance factor (QPF) set to **4×** where supported.
Search is required; 4× QPF is recommended for concurrent query performance.
Configure these on the Redis server; installing this package does not enable them.
See [server requirements](https://github.com/redis/redis-adbc-driver/blob/main/docs/driver-reference.md#server-requirements)
for configuration and CPU sizing guidance.

Set `REDIS_URI` and run `python -m adbc_driver_redis doctor` to check connectivity,
Search and a fetched `SELECT 1`. Add `--check-manifests` after registration for
native clients that load drivers by name.

With Redis and Search running:

```python
import polars as pl

df = pl.read_database_uri(
    query="SELECT 1 AS one",
    uri="redis://localhost:6379/0",
    engine="adbc",
)
print(df)
```

For direct DB-API use:

```python
from adbc_driver_redis import dbapi

with dbapi.connect("redis://localhost:6379/0") as conn:
    with conn.cursor() as cur:
        cur.execute("SELECT 1 AS one")
        print(cur.fetch_arrow_table())
```

Use `rediss://` for TLS. Search is required; writes autocommit and transactions
are unsupported. SQL support comes from this driver. Installing the package
does not install or start a Redis server.

The `airflow` extra supports `adbc_driver_redis.airflow.RedisAdbcHook` for
autocommit queries through Airflow.

Optional extras: `sqlalchemy` for current SQLAlchemy, `superset` for the isolated
Superset 6.1 / SQLAlchemy 1.4 compatibility environment,
`dagster` for the Redis ADBC IO manager, and `dask` for partitioned DataFrame
reads with `adbc_driver_redis.dask.read_query`. The source build's `ray` extra
pins Ray 2.59.0 and supplies worker-side Arrow reads through
`adbc_driver_redis.ray.read_query`; see the
[Ray guide](https://github.com/redis/redis-adbc-driver/blob/main/docs/python-integrations.md#ray-data)
for installation on every worker and live-read consistency limits.

The `dlt` extra provides the append-only dlt destination:

```python
import dlt
from adbc_driver_redis.dlt import redis_adbc

pipeline = dlt.pipeline(
    pipeline_name="redis_orders",
    destination=redis_adbc(uri="redis://localhost:6379/0", schema_name="analytics"),
)
pipeline.run([{"id": 1, "amount": 10.5}], table_name="orders")
```

Install with `python -m pip install 'adbc-driver-redis[dlt]'`. Loads use Arrow
batches through ADBC. Only append is supported; retries can duplicate partially
written batches. Keep the local dlt pipeline directory for checkpoints.

See the [installation and integration guide](https://github.com/redis/redis-adbc-driver/blob/main/docs/python-integrations.md)
and [server requirements](https://github.com/redis/redis-adbc-driver/blob/main/docs/driver-reference.md#server-requirements)
for supported Redis deployments, configuration and limitations.

Arrow IPC stream/file serialization is available inside the native driver through
standard ADBC statement options. See the [IPC contract and example](https://github.com/redis/redis-adbc-driver/blob/main/docs/arrow-ipc.md).
