paya.util.modules#
Utilities for managing modules.
- path_to_dotpath(path)#
Given a file system path to a module file, returns the dot-path to be used in import statements.
__init__.py
files must be present.
- class LazyModule(moduleName)#
Lazy module loader. Defers module loading until attribute access is attempted. Useful for avoiding circular imports.
- Example
r = LazyModule('paya.runtime') r.ls() # triggers load