Library to run applications on AWS Lambda Function using Flask
Project description
aws_flask_lambda
Installation
Install the package using pip:
pip install aws-flask-lambda
Usage
from aws_flask_lambda import FlaskLambda
from flask import request, jsonify
app = FlaskLambda(__name__)
@app.route('/greet', methods=['GET', 'POST'])
def greet():
name = request.form.get('name', 'World')
message = f'Hello, {name}!'
return (
jsonify({'message': message}),
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
aws_flask_lambda-0.1.1.tar.gz
(1.6 kB
view hashes)
Built Distribution
Close
Hashes for aws_flask_lambda-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6e04dc356c4697424b9aec132ab14e6c9188c2b978bb00278991f93224712d90 |
|
MD5 | fe89a41e7253d3e07bd6691628cff703 |
|
BLAKE2b-256 | ec82d135bd60ca3360dbd5370d8b4c3d55e69624c60cb079c64b52d8d9cc976e |