The OpenAPI Artifact Generator Python Package
Project description
OpenAPIArt
The OpenAPIArt
(OpenAPI Artifact Generator) python package does the following:
- pre-processes OpenAPI yaml files according to the MODELGUIDE
- using the path keyword bundles all dependency OpenAPI yaml files into a single openapi.yaml file
- post-processes any MODELGUIDE extensions
- validates the bundled openapi.yaml file
Using the validated openapi.yaml file it then:
- generates a static redocly documentation file
- generates a
protobuf
file - generates protobuf based python files
- generates an enhanced ux python module
Getting started
Install the package
pip install openapiart
Generate artifacts from OpenAPI files
import openapiart
"""
The following command will produce these artifacts:
- ./artifacts/openapi.yaml
- ./artifacts/openapi.json
- ./artifacts/openapi.html
- ./artifacts/sample.proto
- ./artifacts/sample/__init__.py
- ./artifacts/sample/sample.py
- ./artifacts/sample/sample_pb2.py
- ./artifacts/sample/sample_pb2_grpc.py
"""
openapiart.OpenApiArt(
api_files=[
'./tests/api/api.yaml'
'./tests/api/info.yaml'
'./tests/common/common.yaml'
],
python_module_name='sample',
protobuf_file_name='sample',
protobuf_package_name='sample',
output_dir='./artifacts',
extension_prefix='sample'
)
Specifications
This repository is based on the OpenAPI specification which is a standard, language-agnostic interface to RESTful APIs.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
openapiart-0.0.43.tar.gz
(28.3 kB
view details)
Built Distribution
File details
Details for the file openapiart-0.0.43.tar.gz
.
File metadata
- Download URL: openapiart-0.0.43.tar.gz
- Upload date:
- Size: 28.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a1cf9829d89f9c81114b0e07d230fdcb5d6945e029e4832489bf1d064112a5d4 |
|
MD5 | 6a832ba6136d95fe793e657e1f25f26a |
|
BLAKE2b-256 | 1102352106264e7c5cad5e97af7286322352b6c6bd19f29dfbfd6ff297827d17 |
File details
Details for the file openapiart-0.0.43-py2.py3-none-any.whl
.
File metadata
- Download URL: openapiart-0.0.43-py2.py3-none-any.whl
- Upload date:
- Size: 31.3 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 68576881f9f7124bc4cd0a4de48be42f91d135abbc29965fcfa4c5a33c37e73a |
|
MD5 | 6b3c6c02acf4cb1d679a1e9c68f20eb0 |
|
BLAKE2b-256 | 200c2238b88ba747c4a156007b2c66cab55fbded8a6d926a0738fab70143ded9 |