Metadata-Version: 2.4
Name: lucen-sdk
Version: 0.1.0
Summary: MouseMouse API client (generated from the hub's OpenAPI contract)
License-Expression: Apache-2.0
License-File: LICENSE
Requires-Dist: httpx>=0.23
Requires-Dist: attrs>=22.2
Requires-Python: >=3.12
Project-URL: Homepage, https://mousemouse.ai
Project-URL: Documentation, https://mousemouse.ai/docs/api
Project-URL: Repository, https://github.com/ICE-CUBA/lucen-hub
Description-Content-Type: text/markdown

# `lucen-sdk` — the MouseMouse API client for Python

The typed client for the [MouseMouse](https://mousemouse.ai) REST API,
generated from the hub's OpenAPI contract (served by every hub at
`/openapi.yaml`, browsable at [mousemouse.ai/docs/api](https://mousemouse.ai/docs/api))
with [openapi-python-client](https://github.com/openapi-generators/openapi-python-client).
One module per operation, one attrs class per schema; `httpx` underneath.

This is the layer the `lucen` command line
([`lucen-cli`](https://pypi.org/project/lucen-cli/)) and the MCP server
([`lucen-mcp`](https://pypi.org/project/lucen-mcp/)) are built on. If you want
to script the hub, `from lucen import Hub` in `lucen-cli` is the friendlier
surface; use this package when you want the contract itself.

```bash
pip install lucen-sdk      # or: uv add lucen-sdk
```

```python
from lucen_sdk import AuthenticatedClient, Client
from lucen_sdk.api.auth import get_me
from lucen_sdk.api.repos import get_repo, list_repos
from lucen_sdk.models import RepoKind

public = Client(base_url="https://api.mousemouse.ai")
robot = get_repo.sync("lucen", "laika", client=public)          # public repos need no key

hub = AuthenticatedClient(base_url="https://api.mousemouse.ai", token="lucen_sk_...")
me = get_me.sync(client=hub)
page = list_repos.sync(client=hub, kind=RepoKind.MODEL, limit=20)
```

Every operation has `sync`, `sync_detailed` (the `Response` with status and
headers), `asyncio` and `asyncio_detailed`. Errors are RFC 9457 `Problem`
objects; a private resource is `404`, never `403`. Keys are scoped
`read ⊂ write ⊂ train`, and some operations are session-only (a key of any
scope is refused: minting keys, approving a policy onto a robot).

The version follows the contract: a new minor is a breaking change to the
generated surface, a patch adds operations or fields. Regenerated by the hub's
`make sdk`; never hand-edited.

Apache-2.0. © 2026 Lucen Robotics.
