Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ksmoore17
Copy link
Contributor

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

Copy link
Collaborator

@freedomofkeima freedomofkeima left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, thank you for the pull request!

Sorry for the late reply... So far it looks good, could you also update the README file about this specific usage?

Thank you!

@ksmoore17
Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Instance method as function name in command line
2 participants