Given a modular path to a function, import that module and return the function.
(whole_function)
| 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 |
no outgoing calls
no test coverage detected