Metadata-Version: 2.5
Name: auray-client
Version: 0.1.1
Summary: The Auray API from Python: run a model at its address, follow the request, download what it made.
Project-URL: Documentation, https://auray.ai/docs/clients/python
Project-URL: Homepage, https://auray.ai
License-Expression: MIT
Keywords: 3d,api,auray,generative,image,music,video
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.10
Requires-Dist: httpx>=0.27
Description-Content-Type: text/markdown

# auray-client

The Auray API from Python. One dependency, `httpx`; Python 3.10+.

```python
from auray_client import Client

auray = Client()  # reads AURAY_API_KEY

result = auray.subscribe(
    "auray-ai/krea-2-turbo/text-to-image",
    input={"prompt": "a brass orrery on a walnut desk, morning light", "aspect_ratio": "16:9", "resolution": 1024},
    idempotency_key="my-first-render",
    on_queue_update=lambda s: print(s["status"]),
)
assets = auray.platform.jobs.assets(result["request_id"])
print(assets["assets"][0]["url"])
```

- `run(address, input=..., wait_seconds=..., timeout=...)` — the synchronous host; a
  `504 run_timed_out` is followed by the job it names (`queue_request_id`, never the trace in
  `request_id`), never resubmitted. `wait_seconds` is how long the host holds the connection,
  `timeout` the whole call's deadline; running out raises `subscribe_timed_out` carrying the job.
- `subscribe(address, input=..., idempotency_key=..., on_queue_update=...)` — submit, follow, fetch
  the result.
- `queue.submit / status / result / cancel / stream_status` — the request lifecycle, fal's shape.
- `storage.upload(product=..., content_type=..., data=...)` and `upload_file(path, product=...)` —
  three calls, and a signed URL for a field.
- `platform.me / usage / jobs / models / webhooks / chat` — the account's side.
- `AsyncClient` — the same surface, awaited: `async with AsyncClient() as auray: ...`

Every refusal raises `AurayError` with `status`, `code`, the API's `message`, `docs` and
`request_id`. 429 and 503 are retried with `Retry-After`; nothing else is.

Documentation: https://auray.ai/docs/clients/python

## Publishing, and why there is no `build` script

Publishing to PyPI is the owner's decision and has not been taken, so nothing here builds a
distribution. The package carried `"build": "python -m build"` from the day it landed and it never
ran: `build` is not in `requirements-dev.txt`, is not installed on the machine this repository is
developed on, and is not installed in CI — where `pnpm turbo run typecheck lint test build` runs on
every push, so the script turned the whole pipeline red from that day to 2026-09-06, next to a
`generated-sdks` job that was red for its own reason. A red pipeline that everybody has learned to
ignore is worse than no pipeline, so the script is gone until the decision is made.

When it is: `pip install build`, add it to `requirements-dev.txt`, `python -m build` (the backend is
already declared — `hatchling`, in `pyproject.toml`), and give CI the install step before the build
task exists again.
