src/pybel/io/gpickle.py
def to_pickle(graph: BELGraph, path: Union[str, BinaryIO], protocol: int = pickle.HIGHEST_PROTOCOL) -> None:
    """Write this graph to a pickle file.

    Note that the pickle module has some incompatibilities between Python 2 and 3. To export a universally importable
    pickle, choose 0, 1, or 2.

    :param graph: A BEL graph
    :param path: A path or file-like
    :param protocol: Pickling protocol to use. Defaults to ``HIGHEST_PROTOCOL``.

    .. seealso:: https://docs.python.org/3.6/library/pickle.html#data-stream-format
    """
    raise_for_not_bel(graph)
    pickle.dump(graph, path, protocol)
Write this graph to a pickle file.

    Note that the pickle module has some incompatibilities between Python 2 and 3. To export a universally importable
    pickle, choose 0, 1, or 2.

    :param graph: A BEL graph
    :param path: A path or file-like
    :param protocol: Pickling protocol to use. Defaults to ``HIGHEST_PROTOCOL``.

    .. seealso:: https://docs.python.org/3.6/library/pickle.html#data-stream-format
    
Write this graph to a pickle file.
Note that the pickle module has some incompatibilities between Python 2 and 3. To export a universally importable
pickle, choose 0, 1, or 2.
Write this graph to a pickle file . Note that the pickle module has some incompatibilities between Python 2 and 3 . To export a universally importable pickle choose 0 1 or 2 .
def to_pickle(graph: BELGraph, path: Union[str, BinaryIO], protocol: int = pickle.HIGHEST_PROTOCOL) -> None:
    raise_for_not_bel(graph)
    pickle.dump(graph, path, protocol)
def to_pickle ( graph : BELGraph , path : Union [ str , BinaryIO ] , protocol : int = pickle . HIGHEST_PROTOCOL ) -> None : raise_for_not_bel ( graph ) pickle . dump ( graph , path , protocol )
Write this graph to a pickle file.
Write this graph to a pickle file .
"""Write this graph to a pickle file.

    Note that the pickle module has some incompatibilities between Python 2 and 3. To export a universally importable
    pickle, choose 0, 1, or 2.

    :param graph: A BEL graph
    :param path: A path or file-like
    :param protocol: Pickling protocol to use. Defaults to ``HIGHEST_PROTOCOL``.

    .. seealso:: https://docs.python.org/3.6/library/pickle.html#data-stream-format
    """
graph
BELGraph
A BEL graph
A BEL graph
path
Union[str, BinaryIO]
A path or file-like
A path or file - like
protocol
int
Pickling protocol to use. Defaults to ``HIGHEST_PROTOCOL``.
Pickling protocol to use . Defaults to ` ` HIGHEST_PROTOCOL ` ` .