MCPcopy Index your code
hub / github.com/Miserlou/Zappa / import_module_and_get_function

Method import_module_and_get_function

zappa/handler.py:228–236  ·  view source on GitHub ↗

Given a modular path to a function, import that module and return the function.

(whole_function)

Source from the content-addressed store, hash-verified

226
227 @staticmethod
228 def import_module_and_get_function(whole_function):
229 """
230 Given a modular path to a function, import that module
231 and return the function.
232 """
233 module, function = whole_function.rsplit('.', 1)
234 app_module = importlib.import_module(module)
235 app_function = getattr(app_module, function)
236 return app_function
237
238 @classmethod
239 def lambda_handler(cls, event, context): # pragma: no cover

Callers 2

handlerMethod · 0.95
_process_exceptionMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected