raffalib.mypickle ================= .. py:module:: raffalib.mypickle Functions --------- .. autoapisummary:: raffalib.mypickle.read_pickle raffalib.mypickle.write_pickle Module Contents --------------- .. py:function:: read_pickle(file: pathlib.Path) Read and decode a jsonpickle-encoded object from a file. :param file: Path to the file to read. :type file: Path :return: The decoded Python object. .. py:function:: write_pickle(data, dir_path: pathlib.Path, file_stem: str) Encode an object with jsonpickle and write it to a timestamped file. The output file is named ``{file_stem}_{YYYY-MM-DD-HH-MM-SS}`` inside ``dir_path``. :param data: The object to encode and write. :param dir_path: Directory in which to write the file. :type dir_path: Path :param file_stem: Stem used to build the output file name. :type file_stem: str :return: None :rtype: None