Object
objects.object_model.Object()
Base class for FloodAdapt objects.
Attributes
name :
str
-
Name of the object.
description :
str
(optional
)-
Description of the object.
Methods
Name | Description |
---|---|
load_file | Load object from file. |
save | Save object to disk. |
save_additional | Save additional files to database if the object has any and update attrs to reflect the change in file location. |
load_file
| str | os.PathLike) objects.object_model.Object.load_file(file_path: Path
Load object from file.
Parameters
file_path :
Path
|str
|os
.PathLike
-
Path to the file to load.
save
| str | os.PathLike) objects.object_model.Object.save(toml_path: Path
Save object to disk.
Parameters
toml_path :
Path
|str
|os
.PathLike
-
Path to the file to save.
save_additional
objects.object_model.Object.save_additional(| str | os.PathLike,
output_dir: Path )
Save additional files to database if the object has any and update attrs to reflect the change in file location.
This method should be overridden if the object has additional files.