Python3.7+ module to make Flask compatible with AWS Lambda
Project description
Python 3.7+ Only
For older versions of python use the original flask-lambda library which this code is adapted from: https://github.com/sivel/flask-lambda
See this example flask project for how to use and deploy a flask app using this library: https://github.com/techjacker/flask-lambda-example
Installation
pip install flask-lambda-python37
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
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
Built Distribution
Close
Hashes for flask-lambda-python37-0.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | ccd0790c88fc409588ba987dbc72ad86e6d73a9b8e5a3941c9bada078f93b38d |
|
MD5 | 97841151672e0b5e355ef2cf42454c4c |
|
BLAKE2b-256 | 4e1c06d6fbb9e618a880b2bb2e7a21986dda2be86a671e50e7891e516613cf7d |
Close
Hashes for flask_lambda_python37-0.0.1-py36-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fae78ecb7cb42474e9161c826f922396774f58bf8612edcc3b81ffd4643eda16 |
|
MD5 | fea2d0e5a34b5ab15a9fcb6c6962daa7 |
|
BLAKE2b-256 | a0ca6e1ebf4c97d435240f07b42d86f53ddcafa2431c10daa27efe34ffbc1851 |