Skip to main content

Library to run applications on AWS Lambda Function using Flask

Project description

aws_flask_lambda

Version 0.1.3 updates Flask and werkzeug version requirements to 3.0.3 and updates werkzeug.wrappers import, from base_request.py to request.py

Version 0.1.4 fixes an error when extracting the event['body'] on the AWS environment request, on the environ variable 'wsgi.input'

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


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.4.tar.gz (3.0 kB view details)

Uploaded Source

File details

Details for the file aws_flask_lambda-0.1.4.tar.gz.

File metadata

  • Download URL: aws_flask_lambda-0.1.4.tar.gz
  • Upload date:
  • Size: 3.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.6

File hashes

Hashes for aws_flask_lambda-0.1.4.tar.gz
Algorithm Hash digest
SHA256 b9255d860caf802bf4e43ae2593128b6f265c3f0ff67f1e2ce443684ee570b5c
MD5 79c8149653a595b18a60539b7cdfbc58
BLAKE2b-256 1855e556a8d919c72e275e3e683d4b7b788e646f1386df32a1b8ef687f8b4066

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page