Skip to main content

TypedDict typings for OpenAPI specification

Project description

OpenAPI typed

Python typings for OpenAPI using TypedDict.

Installation

Install package from PyPI.

pip install openapi-typed

Usage

from openapi_typed import OpenAPIObject, Info

# Valid OpenAPIObject
openapi_valid = OpenAPIObject(
    openapi="3.0.0",
    info=Info(
        title="My API",
        version="0.0.0")
    )

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

Development

Install development dependencies:

pip install -e .[dev]

Run tests:

pytest
# OR
python setup.py test

Build package:

python setup.py dist

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-0.0.1.tar.gz (6.1 kB view hashes)

Uploaded Source

Built Distribution

openapi_typed-0.0.1-py2.py3-none-any.whl (4.6 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page