openapi-python-client
Generate modern Python clients from OpenAPI
Decision gist · record as of 2026-08-14
Yes. The package is actively maintained, has no known vulnerabilities, low install friction, and solves a real problem—eliminating hand-written HTTP client boilerplate for OpenAPI-documented APIs. The MIT license is permissive. Trade-off: it is still in beta and does not support all OpenAPI features; verify that your API's spec is compatible before committing to it in production workflows.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.11 or later.
- For full functionality (code formatting), install with pipx and --include-deps flag so ruff is available in your PATH.
- Low friction install with a pure-Python wheel.
License · maintenance · safety
MIT (permissive) — MIT license (permissive) means you can use generated clients freely in commercial and private projects with minimal restrictions. No license compatibility concerns for typical Python development workflows.
last release 2026-05-30 (76 days) · last repo commit 2026-08-13 · 1,980 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 3,455,604 downloads/mo, #2,617 on PyPI
Alternatives
Verify before relying
pip install openapi-python-client
openapi-python-client generate --url https://api.example.com/openapi.json
# Generates a client library with Client class, API functions, and models- Extent of OpenAPI feature coverage beyond the note that 'not all OpenAPI features' are supported—which specific features are missing or incomplete
- Performance characteristics when generating clients from very large OpenAPI documents
- Stability of the custom template API, given the description notes it is 'beta-level' and 'undocumented and unstable'
What it is and what it does
openapi-python-client is a code generator that reads OpenAPI 3.0 and 3.1 specifications and produces a complete, modern Python HTTP client library. It uses Jinja2 templates and outputs type-annotated models, endpoint functions organized by tag, and both plain and authenticated client classes. The generated code includes a pyproject.toml, README, and optional post-generation hooks (via ruff) for formatting and linting.
The tool is designed for Python developers who want to avoid hand-writing boilerplate HTTP client code. It depends on attrs, httpx, pydantic, ruamel-yaml, jinja2, typer, colorama, shellingham, and ruff. The project is actively maintained but explicitly notes it is still in development and does not support all OpenAPI features; it also does not support OpenAPI 2.x (Swagger).
Use it for
- Generate a typed Python client library from a published OpenAPI spec to avoid manual HTTP boilerplate and ensure type safety.
- Automate client updates when an API's OpenAPI spec changes, regenerating models and endpoint functions without hand-editing.
- Create multiple client libraries from different OpenAPI documents using custom Jinja2 templates to match your project's code style.
- Integrate client generation into a CI/CD pipeline to keep generated clients in sync with API specifications.
- Override model class names and customize generated code structure via YAML configuration for non-standard API schemas.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
The package is actively maintained, has no known vulnerabilities, low install friction, and solves a real problem—eliminating hand-written HTTP client boilerplate for OpenAPI-documented APIs. The MIT license is permissive. Trade-off: it is still in beta and does not support all OpenAPI features; verify that your API's spec is compatible before committing to it in production workflows.
Install
openapi-python-client on PyPI
Before you install
Low friction install with a pure-Python wheel. Active maintenance (last commit 2026-08-13), 1980 repository stars, and no known vulnerabilities. Requires Python 3.11 or later. Recommended installation via pipx with --include-deps to ensure ruff is available for post-generation code cleanup.
Requires Python 3.11 or later. For full functionality (code formatting), install with pipx and --include-deps flag so ruff is available in your PATH.
License in practice
MIT license (permissive) means you can use generated clients freely in commercial and private projects with minimal restrictions. No license compatibility concerns for typical Python development workflows.
Quickstart
pip install openapi-python-client
openapi-python-client generate --url https://api.example.com/openapi.json
# Generates a client library with Client class, API functions, and models
Verify before relying
- Extent of OpenAPI feature coverage beyond the note that 'not all OpenAPI features' are supported—which specific features are missing or incomplete
- Performance characteristics when generating clients from very large OpenAPI documents
- Stability of the custom template API, given the description notes it is 'beta-level' and 'undocumented and unstable'
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release <4.0,>=3.11 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 9 packagesattrscoloramahttpxjinja2pydanticruamel-yamlruffshellinghamtyper |
| Maintenance | Actively maintained 76 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 3,455,604 / month, #2,617 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Software Development :: Code GeneratorsTyping :: Typed |
Evidence: openapi_python_client-0.29.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “openapi client generator python”
- openapi-python-clientGenerates type-annotated Python HTTP clients from OpenAPI 3.0 and 3.1…
- openapi-generator-cliProvides a Python CLI wrapper for OpenAPI Generator, enabling…
- openapi3Parses and validates OpenAPI 3 specifications, and provides a Python…
Give your agent the search over MCP, or paste the wish link into any chat.
More Code Generators packages
Proto Plus wraps protocol buffers to provide Python classes that behave like native Python types while maintaining protocol buffer serialization and schema validation.
Install it if you're working with protocol buffers in Python and want a more Pythonic interface, or if you're using Google Cloud libraries that depend on it.
Cython is a source code translator that compiles Python code to C, enabling optional static typing and direct C/C++ interoperability to generate efficient native extensions.
Install it if you need to optimize Python performance, wrap C/C++ libraries, or build fast native extensions.
Annotates Python abstract syntax trees with the positions of tokens and source code text, enabling tools to map AST nodes back to their originating code for refactoring, analysis, and transformation.
Beartype is a runtime type checker that validates Python type hints at function call time, catching type violations before they cause downstream bugs.
Install it if you want runtime type safety for your annotated code or need to validate type hints on third-party packages.
llvmlite provides a lightweight Python binding to LLVM's IR builder, optimizer, and JIT compiler APIs, enabling you to write JIT compilers and code generators without needing the full LLVM C++ API surface.
astor converts Python abstract syntax trees (ASTs) back to readable source code and provides tools for AST manipulation, inspection, and non-recursive tree traversal.
Install it if you need AST round-tripping or advanced tree inspection.
See also openapi-generator-cli · tapipy · essentials-openapi · openapi3 · openapi-schema-pydantic · benchling-api-client · openapi-pydantic · sphinxcontrib-openapi · aiopenapi3 · python-incidentio-client