openapi3
Client and Validator of OpenAPI 3 Specifications
What it is and what it does
openapi3 is a Python client and validator for OpenAPI 3 specifications. It reads an OpenAPI spec file, parses it into a Python object model, and allows you to call API operations defined in that spec as if they were methods on the API object. It handles authentication schemes defined in the spec, passes parameters and request bodies, and returns typed response objects.
The package serves two main purposes: validating that an OpenAPI spec conforms to the standard, and acting as a dynamic client that lets you interact with any OpenAPI 3-compliant API without writing boilerplate HTTP code. It depends on PyYaml for spec parsing and requests for HTTP calls.
Use it for:
- Validate an OpenAPI 3 specification file to catch schema errors before deployment or sharing with clients.
- Build a Python client for a third-party REST API that publishes an OpenAPI 3 spec, without manually writing request/response handling.
- Test an OpenAPI-compliant API interactively in Python scripts by calling operations directly as methods.
- Generate typed response objects from API calls that match the schema definitions in the OpenAPI spec.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Parses and validates OpenAPI 3 specifications, and provides a Python client to call operations defined in those specs with automatic request/response handling.
Yes, if you need a lightweight OpenAPI 3 client and validator for a stable API spec. The low install friction and permissive license make it easy to adopt. However, dormant maintenance (last release 2023-08-29) means you should verify compatibility with your OpenAPI spec version and check whether the roadmap features you need have been implemented. Not recommended if you require active support or expect frequent updates.
Install
openapi3 on PyPI
pip
pip install openapi3uv
uv add openapi3poetry
poetry add openapi3Installing openapi3
Before you install
Low install friction with only two runtime dependencies (PyYaml and requests). Maintenance is dormant—last release was 2023-08-29, over a year ago, with no commits since 2024-06-26. The repository is not archived but shows minimal recent activity.
License in practice
BSD 3-Clause License is permissive and poses no restrictions on commercial or private use, modification, or redistribution.
Quickstart
pip install openapi3
from openapi3 import OpenAPI
with open('openapi.yaml') as f:
spec = PyYaml.safe_load(f.read())
api = OpenAPI(spec)
result = api.call_getRegions()
Verify before relying
- Whether the package works reliably with modern OpenAPI 3 specs given dormant maintenance status.
- Compatibility with current versions of PyYaml and requests, and whether breaking changes in those deps have affected openapi3.
- Whether planned roadmap features (request body models, parameters validation, non-JSON content support) have been implemented since the last release.
Package facts
| License | BSD 3-Clause License (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — PyYaml, requests |
| Maintenance | dormant — 1,081 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 188,346/month — #9,947 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: openapi3-1.8.2-py2.py3-none-any.whl
Tags
More WWW/HTTP packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
h11h11 is a pure-Python HTTP/1.1 protocol…
permissive · top 100 on PyPI
httpxHTTPX is a fully featured HTTP client library…
permissive · top 100 on PyPI
httpcoreA minimal low-level HTTP client library that…
permissive · top 100 on PyPI
aiohttpaiohttp is an async HTTP client and server…
permissive · top 100 on PyPI
aiopenapi3Parses and validates OpenAPI 3 specifications…
permissive · top 15,000 on PyPI
fastspecConverts OpenAPI and Google Discovery API specs…
permissive · top 5,000 on PyPI
openapi-spec-validatorValidates OpenAPI specifications (versions 2.0,…
permissive · top 1,000 on PyPI
tapipyTapipy is a Python SDK that automatically…
permissive · top 15,000 on PyPI
swagger-spec-validatorValidates Swagger/OpenAPI specifications…
permissive · top 15,000 on PyPI
openapi-schema-validatorValidates data and schemas against OpenAPI…
permissive · top 1,000 on PyPI
prancePrance parses and validates Swagger/OpenAPI 2.0…
unclear · top 5,000 on PyPI
spectreeGenerates OpenAPI documents and validates HTTP…
permissive · top 15,000 on PyPI
openapi-python-clientGenerates type-annotated Python HTTP clients…
permissive · top 5,000 on PyPI
openapi-generator-cliProvides a Python CLI wrapper for OpenAPI…
permissive · top 15,000 on PyPI