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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
aws-wsgi-0.2.1.tar.gz
(3.1 kB
view hashes)
Built Distribution
Close
Hashes for aws_wsgi-0.2.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 76621f21bd165c77d0a59b6161c295ed6f68cada2cdfb95e3b5f91a3e1248cb9 |
|
MD5 | e29122c9cdec28aef0c3b3c050bf4da7 |
|
BLAKE2b-256 | c4a4ad99c2f1ef032e518573dd500256bf72f06c47d5ae7652a142dba4473c44 |