Metadata-Version: 2.1
Name: aws-wsgi
Version: 0.2.2
Summary: WSGI adapter for AWS API Gateway/Lambda Proxy Integration
Home-page: https://github.com/slank/awsgi
Author: Matthew Wedgwood
Author-email: github+awsgi@smacky.org
License: MIT
Keywords: wsgi aws lambda api gateway
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Topic :: Internet :: WWW/HTTP :: HTTP Servers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5

=====
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 <https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-set-up-simple-proxy.html>`_.

Installation
------------

``awsgi`` is available from PyPI as ``aws-wsgi``::

    pip install aws-wsgi

Example
-------

.. code-block:: python

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


