This CLI utility allows you to generate Python client packages from OpenAPI v3 specifications. The project aims at supporting any generic valid specification.
- works on Python 3.8 and above;
- generates clients with type hints to aid static analysis of higher level interfaces that would use the clients;
- supports streaming endpoints.
You can install it from PyPI:
pip install openapi-client-generator
Afterwards, use a CLI utility called openapi-client-generator
:
$ openapi-client-generator --help
usage: openapi-client-generator [-h] [-V] {gen} ...
OpenAPI Client Generator
optional arguments:
-h, --help show this help message and exit
-V, --version show program's version number and exit
sub-commands:
valid sub-commands
{gen} additional help
gen Generate client for a provided schema (JSON, YAML).
The proper way to clone this repo is:
git clone --recurse-submodules <repo-url> <local-project-root>
cd <local-project-root>
# for showing submodule status with `git status`
git config status.submodulesummary 1
# for logging submodule diff with `git diff`
git config diff.submodule log
The project uses Nix for bootstrapping its dev environment.
You can run existing test suite with
$ nix-shell --run "make test"
Documentation is hosted on ReadTheDocs: https://openapi-client-generator.readthedocs.io/en/develop/
See CHANGELOG.
MIT