open_pickle#

open_pickle(filename: Path, expected_type: Type[_T]) _T[source]#
open_pickle(filename: Path, expected_type: NoCheck = NoCheck.TOKEN) Any

Load information from a pickle

Parameters:
  • filename (Path) – Pickle to read

  • expected_type (Any) – Optional type to validate the data read from

Raises:

TypeError – if there is a type mismatch

Return type:

Any

Returns:

Information read