src/pybel/io/sbel.py
def iterate_sbel(graph: BELGraph) -> Iterable[SBEL]:
    """Iterate over JSON dictionaries corresponding to lines in BEL JSONL."""
    g = graph.graph.copy()
    _prepare_graph_dict(g)
    yield g
    for u, v, k, d in graph.edges(data=True, keys=True):
        yield {
            'source': _augment_node(u),
            'target': _augment_node(v),
            'key': k,
            **d,
        }
Iterate over JSON dictionaries corresponding to lines in BEL JSONL.
Iterate over JSON dictionaries corresponding to lines in BEL JSONL.
Iterate over JSON dictionaries corresponding to lines in BEL JSONL .
def iterate_sbel(graph: BELGraph) -> Iterable[SBEL]:
    g = graph.graph.copy()
    _prepare_graph_dict(g)
    yield g
    for u, v, k, d in graph.edges(data=True, keys=True):
        yield {
            'source': _augment_node(u),
            'target': _augment_node(v),
            'key': k,
            **d,
        }
def iterate_sbel ( graph : BELGraph ) -> Iterable [ SBEL ] : g = graph . graph . copy ( ) _prepare_graph_dict ( g ) yield g for u , v , k , d in graph . edges ( data = True , keys = True ) : yield { 'source' : _augment_node ( u ) , 'target' : _augment_node ( v ) , 'key' : k , ** d , }
Iterate over JSON dictionaries corresponding to lines in BEL JSONL.
Iterate over JSON dictionaries corresponding to lines in BEL JSONL .
"""Iterate over JSON dictionaries corresponding to lines in BEL JSONL."""
graph
BELGraph