Skip to main content

WSGI compatibility for AWS API Gateway proxy resources

Project description

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


from flask import Flask
import apigwsgi

app = Flask(__name__)

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

When you’re done, remove it with:

$ examples/flask_handler/bin/destroy


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

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for apigwsgi, version 0.1.5
Filename, size File type Python version Upload date Hashes
Filename, size apigwsgi-0.1.5.tar.gz (6.2 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page