Skip to main content

Action0-Client-OpenAPI

CI PyPI

Generate fully typed action0-client API clients from an OpenAPI schema: one typed operation class per endpoint, plus the model classes their results are parsed into. The generated code is plain, readable action0-client code — it depends on action0-client only, not on this package — so it runs synchronously, on asyncio, on Twisted or on an execution model of your own, decided by the backend you plug in.

uv add --dev action0-client-openapi     # or: pip install action0-client-openapi
action0-openapi petstore.json -o src/   # YAML schemas: install the "yaml" extra
src/petstore_client/__init__.py
src/petstore_client/client.py
src/petstore_client/models.py
src/petstore_client/operations.py
src/petstore_client/py.typed

Using the generated client — the backend decides the execution model, and the static types follow it:

from action0.client.backends.requests import RequestsBackend
from petstore_client import GetPet, PetstoreClient

client = PetstoreClient(RequestsBackend(), token="...")
pet = client.send(GetPet(pet_id=42))  # Pet

from action0.client.backends.httpx import AsyncHttpxBackend

client = PetstoreClient(AsyncHttpxBackend(), token="...")
pet = await client.send(GetPet(pet_id=42))  # Awaitable[Pet]

Generated code is meant to be checked in and reviewed like hand-written code: it is readable, ruff-clean and fully typed — mypy strict, pyright and ty pass on it. Models become plain dataclasses with generated JSON converters, endpoints become Operation subclasses, security schemes become client constructor credentials — with the schema's descriptions carried along as docstrings and #: doc-comments. The schema support matrix lists exactly which OpenAPI 3.0/3.1 constructs are covered — schemas split over several files are bundled automatically, straight from a URL too (referenced files download after a per-file confirmation, or with --download) — and what is deliberately deferred (typed multipart bodies, per-status response typing, ...).

Requires Python 3.11 or newer.

Full documentation including the API reference: https://laughinjar.github.io/action0-client-openapi/

Development

The project is managed with uv; uv run syncs the environment automatically:

uv run pytest          # tests (incl. doctests in the sources)
uv run ruff check      # lint
uv run ruff format     # format
uv run mypy            # type-check (strict)
uv run pyright         # type-check
uv run ty check        # type-check

AI disclosure

This library is developed with heavy use of AI coding tools: the code, tests, and documentation are largely written by Claude Code, working from the author's design brief and reviewed by the author. If that changes how much you want to rely on this package, that's a fair call — read the source, it's small.

License

MIT — see LICENSE.

Metadata

Release files for action0-client-openapi 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for action0-client-openapi 0.1.2
File Size Uploaded
action0_client_openapi-0.1.2.tar.gz 178.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for action0-client-openapi 0.1.2
File Interpreter ABI Platform
action0_client_openapi-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 235.7 kB

Release files / action0_client_openapi-0.1.2.tar.gz

Download URL action0_client_openapi-0.1.2.tar.gz
Size 178.1 kB
Tags Source
SHA-256 checksum
How to use checksums
f84b8abea266dfd6037979c99eb40b5f9138bff4c4eaeca46bbde43d69e5448a
BLAKE2b-256 checksum
How to use checksums
6cc45e370a04c7ba3dbb9d2d32eb1137ce03fe87942fb182c284d0dea6076841
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 15, 2026.

Transparency log

Release files / action0_client_openapi-0.1.2-py3-none-any.whl

Download URL action0_client_openapi-0.1.2-py3-none-any.whl
Size 57.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
30a0890999cb9b2e9f91491d9a20013bf0a04f7fefc44424589ae32c7b7e662d
BLAKE2b-256 checksum
How to use checksums
3dee2af199376ca742e4ee527e3196d2a07882daadf2d2d02ae6fcfad292e3c4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 15, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page