module documentation

Pickle file loading and saving.

Exception LoadPickleError Errors when loading a pickled pytd file.
Function LoadPickle Undocumented
Function SavePickle Pickle the data.
Function StoreAst Loads and stores an ast to disk.
Function _LoadPickle Load a pickle file, raising a custom exception on failure.
Constant _PICKLE_RECURSION_LIMIT_AST Undocumented
def LoadPickle(filename, compress=False, open_function=open): (source)

Undocumented

def SavePickle(data, filename=None, compress=False, open_function=open): (source)

Pickle the data.

def StoreAst(ast, filename=None, open_function=open, src_path=None, metadata=None): (source)

Loads and stores an ast to disk. Args: ast: The pytd.TypeDeclUnit to save to disk. filename: The filename for the pickled output. If this is None, this function instead returns the pickled string. open_function: A custom file opening function. src_path: Optionally, the filepath of the original source file. metadata: A list of arbitrary string-encoded metadata. Returns: The pickled string, if no filename was given. (None otherwise.)

def _LoadPickle(f, filename): (source)

Load a pickle file, raising a custom exception on failure.

_PICKLE_RECURSION_LIMIT_AST: int = (source)

Undocumented

Value
40000