modos.io#
Attributes#
Functions#
|
Get a loader based on the file extension using regex. |
|
Load a model of target_class from a file. |
|
Load model specification from file into a list of dictionaries. Model types must be specified as @type |
|
Load one or more model from file. Model types must be specified as @type |
|
Extract metadata from files associated to a model instance |
Module Contents#
- modos.io.get_loader(path)[source]#
Get a loader based on the file extension using regex.
- Parameters:
path (pathlib.Path)
- modos.io.parse_instance(path, target_class)[source]#
Load a model of target_class from a file.
- Parameters:
path (pathlib.Path)
- modos.io.parse_attributes(path)[source]#
Load model specification from file into a list of dictionaries. Model types must be specified as @type
- Parameters:
path (pathlib.Path)
- Return type:
List[dict]
- modos.io.parse_multiple_instances(path)[source]#
Load one or more model from file. Model types must be specified as @type
- Parameters:
path (pathlib.Path)
- Return type:
List
- modos.io.extract_metadata(instance, base_path)[source]#
Extract metadata from files associated to a model instance
- Parameters:
base_path (pathlib.Path)
- Return type:
List