MarcoMuellner
openapi-python-generator
Python

A client generator from openapi for python.

Last updated Jun 29, 2026
97
Stars
39
Forks
47
Issues
+1
Stars/day
Attention Score
22
Language breakdown
Python 95.8%
Jinja 4.2%
โ–ธ Files click to expand
README

Openapi Python Generator

[PyPI][pypi_] [Status][status] [Python Version][python version] [License][license]

[][documentation] [Tests][tests] [Codecov][codecov]

[pre-commit][pre-commit] [Black][black]

[pypi_]: https://pypi.org/project/openapi-python-generator/ [status]: https://pypi.org/project/openapi-python-generator/ [python version]: https://pypi.org/project/openapi-python-generator [documentation]: https://marcomuellner.github.io/openapi-python-generator/ [tests]: https://github.com/MarcoMuellner/openapi-python-generator/actions?workflow=Tests [codecov]: https://app.codecov.io/gh/MarcoMuellner/openapi-python-generator [pre-commit]: https://github.com/pre-commit/pre-commit [black]: https://github.com/psf/black


Documentation: [here][documentation]

Features

  • 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:
- httpx - requests - aiohttp
  • 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.

Requirements

  • Python 3.7+

Installation

You can install Openapi Python Generator via [pip] from [PyPI]:

$ pip install openapi-python-generator

Usage

Please see the [Quick start page] for details.

Roadmap

  • Support for all commonly used http libraries in the python ecosystem (requests, urllib, ...)
  • Support for multiple languages
  • Support for multiple authentication schemes
  • Support custom themes

Contributing

Contributions are very welcome. To learn more, see the [Contributor Guide].

License

Distributed under the terms of the [MIT license][license], Openapi Python Generator is free and open source software.

Issues

If you encounter any problems, please [file an issue] along with a detailed description.

Credits

Special thanks to the peeps from openapi-schema-pydantic, which already did a lot of the legwork by providing a pydantic schema for the OpenAPI 3.0.0+ specification.

This project was generated from [@cjolowicz]'s [Hypermodern Python Cookiecutter] template.

[@cjolowicz]: https://github.com/cjolowicz [pypi]: https://pypi.org/ [hypermodern python cookiecutter]: https://github.com/cjolowicz/cookiecutter-hypermodern-python [file an issue]: https://github.com/MarcoMuellner/openapi-python-generator/issues [pip]: https://pip.pypa.io/

[license]: https://github.com/MarcoMuellner/openapi-python-generator/blob/main/LICENSE [contributor guide]: https://github.com/MarcoMuellner/openapi-python-generator/blob/main/CONTRIBUTING.md [Quick start page]: https://marcomuellner.github.io/openapi-python-generator/quick_start/

ยฉ 2026 GitRepoTrend ยท MarcoMuellner/openapi-python-generator ยท Updated daily from GitHub