Metadata-Version: 2.4
Name: easy-answers-client
Version: 1.0.0
Summary: Python client for the Easy Answers public API (/api/v1). Generated from the live OpenAPI spec.
License: MIT
Keywords: easy-answers,api,sdk,openapi
Requires-Python: >=3.9
Description-Content-Type: text/markdown

# easy-answers-client

Python client for the Easy Answers public API (`/api/v1`). Zero runtime dependencies (stdlib only).

> AUTO-GENERATED — regenerate with `npx tsx scripts/generate-sdks.ts` from the repo root
> whenever the API changes. The client is generated from the same route registry that
> serves `GET /api/v1/openapi.json`, so it cannot drift from the live API.

## Install

```bash
pip install easy-answers-client
```

## Usage

```python
from easy_answers_client import EasyAnswersClient

client = EasyAnswersClient(base_url="https://your-app.example.com", api_token="ea_live_...")

me = client.get_me()
ontologies = client.list_ontologies()
metrics = client.list_metrics(ontology=ontologies[0]["uid"])
results = client.search_documents_v1(body={"query": "renewal terms", "topK": 5})
```

## Endpoints

| Endpoint | Method | Summary |
|---|---|---|
| `GET /api/v1/me` | getMe | Token owner identity |
| `GET /api/v1/ontologies` | listOntologies | List accessible ontologies |
| `GET /api/v1/ontologies/:id` | getOntology | Get a single ontology |
| `GET /api/v1/solutions` | listSolutions | List published Apps |
| `GET /api/v1/solutions/:id` | getSolution | Get a single published App |
| `GET /api/v1/metrics` | listMetrics | List reusable metrics for an ontology |
| `GET /api/v1/metrics/:id` | getMetric | Get a single reusable metric |
| `GET /api/v1/ontologies/:id/schema` | getOntologySchema | Read an ontology's entity schema |
| `GET /api/v1/ontologies/:id/graph` | getOntologyGraph | Read an ontology's relationship graph |
| `POST /api/v1/documents/search` | searchDocumentsV1 | Hybrid document search (permission-trimmed) |
| `GET /api/v1/export/targets` | listExportTargets | List semantic-export target formats |
| `POST /api/v1/export` | generateSemanticExport | Generate a semantic-model export |
| `GET /api/v1/entity-resolution/lookup` | lookupEntity | Look up a resolved entity by name |
| `POST /api/v1/query` | semanticQuery | Run a declarative semantic query |

Errors raise `EasyAnswersApiError` with `.status` and `.body`. 429 responses include a `Retry-After` header.
