Skip to content
This repository has been archived by the owner on Aug 15, 2023. It is now read-only.

nathforge/apigwsgi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

APIG WSGI

Makes Python WSGI apps compatible with AWS’ API Gateway proxy resources.

Example

from flask import Flask
import apigwsgi

app = Flask(__name__)

@app.route("/")
def index():
    return "Hello from Flask!"

handler = apigwsgi.Handler(app.wsgi_app)

Full example

Full example including deployment scripts can be found in the examples directory.

To deploy:

$ pip install boto3
$ examples/flask_handler/bin/deploy
[...]
Uploaded Flask example to https://xxxxx.execute-api.us-east-1.amazonaws.com/live/

When you’re done, remove it with:

$ examples/flask_handler/bin/destroy

Limitations

API Gateway doesn’t currently support binary responses, and will fail if your application sends non-unicode data.

See also

About

Run Python WSGI apps on AWS API Gateway

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages