OpenAPI typed
Python typings for OpenAPI using dataclass.
Installation
Install package from PyPI.
pip install openapi-typed-2
Usage
from openapi_typed_2 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]'
Do codegen (necessary for type checking and tests):
python setup.py gen
Run tests:
pytest
# OR
python setup.py test
Run type-checks with mypy:
mypy openapi_typed
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 Meeshkan Community Code of Conduct. By participating in this project, you agree to abide by its terms.
Metadata
Release files for openapi-typed-2 0.0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| openapi_typed_2-0.0.5.tar.gz | 16.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| openapi_typed_2-0.0.5-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Total release size: 31.5 kB
Release files / openapi_typed_2-0.0.5.tar.gz
| Download URL | openapi_typed_2-0.0.5.tar.gz |
|---|---|
| Size | 16.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
125ab39a677466ec22529a36bdf7af68142ff60adcae96ff39d270ab71bdd98d
|
|
BLAKE2b-256 checksum How to use checksums |
5ad03b23df8f5a375017951e8351a5a7148902c7c44e3fa47aa51b00a8bf92b9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.2
|
Release files / openapi_typed_2-0.0.5-py2.py3-none-any.whl
| Download URL | openapi_typed_2-0.0.5-py2.py3-none-any.whl |
|---|---|
| Size | 15.3 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
42a6ed5a764ebc37477aed41749563cfe37d6e4d1838a225b9dee12ade848aa2
|
|
BLAKE2b-256 checksum How to use checksums |
7792bee9ba49f42b501c5e747c99943cd393061b8ccd96d7364476c913794288
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.2
|