Python OpenAPI Client Generator made OK
Project description
okapipy
A Python OpenAPI client generator that lifts the flat list of paths in an
OpenAPI 3.x document into a hierarchical tree of Namespace → Collection → Resource → (Sub-Collection | Action) and emits a strongly-typed,
async/sync Pydantic v2 client from it.
Installation
okapipy requires Python 3.12+ and uses uv for dependency management.
uv add okapipy # add to an existing project
# or, for one-off use:
uvx okapipy --help
The first NLP-dependent run downloads the spaCy en_core_web_sm model
(~12 MB) into ./.spacy/. To pre-warm it:
uv run okapipy nlp fetch en
Usage
Parse a spec into its structural tree (path or http(s) URL accepted):
uv run okapipy spec parse openapi.yaml --output tree.yaml
Generate a full client project:
uv run okapipy spec generate openapi.yaml \
--output ./my-client \
--package acme.commerce \
--client-class CommerceClient
This writes a complete Python project under ./my-client with a
regeneratable base layer (src/acme/commerce/base/...) and a one-shot user
layer of subclass stubs you can safely customize. Re-running the command
refreshes the base layer while preserving your edits in the user layer.
Useful flags:
--rules path/to/rules.yaml— project-local overrides for namespace assignment, segment kind, and operation exclusion (mirrors thex-okapipy-*extensions; rules-file values win on conflict).--strip-prefix /api/v1— drop a base prefix from every path before classification.--check— CI dry-run: report drift and stale files, exit non-zero on any change.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file okapipy-0.1.0.tar.gz.
File metadata
- Download URL: okapipy-0.1.0.tar.gz
- Upload date:
- Size: 566.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ad17a47fb5bfeaa7ea0fceac2076749c75b04f63f7d2b88153d4609a0989e8f8
|
|
| MD5 |
148292ce4261eb4c178c192965fc30f8
|
|
| BLAKE2b-256 |
2d1d8601dec5657efa3cc50743835e29799015387cbe07f2bea8eb5b9b13024e
|
Provenance
The following attestation bundles were made for okapipy-0.1.0.tar.gz:
Publisher:
release.yml on ffaraone/okapipy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
okapipy-0.1.0.tar.gz -
Subject digest:
ad17a47fb5bfeaa7ea0fceac2076749c75b04f63f7d2b88153d4609a0989e8f8 - Sigstore transparency entry: 1437408181
- Sigstore integration time:
-
Permalink:
ffaraone/okapipy@4dd43acaa7acc3d4d27247aaf930c90a03d5737d -
Branch / Tag:
refs/tags/0.1.0 - Owner: https://github.com/ffaraone
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@4dd43acaa7acc3d4d27247aaf930c90a03d5737d -
Trigger Event:
release
-
Statement type:
File details
Details for the file okapipy-0.1.0-py3-none-any.whl.
File metadata
- Download URL: okapipy-0.1.0-py3-none-any.whl
- Upload date:
- Size: 96.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8fbd63dd8c06336a780f100dbaf7be8e363551093d492da661d01007814c1787
|
|
| MD5 |
edb62c68222efcb57418b555e7f35d4d
|
|
| BLAKE2b-256 |
7a04d15e9e1cd656fd2d2fe85187275e87d314ce597e10629dbb956b61fd8a5d
|
Provenance
The following attestation bundles were made for okapipy-0.1.0-py3-none-any.whl:
Publisher:
release.yml on ffaraone/okapipy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
okapipy-0.1.0-py3-none-any.whl -
Subject digest:
8fbd63dd8c06336a780f100dbaf7be8e363551093d492da661d01007814c1787 - Sigstore transparency entry: 1437408187
- Sigstore integration time:
-
Permalink:
ffaraone/okapipy@4dd43acaa7acc3d4d27247aaf930c90a03d5737d -
Branch / Tag:
refs/tags/0.1.0 - Owner: https://github.com/ffaraone
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@4dd43acaa7acc3d4d27247aaf930c90a03d5737d -
Trigger Event:
release
-
Statement type: