Skip to content

OpenAPI python generator

OpenAPI python generator, a modern way to generate clients for OpenAPI 3.0.0+ APIs

Tests Codecov PyPI Python Version

Documentation:

Source: https://github.com/MarcoMuellner/openapi-python-generator


OpenAPI python generator is a modern way to generate clients for OpenAPI 3.0.0+ APIs. It provides a full Client, including pydantic models (providing type-safe data structures) and multiple supported frameworks.

The key features of the generator are:

  • Ease of use. Provide input, output and the library, and the generator will do the rest.
  • Type safety and type hinting. OpenAPI python generator makes heavy use of pydantic models to provide type-safe data structures.
  • Support for multiple rest frameworks. OpenAPI python generator currently supports the following:
  • Async and sync code generation support, depending on the framework. It will automatically create both for frameworks that support both.
  • Easily extendable using Jinja2 templates. The code is designed to be easily extendable and should support even more languages and frameworks in the future.
  • Fully tested. Every generated code is automatically tested against the OpenAPI spec and we have 100% coverage.
  • Usage as CLI or as library.

Interested? Hop over to our Quickstart page, if you don't want to bother reading the docs, or if you just want to try it out. If you want to get a more in depth guide, check out our Tutorials page. If you are interested in the OpenAPI spec, go check out our OpenAPI Specification page.