Skip to main content

Build Status Coverage Status Python Version

oai-sam is a script generating a SAM template together with OpenAPI documentation including AWS OpenAPI extensions from an OpenAPI/swagger documentation.

Simply provide your OpenApi/Swagger as an input and then use SAM CLI to deploy a working AWS ApiGateway.

Install

pip install oai-sam

Usage

Generate

oai-sam -f <OPENAPI_DOCS> -u <BACKEND_URL> -c <CORS_ORIGINS>

e.g:

oai-sam -f https://petstore.swagger.io/v2/swagger.json -u http://petstore.swagger.io/v2 -c "*"

Deploy AWS ApiGateway

  • Install SAM CLI
  • sam package --template-file out/apigateway.yaml --s3-bucket <SAM_BUCKET> --output-file packaged.yaml (See sam package for more options)
  • sam deploy --template-file packaged.yaml (See sam deploy for more options)

Show list of available arguments

oai-sam --help

Metadata

Release files for oai-sam 0.0.1

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

Source distribution (sdist)

Source distribution for oai-sam 0.0.1
File Size Uploaded
oai-sam-0.0.1.tar.gz 14.5 kB Details

Release files / oai-sam-0.0.1.tar.gz

Download URL oai-sam-0.0.1.tar.gz
Size 14.5 kB
Tags Source
SHA-256 checksum
How to use checksums
1b59eb04745bf20e92e7c02ad19a375a892cdaeeb77d0b9aef21a08dfc41a213
BLAKE2b-256 checksum
How to use checksums
b000656a130c208c0942593ab8aa84f7a511639e7d8e26e5d8308542d696d229
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.8.0

Release history Release notifications | RSS feed

This release

0.0.1 This release

1 release file

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