LazyLoadSession
- class compas_session.lazyload.LazyLoadSession(*, name=None, basedir=None, scene=None, settings=None, depth=None, delete_existing=False)
Bases:
object
Class representing a data session that can be identified by its name.
The class is implemented such that each named instance is a singleton. This means that during the lifetime of a program only one instance with a specific can exist, and that all sessions created with the same name, refer to the same session object instance.
- Parameters:
- namestr
The name of the unique object instance.
- basedirstr or Path-like, optional
A “working” directory that serves as the root for storing (temporary) session data.
- Raises:
- SessionError
If no name is provided.
Methods
Clear session history.
Create all directories.
Remove all directories.
Dump the data of the current session into a session directory.
Dump the session history.
Dump the current scene to the corresponding session file.
Dump the current settings to the corresponding session file.
Dump the current tolerance setting to the corresponding session file.
Return the value for key if key is in the session, else return default or None.
Load the session history.
Load the scene from the corresponding session file, if it exists.
Load the settings from the corresponding session file, if it exists.
Load the tolerance from the corresponding session file, if it exists.
Record the current state of the session into session history.
Move one step forward in recorded session history.
Insert key in the session, and assign value to it.
Return the value of key in the session.
Move one step backward in recorded session history.