OpenAPI Type for Python

openapi-type provides the OpenAPI Specification as a Python type.

pip install openapi-type
from openapi_type import OpenAPI, parse_spec, serialize_spec


spec: OpenAPI = parse_spec({
    "your OpenAPI Spec as Python dictionary": "will be parsed into a proper Python type"
})
assert parse_spec(serialize_spec(spec)) == spec

Quickstart Guide

Indices and tables