Harpsichord1207 / awsgi

A WSGI gateway for the AWS API Gateway/Lambda proxy integration

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AWSGI

A WSGI adapter for AWS API Gateway/Lambda Proxy Integration

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"})

About

A WSGI gateway for the AWS API Gateway/Lambda proxy integration

License:MIT License


Languages

Language:Python 98.3%Language:Makefile 1.7%