Sym AWS Lambda Integration Helpers
Project description
sym-awslambda-py
Python modules to simplify Sym lambda integrations.
Dispatch Configuration
Sym provides a standard dispatch handler that you can use to automatically route Sym messages to the right handler.
First import the dispatch function in your main handler.py
file:
from sym.awslambda.dispatch import dispatch
Then in your Terraform lambda declaration, set handler.dispatch
as your handler
value:
resource "aws_lambda_function" "sym" {
...
handler = "handler.dispatch"
...
}
sym_action decorator
The Sym dispatcher will delegate incoming messages to the appropriate handler based on the sym_action
decorator:
from sym.awslambda.decorators import sym_action
@sym_action("approve")
def approve(approval, context):
print("Target reason:", approval.request.meta.reason)
....
Message types
The messages that sym actions receive are defined as protobufs in the Sym Types repo.
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
Built Distribution
File details
Details for the file sym-awslambda-1.0.1.tar.gz
.
File metadata
- Download URL: sym-awslambda-1.0.1.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0c70ca182faeb1bb99dc5c36d1a9f2ea7c849e539c823d98a33a26511c38ca52 |
|
MD5 | c2e27394229d23e8b31bf02813422b7a |
|
BLAKE2b-256 | c2c54e4b30ccc42ed375c408aeb133555945292b6d50da236307a2916c387aa0 |
File details
Details for the file sym_awslambda-1.0.1-py3-none-any.whl
.
File metadata
- Download URL: sym_awslambda-1.0.1-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6fd1123911bf40c608fd687d0ea0d87f26c5cf12ce3e5e3666d63c62a151aeec |
|
MD5 | 0acc0edac47ce1a7a791f0f6ea48d91a |
|
BLAKE2b-256 | 69ceb856c3d5d84d32b43b78fd767f37217c5a56b2b6174ab992eac822557b3c |