A commandline tool to generate Api functions
and their required pydantic Model
Schema from an openapi.yaml
of version 3
pip install openapi-fastapi-client
openapi-fastapi-client ./openapi.yaml ./my-client
openapi-fastapi-client ./openapi.yaml ./my-client --async
- this will generate under the folder
my-client
following files__init__.py
if not existsapi.py
here are all function calls to the external apischema.py
here are all pydantic Models
OPENAPI_FILE [required]
OUTPUT_PATH [required]
--sync
All requests to the client are synchronous. default--async
All requests to the client are asynchronous with aiohttp.
openapi-fastapi-client --help