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-clientfollowing files__init__.pyif not existsapi.pyhere are all function calls to the external apischema.pyhere are all pydantic Models
Arguments
OPENAPI_FILE [required]OUTPUT_PATH [required]
Options
--syncAll requests to the client are synchronous. default--asyncAll 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
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 openapi-fastapi-client-0.2.1.tar.gz.
File metadata
- Download URL: openapi-fastapi-client-0.2.1.tar.gz
- Upload date:
- Size: 8.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4e15322b74a13f30c964cafa0ab885cd218348ce10321592302cdd967763525e
|
|
| MD5 |
208d14d22ecb2d06454ea23f96898752
|
|
| BLAKE2b-256 |
ad05fe4005a1dd597c197ec6ebd1f31aa86c12d18bca125382ed56e7b8a4d7c1
|
File details
Details for the file openapi_fastapi_client-0.2.1-py3-none-any.whl.
File metadata
- Download URL: openapi_fastapi_client-0.2.1-py3-none-any.whl
- Upload date:
- Size: 9.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eb81c11d93d7657b097a45eee70b41ca96b3ba808a99758f6a1bc8354437888b
|
|
| MD5 |
6e07de9f0c29b1648bef52cdbd534f53
|
|
| BLAKE2b-256 |
f719c0016628a16a9685dc1e7f5ed09e4fc7c2fbf6772b2a65edfc2ce65fb74c
|