python-aws-dataclasses
Project description
Python-AWS-Dataclasses [WIP]
Python-AWS-Dataclasses provides data-classes for AWS lambda events and other AWS data. The dataclasses are type-annotated, as to allow for full IDE (code completion / IntelliSense) support.
Quickstart
Installation
# using pip
pip install python-aws-dataclasses
# or using pipenv
pipenv install python-aws-dataclasses.git
Usage
Assuming you have a dict of some AWS event (e.g. events passed into your lambda_handler
) use the from_event()
-method and access the objects via the dot-notation.
def lambda_handler(event, context):
# Example 1: Lambda asynchronously invoked via SNS
sns_event = SnsEvent.from_event(event)
print(sns_event.first_record.sns.message)
# Example 2: Lambda asynchronously invoked via S3-Event
s3_event = S3Event.from_event(event)
print(s3_event.first_record.s3.bucket.name)
Contribution
Everyone is free to contribute and submit Pull-Requests.
Misc
Test using tox
tox
Test using setup.py
python setup.py test
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
File details
Details for the file python-aws-dataclasses-0.4.5.tar.gz
.
File metadata
- Download URL: python-aws-dataclasses-0.4.5.tar.gz
- Upload date:
- Size: 31.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.20.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0be8a8209a304f3ecdb1979c21736b19a398bb0e859f3d09c5bafbb9cbe8f323 |
|
MD5 | 52bcd825d584fcbfa981daf122505f84 |
|
BLAKE2b-256 | 80d9c13344aac2f290eba0546564539091e7e7cb837008794ebaa4a274be4c16 |
File details
Details for the file python_aws_dataclasses-0.4.5-py3-none-any.whl
.
File metadata
- Download URL: python_aws_dataclasses-0.4.5-py3-none-any.whl
- Upload date:
- Size: 42.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.20.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2c2d602fba641ec518095b279ea800dc98edaaf702fe8fd310d55608028b1a6e |
|
MD5 | f74662c48e9ff4ee6491590f3c203137 |
|
BLAKE2b-256 | 3d22e837f70af97759e81969cce614f28404f13527e5636f66a6aeec6221f88e |