Skip to content

Instance method as function name in command line #73

Open
@ksmoore17

Description

@ksmoore17

I have defined my lambda function handler as a method on a class. The py file that I want to use as the handler creates an instance of this class.

I want to be able to invoke that method like:
python-lambda-local -f instance.method handler.py event.json

handler.py
class LambdaClass:
    def lambda_method(self, event, context):
        ... do stuff

instance = LambdaClass()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions