TypedDict typings for OpenAPI specification
Project description
OpenAPI typed
Python typings for OpenAPI using TypedDict.
Installation
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.0.tar.gz
(6.1 kB
view hashes)
Built Distribution
Close
Hashes for openapi_typed-0.0.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b0ff38eb8cb434c27c0cd2d35fcbd1c3d6589b5059126bb0a2f9214cb65c0a69 |
|
MD5 | 01eb9aea4e0a3985a8e9098bc916d48f |
|
BLAKE2b-256 | 73394c759f298aa632fcd562e6776cae91b3b5e9a657322b9996c364994a3984 |