Metadata-Version: 2.4
Name: deltaforge-adbc
Version: 1.0.5
Summary: DeltaForge ADBC driver: Arrow-native read and write for Delta Lake and Apache Iceberg, carrying record batches end-to-end so BI tools skip row-by-row conversion
Project-URL: Homepage, https://deltaforge.org
Project-URL: Documentation, https://deltaforge.org/docs
Project-URL: Issues, https://github.com/deltaforge-org/delta-forge-adbc/issues
Author: DeltaForge
License: LicenseRef-DeltaForge-Proprietary
License-File: LICENSE
Keywords: adbc,arrow,delta lake,deltaforge,lakehouse
Classifier: Intended Audience :: Developers
Classifier: License :: Other/Proprietary License
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Database
Requires-Python: >=3.9
Requires-Dist: adbc-driver-manager>=1.0
Requires-Dist: pyarrow>=14.0
Provides-Extra: pandas
Requires-Dist: pandas>=1.5; extra == 'pandas'
Provides-Extra: polars
Requires-Dist: polars>=0.20; extra == 'polars'
Description-Content-Type: text/markdown

<p align="center">
  <img src="https://deltaforge.org/assets/favicon/favicon-512.png" alt="DeltaForge" width="96" height="96">
</p>

<h1 align="center">deltaforge-adbc</h1>

<p align="center"><strong>ADBC driver: Arrow-native read and write for Delta Lake and Apache Iceberg from Python</strong></p>

<p align="center">
  <a href="https://deltaforge.org">deltaforge.org</a> &middot;
  <a href="https://deltaforge.org/pages/adbc.html">ADBC driver</a> &middot;
  <a href="https://github.com/deltaforge-org/delta-forge-adbc/issues">Issues</a>
</p>

Arrow-native read and write for Delta tables from Python, via the DeltaForge
ADBC driver. The driver carries Arrow record batches end to end, so it is the
preferred connector for wide-column scans and for writing DataFrames straight
into Delta tables.

DeltaForge is commercial software with a free Community license. See
[deltaforge.org/pricing](https://deltaforge.org/pricing).

## Install

```bash
pip install deltaforge-adbc
# optional DataFrame integrations:
pip install "deltaforge-adbc[pandas]"   # or [polars]
```

The wheel bundles the native driver for your platform. No separate driver
install or `unixODBC` setup is required.

## Connect

```python
import deltaforge_adbc as df

conn = df.connect(
    control_plane="https://control.example.com",
    token="df_pat_...",                    # personal access token
    compute="https://compute.example.com", # optional; auto-selected if omitted
)
```

Connection parameters also fall back to environment variables:
`DELTAFORGE_CONTROL_PLANE_URL`, `DELTAFORGE_SESSION_TOKEN`,
`DELTAFORGE_COMPUTE_URL`.

## Read

```python
table = df.read_table(conn, "SELECT * FROM sales.public.orders LIMIT 1000")
pdf   = table.to_pandas()        # pandas
# import polars as pl; pl.from_arrow(table)   # polars
```

## Write a DataFrame

```python
import pandas as pd

frame = pd.DataFrame({"id": [1, 2, 3], "region": ["us", "eu", "us"], "qty": [10, 20, 30]})

# Append (default). Also: mode="replace" (overwrite), mode="upsert".
df.write_dataframe(conn, "sales.public.orders", frame, mode="append")

# Idempotent append: re-sending the same key is a no-op, not a duplicate.
df.write_dataframe(conn, "sales.public.orders", frame, mode="append",
                   idempotency_key="nightly-2026-05-31")
```

pandas, polars, and pyarrow inputs are all accepted; the target table must
already exist.

## Runnable examples

See [`examples/`](examples/): `read.py` and `write_dataframe.py` are
self-contained scripts driven by the environment variables above.
