Metadata-Version: 2.4
Name: ayva-ingest
Version: 0.1.0
Summary: Thin Python client for AYVA automated data sources
Author-email: AYVA <hello@ayva.tech>
License-Expression: MIT
Project-URL: Homepage, https://ayva.tech
Project-URL: Documentation, https://ayva-staging.onrender.com/ayva/data-workspace?tab=docs
Project-URL: Source, https://github.com/tossshix/ayva
Project-URL: Issues, https://github.com/tossshix/ayva/issues
Keywords: ayva,ingest,parquet,data-integration,etl
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pandas>=2.0
Requires-Dist: pyarrow>=14.0
Requires-Dist: requests>=2.28
Dynamic: license-file

# ayva-ingest

Thin Python client for [AYVA](https://ayva.tech) automated data sources.

Upload a pandas DataFrame, CSV file, or Parquet file to the source bound to your
API key. The client normalizes to Snappy Parquet and enforces the 1 MiB canonical
limit before the request leaves your machine.

## Install

```bash
pip install ayva-ingest
```

## Usage

```python
import pandas as pd
from ayva_ingest import AyvaSource

source = AyvaSource(
    api_key="ayva_live_…",
    # Use your AYVA deployment origin (no trailing path).
    base_url="https://ayva-staging.onrender.com",
)

source.upload(
    pd.DataFrame({"period": ["2026-Q1"], "revenue": [100]}),
    idempotency_key="revenue-2026-q1",
)
source.upload("revenue.csv", idempotency_key="revenue-csv-2026-q2")
source.upload("revenue.parquet", idempotency_key="revenue-pq-2026-q3")
```

Create and rotate keys in **Report Library → Data Integration → Keys**.

## API contract (summary)

- `PUT {base_url}/api/v1/source/data`
- `Authorization: Bearer ayva_live_…`
- Required unique `Idempotency-Key`
- Body: canonical Parquet (`application/vnd.apache.parquet`)

## Publish (maintainers)

```bash
cd sdk/python
python -m pip install -U build twine
python -m build
python -m twine check dist/*
python -m twine upload dist/*
```

Use `__token__` as the username and a PyPI API token as the password.
Bump `version` in `pyproject.toml` for every release (PyPI versions are immutable).

## License

MIT
