Skip to main content

Python 3.10 Python application Code style: black Imports: isort

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 exists
    • api.py here are all function calls to the external api
    • schema.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

Metadata

Release files for openapi-fastapi-client 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for openapi-fastapi-client 0.2.1
File Size Uploaded
openapi-fastapi-client-0.2.1.tar.gz 8.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for openapi-fastapi-client 0.2.1
File Interpreter ABI Platform
openapi_fastapi_client-0.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 17.7 kB

Release files / openapi-fastapi-client-0.2.1.tar.gz

Download URL openapi-fastapi-client-0.2.1.tar.gz
Size 8.3 kB
Tags Source
SHA-256 checksum
How to use checksums
4e15322b74a13f30c964cafa0ab885cd218348ce10321592302cdd967763525e
BLAKE2b-256 checksum
How to use checksums
ad05fe4005a1dd597c197ec6ebd1f31aa86c12d18bca125382ed56e7b8a4d7c1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.17

Release files / openapi_fastapi_client-0.2.1-py3-none-any.whl

Download URL openapi_fastapi_client-0.2.1-py3-none-any.whl
Size 9.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
eb81c11d93d7657b097a45eee70b41ca96b3ba808a99758f6a1bc8354437888b
BLAKE2b-256 checksum
How to use checksums
f719c0016628a16a9685dc1e7f5ed09e4fc7c2fbf6772b2a65edfc2ce65fb74c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.17

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files

0.2.0

2 release files

0.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page