Session.set_from_file

Session.set_from_file(key, filepath, name=None, default=None)

Set a key with the (named) value loaded from a file.

Parameters:
keystr

The session key.

filepathstr or Path

The source file.

namestr, optional

The name of the value in the source file.

defaultAny, optional

The default value.

Returns:
Any

The value.