Metadata-Version: 2.4
Name: delta-arrow-reader
Version: 0.7.0
Requires-Dist: pyarrow>=18.0.0
License-File: LICENSE
License-File: NOTICE
Summary: Read-only Delta Lake to Apache Arrow reader
License-Expression: Apache-2.0
Requires-Python: >=3.10
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Issues, https://github.com/mag1cfrog/delta-arrow-reader/issues
Project-URL: Repository, https://github.com/mag1cfrog/delta-arrow-reader

# Delta Arrow Reader for Python

Read Delta Lake tables as PyArrow record batches with the Rust Delta Arrow Reader.
Use filters directly or query registered tables with SQL. The same package
includes the native `delta-arrow-reader` command.

Install in an activated Python virtual environment:

```console
python -m pip install --only-binary=:all: delta-arrow-reader
delta-arrow-reader --help
```

For a separate CLI environment, choose a persistent installation or a single run:

```console
uv tool install --no-build delta-arrow-reader
delta-arrow-reader --version
```

```console
uvx --no-build delta-arrow-reader --help
```

If uv reports that its executable directory is missing from `PATH`, run
`uv tool update-shell` and restart your shell. Tool environments do not install
the Python API into your project's environment.

Wheels require CPython 3.10 or newer and target Linux x86_64 with glibc 2.28 or
newer, Windows x86_64, and macOS arm64 with macOS 12.0 or newer. See the
[installation guide](https://mag1cfrog.github.io/delta-arrow-reader/installation/#python)
for tested Python versions and platform limits. Installing a
wheel needs no Rust toolchain. Every installation includes the Python extension,
native CLI, and PyArrow 18 or newer, even if you only use the command. This uses
more disk space than the standalone Linux `dar` archive.

```python
from delta_arrow_reader import DeltaTable

table = DeltaTable("/path/to/delta-table")
with table.to_reader() as reader:
    for batch in reader:
        print(batch)
```

See the [Python quickstart](https://mag1cfrog.github.io/delta-arrow-reader/python/)
for column selection, filters, and snapshot refresh. For SQL, use the included
Rust DataFusion engine:

```python
from delta_arrow_reader import Session

session = Session()
session.register_table("events", table)
with session.sql("SELECT COUNT(*) AS rows FROM events") as reader:
    print(reader.read_all().to_pydict())
```

SQL supports read-only queries over registered snapshots, including joins and
aggregations. It does not require the separate `datafusion` Python package.
See the [SQL guide](https://mag1cfrog.github.io/delta-arrow-reader/python/#query-with-sql)
for execution and memory behavior. The
[contributor guide](https://github.com/mag1cfrog/delta-arrow-reader/blob/main/docs/content/contributing.md)
covers local builds and tests.

