decomp.graph.nx

Module for converting from networkx to RDF.

class NXConverter[source]

Bases: object

A converter between RDFLib graphs and NetworkX digraphs.

Parameters:

graph – the graph to convert

__init__(rdfgraph)[source]
classmethod rdf_to_networkx(rdfgraph)[source]

Convert an RDFLib graph to a NetworkX digraph.

Parameters:

rdfgraph (Graph) – the RDFLib graph to convert

Return type:

DiGraph