Skip to main content

TypedDict typings for OpenAPI specification

Project description

OpenAPI typed

CircleCI PyPI PyPi License

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

Contributing

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 Unmock 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-0.0.2.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

openapi_typed-0.0.2-py2.py3-none-any.whl (4.9 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file openapi_typed-0.0.2.tar.gz.

File metadata

  • Download URL: openapi_typed-0.0.2.tar.gz
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.40.0 CPython/3.6.2

File hashes

Hashes for openapi_typed-0.0.2.tar.gz
Algorithm Hash digest
SHA256 565d03077439449640ed9c79705cbc7e192795db154e39a9a4b9218985dc1793
MD5 9594faa48b6439bc74c9c6dd7dd783e6
BLAKE2b-256 ffaea240c6918fe79b3b5d1f9f1591efa4d5c6540d0e5a7fa9d5213d12318c27

See more details on using hashes here.

File details

Details for the file openapi_typed-0.0.2-py2.py3-none-any.whl.

File metadata

  • Download URL: openapi_typed-0.0.2-py2.py3-none-any.whl
  • Upload date:
  • Size: 4.9 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.40.0 CPython/3.6.2

File hashes

Hashes for openapi_typed-0.0.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 e04c5d27120a25772f8e83be066a643f76c321cd51b93882952639b1820ecc80
MD5 16eccc958f7fb4739284b96c286a7828
BLAKE2b-256 03e61ca749445d2244b4af15708f9ca6bc4933c0edd3c583aa1b634c92c91fa0

See more details on using hashes here.

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