Saving and Loading Objects/Models

Saving objects to file

pykitml.save(object_, file_name)

Saves an object into a file.

Parameters:
  • object (object) – The object to save
  • file_name (str) – The name of the file to save the object in.
Raises:

OSError – If the file cannot be created due to a system-related error.

Loading objects from file

pykitml.load(file_name)

Loads an object from file.

Parameters:file_name (str) – The name of the file to load the object from.
Returns:The python object stored in the file.
Return type:object
Raises:FileNotFoundError – If the file does not exist.