Metadata-Version: 2.1
Name: aws-lambda-event
Version: 0.0.1
Summary: Class Interface for AWS Lambda event.
Home-page: https://github.com/MacHu-GWU/
Author: Sanhe Hu
Author-email: husanhe@gmail.com
Maintainer: Unknown
License: MIT
Download-URL: https://pypi.python.org/pypi/aws_lambda_event/0.0.1#downloads
Platform: Windows
Platform: MacOS
Platform: Unix
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: MacOS
Classifier: Operating System :: Unix
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
License-File: LICENSE.txt
License-File: AUTHORS.rst
Requires-Dist: attrs
Requires-Dist: attrs-mate
Provides-Extra: docs
Requires-Dist: sphinx (==4.3.0) ; extra == 'docs'
Requires-Dist: sphinx-inline-tabs (==2021.8.17b10) ; extra == 'docs'
Requires-Dist: sphinx-jinja (==1.1.1) ; extra == 'docs'
Requires-Dist: sphinx-copybutton (==0.4.0) ; extra == 'docs'
Requires-Dist: rstobj (==0.0.7) ; extra == 'docs'
Requires-Dist: docfly (==1.0.2) ; extra == 'docs'
Requires-Dist: furo (==2021.8.31) ; extra == 'docs'
Provides-Extra: tests
Requires-Dist: pytest ; extra == 'tests'
Requires-Dist: pytest-cov ; extra == 'tests'

.. image:: https://github.com/MacHu-GWU/aws_lambda_event-project/workflows/CI/badge.svg
    :target: https://github.com/MacHu-GWU/aws_lambda_event-project/actions?query=workflow:CI

.. image:: https://codecov.io/gh/MacHu-GWU/aws_lambda_event-project/branch/master/graph/badge.svg
    :target: https://codecov.io/gh/MacHu-GWU/aws_lambda_event-project

.. image:: https://img.shields.io/pypi/v/aws_lambda_event.svg
    :target: https://pypi.python.org/pypi/aws_lambda_event

.. image:: https://img.shields.io/pypi/l/aws_lambda_event.svg
    :target: https://pypi.python.org/pypi/aws_lambda_event

.. image:: https://img.shields.io/pypi/pyversions/aws_lambda_event.svg
    :target: https://pypi.python.org/pypi/aws_lambda_event

.. image:: https://img.shields.io/badge/STAR_Me_on_GitHub!--None.svg?style=social
    :target: https://github.com/MacHu-GWU/aws_lambda_event-project

------

.. image:: https://img.shields.io/badge/Link-Install-blue.svg
    :target: `install`_

.. image:: https://img.shields.io/badge/Link-GitHub-blue.svg
    :target: https://github.com/MacHu-GWU/aws_lambda_event-project

.. image:: https://img.shields.io/badge/Link-Submit_Issue-blue.svg
    :target: https://github.com/MacHu-GWU/aws_lambda_event-project/issues

.. image:: https://img.shields.io/badge/Link-Request_Feature-blue.svg
    :target: https://github.com/MacHu-GWU/aws_lambda_event-project/issues

.. image:: https://img.shields.io/badge/Link-Download-blue.svg
    :target: https://pypi.org/pypi/aws_lambda_event#files


Welcome to ``aws_lambda_event`` Documentation
==============================================================================

This library provides Python Class interface, attribute auto-complete, type hint for AWS Lambda Events.

Example:

.. code-block:: python

    # An example lambda handler python module
    import aws_lambda_event

    # example S3 Put event
    def handler(event, context):
        event_obj = aws_lambda_event.S3PutEvent(**event)

        for record in event_obj.records:
            # access attribute
            _ = record.eventTime

            # important attributes quick access alias
            _ = record.bucket
            _ = record.key
            _ = record.etag
            _ = record.size
            ...


You can find the event JSON schema in two place:

1. AWS Lambda Event Source Mapping Official Document: https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventsourcemapping.html
2. Goto AWS Lambda Function Console -> Create Test Event -> Choose from Event template


.. _install:

Install
------------------------------------------------------------------------------

``aws_lambda_event`` is released on PyPI, so all you need is:

.. code-block:: console

    $ pip install aws_lambda_event

To upgrade to latest version:

.. code-block:: console

    $ pip install --upgrade aws_lambda_event

