add example

This commit is contained in:
Daniel 2023-12-11 00:09:28 +01:00
parent 744a017eed
commit fed7d27136

View file

@ -91,6 +91,13 @@ class Coordinator:
def create_runner_dict(recipes_dir: Path) -> dict[str, type[Runner]]:
"""Creates a dictionary holding all the RunnerClasses that can be discovered in recipes_dir
example:
RUNNER_DICT: dict[str, type["Runner"]] = {
"authentik": RunnerAuthentik,
"wordpress": RunnerWordpress,
"nextcloud": RunnerNextcloud,
}
The Runner classes are automatically imported with importlib. The imports are successful
because recipes_dir is added to sys.path.
"""