Python Imports¶
Dynamic imports¶
- lazy loading
- in backend-core, import the corresponding client module
- defined in Django settings
from importlib import import_module
module = import_module("module_name")
# example
module = import_module(settings.DASHBOARD_SERVICES)
Trivia¶
- it won't import
_fn_name()
- unless there's an
__all__ = ["_fn_name"]
- unless there's an
you really shouldn't use wildcard *
Last update:
2023-04-24