Skip to main content

Serverless nanoframework for AWS API Gateway and AWS Lambda

Project description

Sippy Cup is an extremely minimalistic Python framework to quickly create serverless applications using AWS API Gateway and AWS Lambda.

Sippy Cup converts the input format sent to an AWS Lambda function by API Gateway into a WSGI environment to provide a set of Werkzeug-based requestand response objects, converting the latter to the return format expected by API Gateway.

It is intended to be similar in use to Python frameworks such as Flask and Chalice, although by design it has a significantly smaller feature set.

Getting started

Installation

Because you will eventually need to create a deployment package, it is highly recommended that you use a virtualenv when using Sippy Cup.

pip install sippycup

Create a simple application

lambda_function.py provides a demo application

# lambda_function.py

from sippycup import SippyCup

app = SippyCup()


@app.route('/hello/<string:name>', methods=['GET', 'POST'])
@app.mimetype('text/plain')
def hello_world(name='World'):
    return 'Hello, {0}!'.format(name)


@app.route('/')
def index():
    return app.request


lambda_handler = app.run

You will the need to create a deployment package and use that to create a new AWS Lambda function.

Finally, set up an API Gateway proxy resource with the lambda proxy integration. It is recommended to create resources on both ‘/’ and ‘/SOMEPREFIX’ unless you don’t need the ‘/’ route.

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

sippycup-0.1.1.tar.gz (4.3 kB view details)

Uploaded Source

File details

Details for the file sippycup-0.1.1.tar.gz.

File metadata

  • Download URL: sippycup-0.1.1.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for sippycup-0.1.1.tar.gz
Algorithm Hash digest
SHA256 bb82bfd53ba308e2a24962d7e899544e05dbe74dbeddba3a7c661460f7e83811
MD5 081379abc53e10405455a40526c4af17
BLAKE2b-256 fe96576e4eded44275a9ef19b20bcbd2919294454282ec919eef736506f510ad

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