Skip to content

Add APIGateway*EventModelV2 to parser #434

Closed
@xpayn

Description

@xpayn

I think that being able to use the parser module with APIGatewayV2 would be a nice little ergonomic improvement.
today my code looks like:

def lambda_handler(event: Dict[str, Any], context: LambdaContext) -> Dict[str, Any]:
    event: APIGatewayProxyEventV2 = APIGatewayProxyEventV2(event)
    ...

It's not a big diffence but I think it looks better like this

@event_parser(model=APIGatewayProxyEventModelV2)
def lambda_handler(event: APIGatewayProxyEventModelV2, context: LambdaContext) -> Dict[str, Any]:
    ...

If you accept PR and I have some spare time, I'll try to make something.
Thx

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions