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.
Metadata
Release files for sym-awslambda 1.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| sym-awslambda-1.0.4.tar.gz | 4.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| sym_awslambda-1.0.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.6 kB
Release files / sym-awslambda-1.0.4.tar.gz
| Download URL | sym-awslambda-1.0.4.tar.gz |
|---|---|
| Size | 4.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d877a4aeaebd01915279ffda8342788c357298e0ec4cf32b1ac53790fde16761
|
|
BLAKE2b-256 checksum How to use checksums |
630b8171a2619a837ea55b4ddc7d8195b55344d5e07911ef1267f5021395864e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|
Release files / sym_awslambda-1.0.4-py3-none-any.whl
| Download URL | sym_awslambda-1.0.4-py3-none-any.whl |
|---|---|
| Size | 5.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e6b0ed842559491f2942ac8856535e219a6f31aefa57013d847a7fa9e2af5541
|
|
BLAKE2b-256 checksum How to use checksums |
464caf7cb93a49d5498c3b8220cd5ee47cc687048506db14627b47eb1569df93
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|