Skip to content
This repository has been archived by the owner on Mar 13, 2024. It is now read-only.
/ awsgi Public archive

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

License

Notifications You must be signed in to change notification settings

slank/awsgi

Repository files navigation

Archived - Please use a fork or alternative

(See Pull Requests and Issues for suggestions)

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published