Metadata-Version: 2.5
Name: strata-client
Version: 0.9.0
Summary: Lightweight Python client for Strata: materialize, persist, and query artifacts over HTTP.
Project-URL: Homepage, https://github.com/bearing-research/strata
Project-URL: Repository, https://github.com/bearing-research/strata
Author-email: Fangchen Li <fangchen.li@outlook.com>
License-Expression: Apache-2.0
License-File: LICENSE
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Python: >=3.12
Requires-Dist: httpx>=0.28.0
Requires-Dist: pyarrow>=18.0.0
Provides-Extra: all
Requires-Dist: datafusion>=50.1.0; extra == 'all'
Requires-Dist: duckdb>=1.5.0; extra == 'all'
Requires-Dist: pandas>=2.0.0; extra == 'all'
Requires-Dist: polars>=1.36.1; extra == 'all'
Provides-Extra: datafusion
Requires-Dist: datafusion>=50.1.0; extra == 'datafusion'
Provides-Extra: duckdb
Requires-Dist: duckdb>=1.5.0; extra == 'duckdb'
Provides-Extra: pandas
Requires-Dist: pandas>=2.0.0; extra == 'pandas'
Provides-Extra: polars
Requires-Dist: polars>=1.36.1; extra == 'polars'
Description-Content-Type: text/markdown

# strata-client

A lightweight Python client for a [Strata](https://github.com/bearing-research/strata)
server. Depends only on `httpx` + `pyarrow`, none of the server's stack
(no pyiceberg / fastapi / duckdb / pydantic, no Rust extension), so it drops
into any analysis venv, training image, CI job, or notebook without dragging
the deployable service along.

```bash
pip install strata-client
pip install "strata-client[duckdb]"   # or pandas, polars, datafusion, all
```

```python
from strata_client import StrataClient

with StrataClient() as client:  # resolves the server URL from STRATA_SERVER_URL,
    # STRATA_HOST / STRATA_PORT, or [tool.strata]
    art = client.materialize(
        inputs=["file:///warehouse#db.events"],
        transform={"executor": "scan@v1", "params": {}},
    )
    table = client.fetch(art.uri)

    # Persist a result computed locally, with its lineage
    clean = client.put(
        inputs=[art.uri],
        transform={"executor": "clean@v1", "params": {}},
        data=table,
        name="team/dataset/clean",
    )

    # Registry: names, aliases, tags, audit
    client.set_alias("team/dataset/clean", "champion", clean.artifact_id, clean.version)
```

An unnamed result such as `art` is a cache entry: the server keeps it while it
is used and its retention sweep may collect it later, after which the same call
computes it again. A named one (`clean`) is kept.

The client and the server distribution (`strata-notebook`) are independent:
they share only the JSON wire protocol, and neither depends on the other. Code
written against the old `strata.client` module imports `strata_client` instead.
