Metadata-Version: 2.5
Name: arex-python-sdk
Version: 0.2.0
Summary: Synchronous and asynchronous Python SDK for the AREX public API
Project-URL: Homepage, https://github.com/AREX-Research/arex-sdk
Project-URL: Repository, https://github.com/AREX-Research/arex-sdk
Project-URL: Issues, https://github.com/AREX-Research/arex-sdk/issues
Author: AREX Research
License-Expression: Apache-2.0
License-File: LICENSE
Keywords: arex,browse,research,sdk,search
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
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: Typing :: Typed
Requires-Python: >=3.10
Requires-Dist: httpx<1,>=0.27
Description-Content-Type: text/markdown

# arex-python-sdk

Python client for the AREX public API, synchronous and asynchronous. Python >= 3.10; the only dependency is `httpx`.

```bash
pip install arex-python-sdk
```

```python
from arex import Arex

with Arex() as arex:  # reads AREX_API_KEY
    search = arex.search("how are AI agents evaluated", limit=5)
    for item in search.results:
        page = arex.browse(item.url, max_characters=4000)
    run = arex.research.run("Compare agent evaluation benchmarks", mode="fast")
    assert run.result is not None  # always set once run() returns
    print(run.result.answer, search.credits.remaining)
```

`AsyncArex` mirrors every call as a coroutine under `async with`.

The SDK follows the checked-in v1 OpenAPI contract. Charged calls reuse an idempotency key across automatic retries. Supply `idempotency_key` when you need to retry the same operation across calls or process restarts. Keep API keys server-side.

Search, browse and research creation consume credits; consult your AREX account for current pricing. Usage checks, polling and other research lifecycle calls are free.

- [API reference](https://github.com/AREX-Research/arex-sdk/blob/main/python/docs/api.md): options, models, errors, exports.
- [Behavior](https://github.com/AREX-Research/arex-sdk/blob/main/python/docs/behavior.md): credits, deadlines, retries, idempotency, polling, and recovery.
- [Examples](https://github.com/AREX-Research/arex-sdk/tree/main/python/examples): runnable scripts.

[Apache License 2.0](https://github.com/AREX-Research/arex-sdk/blob/main/LICENSE).
