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

objects.object_model.Object.load_file(file_path: Path | str | os.PathLike)

Load object from file.

Parameters

file_path : Path | str | os.PathLike

Path to the file to load.

save

objects.object_model.Object.save(toml_path: Path | str | os.PathLike)

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(
    output_dir: Path | str | os.PathLike,
)

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.

Back to top