skillfed

openapi3

Client and Validator of OpenAPI 3 Specifications

openapi3 v1.8.2 188.3K downloads/30d#9,947 on PyPI121
Permissive license BSD 3-Clause License DORMANT released

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 openapi3

uv

uv add openapi3

poetry

poetry add openapi3

Installing 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

openapi 3 clientopenapi spec validatoropenapi 3 pythonrest api client generatoropenapi specification parserapi client from openapiopenapi validation
openapirest-apivalidation

More WWW/HTTP packages