Tools for making serverless apps easier
Project description
easy-serverless
Easy serverless is a set of tools designed to make writing serverless code easier. So far its just a wrapper for AWS Lambda functions, designed to make writing them easier and more pythonic.
from easy_serverless.aws import easy_lambda
def hello(first_name, last_name=""):
message = f'Hello {first_name} {last_name}!'.strip()
return {'message': message}
lambda_handler = easy_lambda(hello, unpack_lists=True)
Just point AWS to the lambda_handler variable instead of the hello function and that's it.
easy_lambda handles unpacking the arguments from the lambda event into your function so you don't have to write
a bunch of boilerplate code to handle it. The following inputs to the lambda function will all work correctly.
{first_name: "John", last_name: "Doe"}
>>> {'message': "Hello John Doe!"}
{first_name: "John"}
>>> {'message': "Hello John!"}
"John"
>>> {'message': "Hello John!"}
["John", Doe]
>>> {'message': "Hello John Doe!"}
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file easy_serverless-1.0.0.tar.gz.
File metadata
- Download URL: easy_serverless-1.0.0.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.8.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2a5857d3ea0309bc41d46d4bcc8d7430e85496aedd6b6d0a517fcbb4a77e13ad
|
|
| MD5 |
7b438756fbfc9eced2c030eeefe8fa5d
|
|
| BLAKE2b-256 |
b3c4fabca94cbb7fdf8ffbcbbeec88659aaa600be97c2912b52b0ea9e3989c22
|
File details
Details for the file easy_serverless-1.0.0-py3-none-any.whl.
File metadata
- Download URL: easy_serverless-1.0.0-py3-none-any.whl
- Upload date:
- Size: 5.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.8.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d403fe1cee739e3662bf17644fb0f2974b7e9e5c1df072cd7a7f2d50e904e38f
|
|
| MD5 |
6bb1cedb3176418ad4d1fe778fc75c1f
|
|
| BLAKE2b-256 |
1d2dfc7786cc47a89297da42f4076f35d499710df769f2ef080c59449919b00c
|