pyfileconf.plugin package¶
Submodules¶
pyfileconf.plugin.default_hooks module¶
Default behavior to be run on hooks
-
pyfileconf.plugin.default_hooks.
pyfileconf_iter_get_cases
(config_updates, runner)[source]¶ Collect user passed casses by section path str then call itertools.product to produce the cases
-
pyfileconf.plugin.default_hooks.
pyfileconf_iter_update_for_case
(case, runner)[source]¶ Called in PipelineManager.run_iter and IterativeRunner to take the case containing all the updates and actually run the updates, before running this case.
pyfileconf.plugin.hookspecs module¶
Contains the hooks which may be attached to in creating plugins
-
pyfileconf.plugin.hookspecs.
pyfileconf_iter_get_cases
(config_updates, runner)[source]¶ Called in PipelineManager.run_iter and IterativeRunner to take the user passed config updates and return the config cases to be run
-
pyfileconf.plugin.hookspecs.
pyfileconf_iter_modify_cases
(cases, runner)[source]¶ Called in PipelineManager.run_iter and IterativeRunner to take the collected config cases to be run and modify them in place.
-
pyfileconf.plugin.hookspecs.
pyfileconf_iter_update_for_case
(case, runner)[source]¶ Called in PipelineManager.run_iter and IterativeRunner to take the case containing all the updates and actually run the updates, before running this case.
-
pyfileconf.plugin.hookspecs.
pyfileconf_post_config_changed
(manager, new_config, updates, section_path_str)[source]¶ Called just after a config changes, regardless of whether the change is due to update, reset, or refresh.
- Parameters
- Return type
None
- Returns
None
- Notes
Only called if the action actually modified the config
-
pyfileconf.plugin.hookspecs.
pyfileconf_post_run
(results, runner)[source]¶ Called at the end of PipelineManager.run. Can optionally return additional results which will be appended to the results list. If results is mutable then it can also be modified in place.
-
pyfileconf.plugin.hookspecs.
pyfileconf_post_update
(pm, d_, section_path_str, kwargs)[source]¶ Called at the end of PipelineManager.update.
- Parameters
- Returns
None
- Notes
This is not called at the end of PipelineManager.update_batch, for that use
pyfileconf_post_update_batch()
-
pyfileconf.plugin.hookspecs.
pyfileconf_post_update_batch
(pm, updates)[source]¶ Called at the end of PipelineManager.update_batch.
- Parameters
pm¶ (PipelineManager) – The manager responsible for the run
updates¶ (
Iterable
[dict
]) – iterable of dictionaries of config updates
- Returns
None
-
pyfileconf.plugin.hookspecs.
pyfileconf_pre_config_changed
(manager, orig_config, updates, section_path_str)[source]¶ Called just before a config changes, regardless of whether the change is due to update, reset, or refresh.
- Parameters
manager¶ (ConfigManager) – the config manager in which the changing config resides
orig_config¶ (ConfigBase) – the original config, before any changes
updates¶ (
Dict
[str
,Any
]) – the updates which will be made to the configsection_path_str¶ (
str
) – the section path string which can be used to look up the config
- Return type
None
- Returns
None
- Notes
Only called if the action would actually modify the config
-
pyfileconf.plugin.hookspecs.
pyfileconf_pre_run
(section_path_str_or_list, pm)[source]¶ Called at the beginning of PipelineManager.run. Can optionally return additional section paths to run. If section_path_str_or_list is a list then it can also be modified in place.
- Parameters
section_path_str_or_list¶ (
Union
[str
,List
[str
],ForwardRef
,List
[ForwardRef
]]) – section paths which were passed to PipelineManager.runpm¶ (PipelineManager) – The manager responsible for the run
- Return type
Union
[str
,List
[str
],ForwardRef
,List
[ForwardRef
],None
]- Returns
additional sections/functions to run, if any
-
pyfileconf.plugin.hookspecs.
pyfileconf_pre_update
(pm, d_, section_path_str, kwargs)[source]¶ Called at the beginning of PipelineManager.update. Can optionally return a dictionary of updates which will be used to update the passed dictionary. Can also modify the passed dictionaries in place.
- Parameters
- Return type
- Returns
optional updates to config updates
- Notes
This is not called at the beginning of PipelineManager.update_batch, for that use
pyfileconf_pre_update_batch()