A tool to autogenerate FastApi Clients from given openapi.yaml.
Project description
Openapi yaml file to FastApi Client
A commandline tool to generate Api functions
and their required pydantic Model
Schema from an openapi.yaml
of version 3
Installation
pip install openapi-fastapi-client
Usage
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
Arguments
OPENAPI_FILE [required]
OUTPUT_PATH [required]
Options
--sync
All requests to the client are synchronous. default--async
All requests to the client are asynchronous with aiohttp.
Help
openapi-fastapi-client --help
Project details
Release history Release notifications | RSS feed
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
Close
Hashes for openapi-fastapi-client-0.2.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9c9f0cc190137cd4412fa710d12c72866f517ffa8c8a50ee6b3dbe1429c564bd |
|
MD5 | 1f4723f4dab3d475134725c1c7c08c37 |
|
BLAKE2b-256 | 6f09f1d10f8ea639b32543378499d6f10137845be074336e5a23664c0d92fcbe |
Close
Hashes for openapi_fastapi_client-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 60c8317d5e4282e738a80d7ab452f259d462d665ebaa7582af987a8dd7098059 |
|
MD5 | 39ef7323613496d5c6caa4ae8d0c974c |
|
BLAKE2b-256 | 89140ca015a4e91d1b0b6c7a3eee27aa1591c779a7337e4844f2a9cfe5582a11 |