Skip to main content

openapiart - OpenAPI Artifact Generator

CICD Project Status: Active – The project has reached a stable, usable state and is being actively developed. python license

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 .proto file from the openapi file
  • optionally generates a static redocly documentation file
  • optionally generates a python ux sdk from the openapi file
  • optionally generates a go ux sdk from 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.

Modeling guide specific to this package

Metadata

Release files for openapiart 0.3.45

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for openapiart 0.3.45
File Size Uploaded Provenance Actions
openapiart-0.3.45.tar.gz 126.8 kB Without provenance Details for openapiart-0.3.45.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for openapiart 0.3.45
File Interpreter ABI Platform Actions
openapiart-0.3.45-py3-none-any.whl Python 3 none any Details for openapiart-0.3.45-py3-none-any.whl

Total release size: 288.7 kB

Release files / openapiart-0.3.45.tar.gz

Download URL openapiart-0.3.45.tar.gz
Size 126.8 kB
Tags Source
SHA-256 checksum
How to use checksums
fd39b5627a7b4ae8c468a4fddcd6f32d9fbe7203aff1db704a6f7dc65403a7c1
BLAKE2b-256 checksum
How to use checksums
1d00707b4e5772aa76d83b6f900dab1265e229f38e1dd1426ed952443dcdc688
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.22

Release files / openapiart-0.3.45-py3-none-any.whl

Download URL openapiart-0.3.45-py3-none-any.whl
Size 161.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
aefe2e169954cb67c84a199350253764c19b4f177c03871fb4f9aadbf717c109
BLAKE2b-256 checksum
How to use checksums
73bd0016403ac1b7c96f9e646f18165c02c21eb2b26e100ead4b14e42443fdb4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.22

Security for openapiart 0.3.45

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.

Release history Release notifications | RSS feed

This release

0.3.45 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page