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.2.tar.gz
(2.9 kB
view hashes)
Built Distribution
Close
Hashes for aws_flask_lambda-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5663ef0eb1ef390575729a4ebc688223c2e90f48e73eb7b242ca63341740fc82 |
|
MD5 | e79e70afe61cd77a73da29401753c54e |
|
BLAKE2b-256 | cb77aa8274684caad93bd9fba2c1b69c7f41cdb62f75c1d105af9da4b897a273 |