partial_gt_load_demo#

A simple demo script to test partial loading of graph properties from a .gt file.

Usage:

python partial_gt_load_demo.py /path/to/graph.gt

Please uncomment and modify the path to ClearMap below if necessary.

class ColorFormatter(fmt=None, datefmt=None, style='%', validate=True, *, defaults=None)[source]#

Bases: Formatter

format(record: LogRecord) str[source]#

Format the specified record as text.

The record’s attribute dictionary is used as the operand to a string formatting operation which yields the returned string. Before formatting the dictionary, a couple of preparatory steps are carried out. The message attribute of the record is computed using LogRecord.getMessage(). If the formatting string uses the time (as determined by a call to usesTime(), formatTime() is called to format the event time. If there is exception information, it is formatted using formatException() and appended to the message.

GREEN = '\x1b[32m'#
RESET = '\x1b[0m'#
class SuccessLogger(name, level=0)[source]#

Bases: Logger

success(msg, *args, **kwargs)[source]#
stat_graph_properties(g)[source]#

Count the number of graph, vertex, and edge properties in the given graph.

Parameters:

g (Graph) – The graph object to analyze.

Returns

tuple: (n_graph_properties, n_vertex_properties, n_edge_properties)

The counts of graph, vertex, and edge properties.