Metadata-Version: 2.4
Name: yonyon
Version: 0.1.0
Summary: Official Python client for the public yonyon.ai agent API (generated from https://yonyon.ai/.well-known/openapi.json).
Keywords: yonyon,agent,api,sdk,openapi
Author: Yonatan Gross
License-Expression: MIT
License-File: LICENSE
Requires-Dist: httpx>=0.23.1,<0.29.0
Requires-Dist: attrs>=22.2.0
Requires-Python: >=3.11
Project-URL: Homepage, https://yonyon.ai
Project-URL: Documentation, https://yonyon.ai/developers
Project-URL: Source, https://github.com/yonatangross/yonyon-cli/tree/main/python
Project-URL: OpenAPI, https://yonyon.ai/.well-known/openapi.json
Description-Content-Type: text/markdown

# yonyon (Python)

Official Python client for the public [yonyon.ai](https://yonyon.ai) agent API, generated from the
OpenAPI spec at https://yonyon.ai/.well-known/openapi.json.

The HTTP API this client wraps is public and read only. There is no key and no login. (The separate
MCP server at `/api/mcp` has one write tool, `book_intro_call`, which books a real call; it is not
part of this client.) Rate limit: 10 requests per IP per
minute, shared across `/ask`, `/api/chat` and `/api/v1`.

## Install

```bash
pip install yonyon
```

Requires Python 3.11 or newer.

## Use

```python
from yonyon import Client
from yonyon.api.default import list_projects

client = Client(base_url="https://yonyon.ai")

with client as c:
    projects = list_projects.sync(client=c)
    response = list_projects.sync_detailed(client=c)  # status code, headers, raw body
```

Each operation has `sync`, `sync_detailed`, `asyncio` and `asyncio_detailed` variants, except the
five CORS preflight modules (`*_preflight`), which have only `sync_detailed` and `asyncio_detailed`
(they return a `Response[Any]` with no parsed model). Operations
live in `yonyon.api.default` (`ask_nlweb`, `ask_yonatan`, `list_projects`, `batch`, `create_job`,
`get_job`, and the index routes); models live in `yonyon.models`.

API docs: https://yonyon.ai/developers. The npm CLI in the parent folder covers the same API.

## Regenerate

```bash
uvx --from openapi-python-client openapi-python-client generate \
  --path openapi.json --config openapi-generator-config.yml --meta uv --output-path . --overwrite
uv build
```

Refresh `openapi.json` from https://yonyon.ai/.well-known/openapi.json first. The generator rewrites
`README.md` and `pyproject.toml`, so restore both after regenerating: this README, `LICENSE`, and all
the hand-set `[project]` metadata (description, authors, license, license-files, keywords,
`[project.urls]`) plus the `build-system` bound.

## License

MIT. See [LICENSE](https://github.com/yonatangross/yonyon-cli/blob/main/python/LICENSE).
