Skip to main content

A tool to autogenerate FastApi Clients from given openapi.yaml.

Project description

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 -U git+https://github.com/FelixTheC/openapi-fastapi-client.git@main

Usage

openapi-fastapi-client ./openapi.yaml ./my-client
  • 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]

Help

openapi-fastapi-client --help

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

openapi-fastapi-client-0.1.1.tar.gz (7.6 kB view details)

Uploaded Source

Built Distribution

openapi_fastapi_client-0.1.1-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

File details

Details for the file openapi-fastapi-client-0.1.1.tar.gz.

File metadata

File hashes

Hashes for openapi-fastapi-client-0.1.1.tar.gz
Algorithm Hash digest
SHA256 b832009d075f9cc92cf3ba7abce25c5636d8c585fa678b40d05548eb8e669240
MD5 7b1567eb766afceeafede9dc2a370a1f
BLAKE2b-256 e8309c2b34e9a6ffda9105fbaea6fba2ddf666a35f8d23445a37b21c95421112

See more details on using hashes here.

File details

Details for the file openapi_fastapi_client-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for openapi_fastapi_client-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 64e04866a398f819326cbc216fea2368972965fb0b9ef2077d2cecfa703b0000
MD5 ff3f17d1d57fae44d9deb1accf29236f
BLAKE2b-256 8cac471d6d4df70990cea8e45aa9b96ad2c1185efca7b700eaccb47a37dd4d54

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page