Skip to content

Home

Manager for the WARP cache directory. Useful for creating new sessions and for getting file/dir paths relative to the session.

Examples:

Get the path to the cache directory associated with a session_id.

session_id = 'DEV'
home = Home(session_id=session_id)
home()  

session_dir: str property readonly

Get the unique subdirectory associated with the current run. Create the session directory if not yet initialized.

__call__(self, relpath) special

Return the os.path.join of relpath with the WARP cache directory of the current session.

__init__(self, path, session_id=None) special

Parameters:

Name Type Description Default
path str

(Deprecated) Path to the WARP cache directory.

required
session_id Optional[str]

The name of the session to create or load.

None

is_valid_session_id(self, session_id)

Returns True if session_id has been used.

Parameters:

Name Type Description Default
session_id str

The name of the session.

required