Metadata-Version: 2.5
Name: pytracer-stores
Version: 0.1.0
Summary: pyTracer trace store (ClickHouse) and mock store (PostgreSQL).
Author: pyTracer
License-Expression: Apache-2.0
Requires-Python: >=3.10
Requires-Dist: clickhouse-connect>=0.7
Requires-Dist: psycopg[binary]>=3.1
Requires-Dist: pydantic>=2.6
Requires-Dist: pytracer-sdk==0.1.0
Provides-Extra: dev
Requires-Dist: mypy>=1.10; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Requires-Dist: ruff>=0.5; extra == 'dev'
Description-Content-Type: text/markdown

# pytracer-stores

Layer 3 of pyTracer: the **trace store** (ClickHouse) holding every captured span,
and the **mock store** (PostgreSQL) holding recorded tool responses for
deterministic replay.

```python
from pytracer_stores import TraceStore, MockStore

traces = TraceStore(); traces.migrate()
traces.insert(spans, project="my-app")          # branch + commit required
failed = traces.query(failed_only=True, agent_name="planner")

mocks = MockStore(); mocks.migrate()
mocks.record("search", {"q": "hi"}, ["result"], is_failure=False)
mock = mocks.lookup("search", {"q": "hi"})       # newest recorded outcome
```

Connection defaults match the repo's `docker-compose.yml`; override via
`PYTRACER_CLICKHOUSE_*` / `PYTRACER_POSTGRES_*` env vars.
