Liman

loader

attributelogger
= logging.getLogger(__name__)
funcload_specs_from_directoryload_specs_from_directory(directory, /, registry, *, recursive=True, strict=False, patterns=None) -> list[Component[Any]]

Traverse directory recursively and load YAML files, creating corresponding components based on kind.

Args: directory: Directory path to traverse registry: Registry instance for node creation recursive: Whether to traverse subdirectories strict: Whether to enforce strict validation patterns: File patterns to match (default: [".yaml", ".yml"])

Returns: List of loaded components

Raises: YamlLoaderError: When there's an error loading YAML files FileNotFoundError: When directory doesn't exist

paramdirectorystr | Path
paramregistryRegistry
paramrecursivebool
= True
paramstrictbool
= False
parampatternslist[str] | None
= None

Returns

list[Component[Any]]
func_find_yaml_files_find_yaml_files(directory, /, recursive, patterns) -> list[Path]

Find YAML files in directory using multiple patterns.

paramdirectoryPath
paramrecursivebool
parampatternslist[str]

Returns

list[Path]
func_load_nodes_from_yaml_load_nodes_from_yaml(yaml_file, /, registry, strict) -> list[Component[Any]]

Load nodes from a YAML file that may contain single or multiple documents.

paramyaml_filePath
paramregistryRegistry
paramstrictbool

Returns

list[Component[Any]]
func_create_node_from_yaml_data_create_node_from_yaml_data(yaml_data, /, yaml_file, registry, strict) -> Component[Any] | None

Create a node from YAML data.

paramyaml_dataAny
paramyaml_filePath
paramregistryRegistry
paramstrictbool

Returns

Component[Any] | None

Last updated on