Skip to main content

TypedDict typings for OpenAPI specification

Project description

OpenAPI typed

CircleCI PyPI PyPi License

Python typings for OpenAPI using dataclass.


Install package from PyPI.

pip install openapi-typed-2


from openapi_typed_2 import OpenAPIObject, Info

# Valid OpenAPIObject
openapi_valid = OpenAPIObject(
        title="My API",

# Invalid OpenAPIObject
openapi_invalid = OpenAPIObject(
    openap="3.0.0",  # Type-check error, unknown attribute
        title="My API"  # Type-check error, missing attribute `version`


Install development dependencies:

pip install -e '.[dev]'

Do codegen (necessary for type checking and tests):

python gen

Run tests:

# OR
python test

Run type-checks with mypy:

mypy openapi_typed

Build package:

python dist


Thanks for wanting to contribute! We will soon have a contributing page detaling how to contribute. Meanwhile, feel free to star this repository, open issues and ask for more features and support.

Please note that this project is governed by the Meeshkan Community Code of Conduct. By participating in this project, you agree to abide by its terms.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

openapi_typed_2-0.0.5.tar.gz (16.3 kB view hashes)

Uploaded source

Built Distribution

openapi_typed_2-0.0.5-py2.py3-none-any.whl (15.3 kB view hashes)

Uploaded py2 py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page