python-lambda-local icon indicating copy to clipboard operation
python-lambda-local copied to clipboard

Add support for method on instance as function name with '.' separator syntax

Open ksmoore17 opened this issue 4 years ago • 1 comments

This allows providing instance.method to the -f flag to indicate that the function is nested in another object.

It could also allow multiple levels of nesting as it loops into the '.' separated names to resolve the object.

Resolves #73

ksmoore17 avatar Dec 22 '20 02:12 ksmoore17

Sorry for ghosting. I've worked with this more and I don't think it's a good pattern. Specifically, the python extension for the serverless framework implements similar behavior, except that it will go into nested modules, but not into nested python objects. I think this library handles that.

Either way I've found that a more standard approach just forwards the invocation from a handler.py type file to the desired method, if anyone is interested in doing something similar with grouping lambdas' handling logic in a python class.

ksmoore17 avatar Jan 17 '21 03:01 ksmoore17