aws_lambda_decorators/decorators.py
def extract_from_event(parameters, group_errors=False, allow_none_defaults=False):
    """
    Extracts a set of parameters from the event dictionary in a lambda handler.

    The extracted parameters are added as kwargs to the handler function.

    Usage:
        @extract_from_event([Parameter(path="/body[json]/my_param")])
        def lambda_handler(event, context, my_param=None)
            pass

    Args:
        parameters (list): A collection of Parameter type items.
        group_errors (bool): flag that indicates if error messages are to be grouped together
            (if set to False, validation will end on first error)
    """
    for param in parameters:
        param.func_param_name = "event"
    return extract(parameters, group_errors, allow_none_defaults)

    Extracts a set of parameters from the event dictionary in a lambda handler.

    The extracted parameters are added as kwargs to the handler function.

    Usage:
        @extract_from_event([Parameter(path="/body[json]/my_param")])
        def lambda_handler(event, context, my_param=None)
            pass

    Args:
        parameters (list): A collection of Parameter type items.
        group_errors (bool): flag that indicates if error messages are to be grouped together
            (if set to False, validation will end on first error)
    
Extracts a set of parameters from the event dictionary in a lambda handler.
The extracted parameters are added as kwargs to the handler function.


Extracts a set of parameters from the event dictionary in a lambda handler . The extracted parameters are added as kwargs to the handler function .
def extract_from_event(parameters, group_errors=False, allow_none_defaults=False):
    for param in parameters:
        param.func_param_name = "event"
    return extract(parameters, group_errors, allow_none_defaults)
def extract_from_event ( parameters , group_errors = False , allow_none_defaults = False ) : for param in parameters : param . func_param_name = "event" return extract ( parameters , group_errors , allow_none_defaults )
Extracts a set of parameters from the event dictionary in a lambda handler.
Extracts a set of parameters from the event dictionary in a lambda handler .
"""
    Extracts a set of parameters from the event dictionary in a lambda handler.

    The extracted parameters are added as kwargs to the handler function.

    Usage:
        @extract_from_event([Parameter(path="/body[json]/my_param")])
        def lambda_handler(event, context, my_param=None)
            pass

    Args:
        parameters (list): A collection of Parameter type items.
        group_errors (bool): flag that indicates if error messages are to be grouped together
            (if set to False, validation will end on first error)
    """
parameters
A collection of Parameter type items.
A collection of Parameter type items .
group_errors
flag that indicates if error messages are to be grouped together
(if set to False, validation will end on first error)
flag that indicates if error messages are to be grouped together ( if set to False validation will end on first error )
allow_none_defaults