openapiart - OpenAPI Artifact Generator
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
- generates a
.protofile from the openapi file - optionally generates a static redocly documentation file
- optionally generates a
python ux sdkfrom the openapi file - optionally generates a
go ux sdkfrom the openapi file
Getting started
Install the package
pip install openapiart
Generate artifacts from OpenAPI files
"""
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
- ./pkg/openapiart.go
- ./pkg/go.mod
- ./pkg/go.sum
- ./pkg/sanity/sanity_grpc.pb.go
- ./pkg/sanity/sanity.pb.go
"""
import openapiart
# bundle api files
# validate the bundled file
# generate the documentation file
art = openapiart.OpenApiArt(
api_files=[
"./openapiart/tests/api/info.yaml",
"./openapiart/tests/common/common.yaml",
"./openapiart/tests/api/api.yaml",
],
artifact_dir="./artifacts",
protobuf_name="sanity",
extension_prefix="sanity",
)
# optionally generate a python ux sdk and python protobuf/grpc stubs
art.GeneratePythonSdk(
package_name="sanity"
)
# optionally generate a go ux sdk and go protobuf/grpc stubs
art.GenerateGoSdk(
package_dir="github.com/open-traffic-generator/openapiart/pkg",
package_name="openapiart"
)
Specifications
This repository is based on the OpenAPI specification which is a standard, language-agnostic interface to RESTful APIs.
Metadata
Release files for openapiart 0.3.44
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| openapiart-0.3.44.tar.gz | 126.2 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| openapiart-0.3.44-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 287.5 kB
Release files / openapiart-0.3.44.tar.gz
| Download URL | openapiart-0.3.44.tar.gz |
|---|---|
| Size | 126.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a0be8cf3bec9dd1edf45572c9ed49d049c14f69233783577a8e319c461c94711
|
|
BLAKE2b-256 checksum How to use checksums |
68f4a4db05f6918279f29c7fa2ce513603795e73e2effc2066ae594f6380b3b5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.25
|
Release files / openapiart-0.3.44-py3-none-any.whl
| Download URL | openapiart-0.3.44-py3-none-any.whl |
|---|---|
| Size | 161.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1f4fe26ad3d8946a32460d5b0fc2a507840791e3c5ae14613f3abe1df0f0146c
|
|
BLAKE2b-256 checksum How to use checksums |
8fd77b784b54f8d6195ce249a11a433ca730f92c4eb1d5ec78d307af43aa40fc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.25
|
Security for openapiart 0.3.44
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.