Skip to main content

Python3.6+ module to make Flask compatible with AWS Gateway and AWS Load Balancer

Project description

Python 3.6+ Only

Installation

pip install flask-lambda-python3.6-lb

Usage

Here is an example of what my_python_file.py would look like:

from flask_lambda import FlaskLambda

app = FlaskLambda(__name__)


@app.route('/foo', methods=['GET', 'POST'])
def foo():
    data = {
        'form': request.form.copy(),
        'args': request.args.copy(),
        'json': request.json
    }
    return (
        json.dumps(data, indent=4, sort_keys=True),
        200,
        {'Content-Type': 'application/json'}
    )


if __name__ == '__main__':
    app.run(debug=True)

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 flask-lambda-python36-lb, version 0.6.0
Filename, size File type Python version Upload date Hashes
Filename, size flask_lambda_python36_lb-0.6.0-py36-none-any.whl (7.8 kB) File type Wheel Python version py36 Upload date Hashes View
Filename, size flask-lambda-python36-lb-0.6.0.tar.gz (3.3 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page