Metadata-Version: 2.4
Name: meetreeve
Version: 0.1.0
Summary: Official server-side Python SDK for the Reeve API.
License-Expression: LicenseRef-Proprietary
License-File: LICENSE
Requires-Python: >=3.10
Requires-Dist: httpx>=0.27
Provides-Extra: dev
Requires-Dist: openapi-python-client==0.29.0; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Description-Content-Type: text/markdown

# meetreeve (Python)

Server-side Python SDK for the [Reeve](https://meetreeve.com) API.

**Status:** not yet released. `meetreeve` is free on PyPI with a pending
trusted publisher already registered, and the package is staged at `0.1.0`
awaiting its first tag (DEV-4920). Deliberately **not** `reeve-sdk`, which is
taken on PyPI by an unrelated project that also calls itself Reeve.

**Licence:** proprietary, not open source — see [`LICENSE`](LICENSE).

## Install (from git — no PyPI yet)

```bash
pip install "meetreeve @ git+https://github.com/MindFortressInc/reeve-sdks.git@main#subdirectory=python"
```

## Quickstart

```python
from meetreeve import ReeveClient, ReeveError

client = ReeveClient(api_key="your-host-key")  # sent as X-Reeve-Host-Key

try:
    stats = client.crm.get("/api/crm/v1/stats")
    print(stats)
except ReeveError as e:
    print(e.status, e.code, e.message, e.retryable)

client.close()
```

Or as a context manager:

```python
with ReeveClient(api_key="your-host-key") as client:
    namespaces = client.memory.get("/api/memory/v1/namespaces")
```

## What's generated vs. hand-written

- `meetreeve/client.py`, `errors.py`, `retry.py` — hand-written. Auth header
  injection, retry/backoff on 429/5xx, and error normalization across both
  the migrated `{"error": {...}}` envelope and legacy `{"detail": ...}`
  shapes.
- `meetreeve/_generated/<product>/` — generated per catalog group via
  [openapi-python-client](https://github.com/openapi-generators/openapi-python-client)
  from `specs/<product>-v1.json`. Typed models + per-operation call functions
  for callers who want full typing instead of the raw-JSON `client.<product>.get(...)`
  facade. Regenerate with `scripts/generate_models.sh`.

## Development

```bash
python3 -m venv .venv
source .venv/bin/activate
pip install -e '.[dev]'
pytest
```
