cellmap_flow.utils.load_py
Attributes
Classes
Functions
|
Analyzes the script at filepath using ast for potentially unsafe imports and function calls. |
|
Loads the configuration script at config_path after verifying its safety. |
Module Contents
- cellmap_flow.utils.load_py.DISALLOWED_IMPORTS
- cellmap_flow.utils.load_py.DISALLOWED_FUNCTIONS
- cellmap_flow.utils.load_py.analyze_script(filepath)
Analyzes the script at filepath using ast for potentially unsafe imports and function calls. Returns a boolean indicating whether the script is safe and a list of detected issues.
- cellmap_flow.utils.load_py.load_safe_config(config_path, force_safe=os.getenv('FORCE_SAFE_CONFIG', False))
Loads the configuration script at config_path after verifying its safety. If force_safe is True, raises an error if the script is deemed unsafe.
- class cellmap_flow.utils.load_py.Config(**kwargs)