Skip to content

Instance method as function name in command line #73

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
ksmoore17 opened this issue Dec 22, 2020 · 0 comments · May be fixed by #74
Open

Instance method as function name in command line #73

ksmoore17 opened this issue Dec 22, 2020 · 0 comments · May be fixed by #74

Comments

@ksmoore17
Copy link
Contributor

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()
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
1 participant