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 details)
Built Distribution
File details
Details for the file openapi_typed-0.0.1.tar.gz
.
File metadata
- Download URL: openapi_typed-0.0.1.tar.gz
- Upload date:
- Size: 6.1 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
Algorithm | Hash digest | |
---|---|---|
SHA256 | fba5bba7dd9618e00c5c8efc03e32d8c11395dfe43381b1f47e471716c85e94a |
|
MD5 | 8379a92517c06532e63ecdf91bf5778f |
|
BLAKE2b-256 | 97e39bbf951f4980d717e14efacc3ddd0c059054d08e2046eaec58897ddfcc1c |
File details
Details for the file openapi_typed-0.0.1-py2.py3-none-any.whl
.
File metadata
- Download URL: openapi_typed-0.0.1-py2.py3-none-any.whl
- Upload date:
- Size: 4.6 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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5d4f0d69cf43ba9fb650ed67c55c192da62256e1ca5596b02400af3c9ad56ce5 |
|
MD5 | 4d96ed8839201fa636174efc3b319909 |
|
BLAKE2b-256 | 2a0b8deacf182b5d9d308c1c40c786c37a60cfb06b736add6d2d51db511848a1 |