Name | openapiart JSON |
Version |
0.3.32
JSON |
| download |
home_page | None |
Summary | The OpenAPI Artifact Generator Python Package |
upload_time | 2025-09-13 06:53:20 |
maintainer | None |
docs_url | None |
author | None |
requires_python | <4,>=3.7 |
license | None |
keywords |
testing
openapi
artifact
generator
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# openapiart - OpenAPI Artifact Generator
[](https://github.com/open-traffic-generator/openapiart/actions)
[](https://www.repostatus.org/#active)
[](https://pypi.python.org/pypi/openapiart)
[](https://en.wikipedia.org/wiki/MIT_License)
The `OpenAPIArt` (OpenAPI Artifact Generator) python package does the following:
- pre-processes OpenAPI yaml files according to the [MODELGUIDE](../main/MODELGUIDE.md)
- using the path keyword bundles all dependency OpenAPI yaml files into a single openapi.yaml file
- post-processes any [MODELGUIDE](../main/MODELGUIDE.md) 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
```python
"""
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](
https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.3.md)
which is a standard, language-agnostic interface to RESTful APIs.
> [Modeling guide specific to this package](../main/MODELGUIDE.md)
Raw data
{
"_id": null,
"home_page": null,
"name": "openapiart",
"maintainer": null,
"docs_url": null,
"requires_python": "<4,>=3.7",
"maintainer_email": null,
"keywords": "testing, openapi, artifact, generator",
"author": null,
"author_email": "Keysight Technologies <andy.balogh@keysight.com>",
"download_url": "https://files.pythonhosted.org/packages/b6/43/e3d23febcaf2878c9dc8a7330d5e14304e1402dcfe57c851543fa4fec7b9/openapiart-0.3.32.tar.gz",
"platform": null,
"description": "# openapiart - OpenAPI Artifact Generator\n\n[](https://github.com/open-traffic-generator/openapiart/actions)\n[](https://www.repostatus.org/#active)\n[](https://pypi.python.org/pypi/openapiart)\n[](https://en.wikipedia.org/wiki/MIT_License)\n\nThe `OpenAPIArt` (OpenAPI Artifact Generator) python package does the following:\n- pre-processes OpenAPI yaml files according to the [MODELGUIDE](../main/MODELGUIDE.md)\n- using the path keyword bundles all dependency OpenAPI yaml files into a single openapi.yaml file\n- post-processes any [MODELGUIDE](../main/MODELGUIDE.md) extensions\n- validates the bundled openapi.yaml file\n- generates a `.proto` file from the openapi file\n- optionally generates a static redocly documentation file \n- optionally generates a `python ux sdk` from the openapi file\n- optionally generates a `go ux sdk` from the openapi file\n\n## Getting started\nInstall the package\n```\npip install openapiart\n```\n\nGenerate artifacts from OpenAPI files\n```python\n\"\"\" \nThe following command will produce these artifacts:\n - ./artifacts/openapi.yaml\n - ./artifacts/openapi.json\n - ./artifacts/openapi.html\n - ./artifacts/sample.proto\n - ./artifacts/sample/__init__.py\n - ./artifacts/sample/sample.py\n - ./artifacts/sample/sample_pb2.py\n - ./artifacts/sample/sample_pb2_grpc.py\n - ./pkg/openapiart.go\n - ./pkg/go.mod\n - ./pkg/go.sum\n - ./pkg/sanity/sanity_grpc.pb.go\n - ./pkg/sanity/sanity.pb.go\n\"\"\"\nimport openapiart\n\n# bundle api files\n# validate the bundled file\n# generate the documentation file\nart = openapiart.OpenApiArt(\n api_files=[\n \"./openapiart/tests/api/info.yaml\",\n \"./openapiart/tests/common/common.yaml\",\n \"./openapiart/tests/api/api.yaml\",\n ],\n artifact_dir=\"./artifacts\",\n protobuf_name=\"sanity\",\n extension_prefix=\"sanity\",\n)\n\n# optionally generate a python ux sdk and python protobuf/grpc stubs\nart.GeneratePythonSdk(\n package_name=\"sanity\"\n)\n\n# optionally generate a go ux sdk and go protobuf/grpc stubs\nart.GenerateGoSdk(\n package_dir=\"github.com/open-traffic-generator/openapiart/pkg\", \n package_name=\"openapiart\"\n)\n```\n\n## Specifications\n> This repository is based on the [OpenAPI specification](\nhttps://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.3.md) \nwhich is a standard, language-agnostic interface to RESTful APIs. \n\n> [Modeling guide specific to this package](../main/MODELGUIDE.md)\n\n\n",
"bugtrack_url": null,
"license": null,
"summary": "The OpenAPI Artifact Generator Python Package",
"version": "0.3.32",
"project_urls": {
"Repository": "https://github.com/open-traffic-generator/openapiart"
},
"split_keywords": [
"testing",
" openapi",
" artifact",
" generator"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "bfd606837c4b4a548b3ee668ba816308749f124782c99ad0e8e1c442f458caea",
"md5": "441edb1ce8287d8d51a77c5f3dfcdfbc",
"sha256": "9c351a91f4a5890e13983df2e7c750dafdc2581da963c273d475c55cf82bb0c9"
},
"downloads": -1,
"filename": "openapiart-0.3.32-py3-none-any.whl",
"has_sig": false,
"md5_digest": "441edb1ce8287d8d51a77c5f3dfcdfbc",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4,>=3.7",
"size": 153372,
"upload_time": "2025-09-13T06:53:18",
"upload_time_iso_8601": "2025-09-13T06:53:18.810955Z",
"url": "https://files.pythonhosted.org/packages/bf/d6/06837c4b4a548b3ee668ba816308749f124782c99ad0e8e1c442f458caea/openapiart-0.3.32-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "b643e3d23febcaf2878c9dc8a7330d5e14304e1402dcfe57c851543fa4fec7b9",
"md5": "5cc941a7c2627c16189f28b822e4850d",
"sha256": "d8267d3b6131606de130c03cc009ded9b8452c0966e0a9dc287af33211c1aade"
},
"downloads": -1,
"filename": "openapiart-0.3.32.tar.gz",
"has_sig": false,
"md5_digest": "5cc941a7c2627c16189f28b822e4850d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4,>=3.7",
"size": 120596,
"upload_time": "2025-09-13T06:53:20",
"upload_time_iso_8601": "2025-09-13T06:53:20.499989Z",
"url": "https://files.pythonhosted.org/packages/b6/43/e3d23febcaf2878c9dc8a7330d5e14304e1402dcfe57c851543fa4fec7b9/openapiart-0.3.32.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-09-13 06:53:20",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "open-traffic-generator",
"github_project": "openapiart",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "openapiart"
}