xgt.GraphProxy

class xgt.GraphProxy(conn, obj)

GraphProxy objects represent a graph structure held on the xGT server and can be used to retrieve information about graph data on it. These objects are returned by the Service.get_graph() method.

Parameters:
conn : Service

An open connection to an xGT server.

obj : json

Internal graph structure expressed in JSON objects.

Examples

>>> import xgt
>>> conn = xgt.connect()
>>> g = conn.get_graph('Company')
>>> print(g.name)
Attributes:
edges

CustomDictionary: Set of edges in the graph.

name

str: Name of the graph.

vertices

CustomDictionary: Set of vertices in the graph.

Methods

num_edges() int: Total count of edges across all Edge Types contained by the Graph.
num_vertices() int: Total count of vertices across all Vertex Types contained by the Graph.
__init__(conn, obj)

Initialize self. See help(type(self)) for accurate signature.

Methods

__init__(conn, obj) Initialize self.
num_edges() int: Total count of edges across all Edge Types contained by the Graph.
num_vertices() int: Total count of vertices across all Vertex Types contained by the Graph.

Attributes

edges CustomDictionary: Set of edges in the graph.
name str: Name of the graph.
vertices CustomDictionary: Set of vertices in the graph.
edges

CustomDictionary: Set of edges in the graph.

name

str: Name of the graph.

num_edges()

int: Total count of edges across all Edge Types contained by the Graph.

num_vertices()

int: Total count of vertices across all Vertex Types contained by the Graph.

vertices

CustomDictionary: Set of vertices in the graph.