Skip to content

Alphorn is a simple Python package to handle Lambda invocations routed by the AWS API Gateway

Notifications You must be signed in to change notification settings

deep-ventures/alphorn

Repository files navigation

Another Lambda Python Horrible Router Naivety

Build Status codecov

Alphorn is a simple Python package to handle Lambda invocations routed by the AWS API Gateway with a {proxy+} configuration.

This package takes free inspiration (read: steals code) from Chalice and Lambdarest but only attempts to implement routing functionalities, hence having a naive approach, remaining very simple, and probably lacking loads of features.

How to use

define your lambda.py file as below, and configure your AWS lambda handler to be lambda.run

from alphorn import Alphorn

app = Alphorn()

@app.route('/sample/{greeting}')
def sample(greeting):
    return {
        'message': str(greeting),
    }

def run(event, context):
    """lambda handler
    """
    return app.handle(event)

About

Alphorn is a simple Python package to handle Lambda invocations routed by the AWS API Gateway

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published