Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

WSGI adapter for AWS API Gateway/Lambda Proxy Integration

Project description

AWSGI allows you to use WSGI-compatible middleware and frameworks like Flask and Django with the AWS API Gateway/Lambda proxy integration.

Installation

awsgi is available from PyPI as aws-wsgi:

pip install aws-wsgi

Example

import awsgi
from flask import (
    Flask,
    jsonify,
)

app = Flask(__name__)


@app.route('/')
def index():
    return jsonify(status=200, message='OK')


def lambda_handler(event, context):
    return awsgi.response(app, event, context, base64_content_types={"image/png"})

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 aws-wsgi, version 0.2.3
Filename, size File type Python version Upload date Hashes
Filename, size aws_wsgi-0.2.3-py2.py3-none-any.whl (4.1 kB) File type Wheel Python version py2.py3 Upload date Hashes View hashes
Filename, size aws-wsgi-0.2.3.tar.gz (3.1 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