5.2.10. xgt.Vertex

class xgt.Vertex(*args, **kwargs)

Represents a vertex from a vertex frame providing access to the properties and the frame the vertex belongs to.

The user shouldn’t manually construct these. They will be constructed by calls to get_data().

The class is implemented as a dictionary with the following keys:

  • ‘id’: Row ID

  • ‘metadata’: dict containing frame metadata:

  • ‘name’: Vertex frame name

  • ‘key’: Vertex key column name

  • ‘properties’: dict mapping property names to values

Experimental: The API of this class may change in future releases.

Attributes

frame

The frame the element belongs to.

position

The position of the element's row in its frame.

properties

A dictionary of the properties of the element.

property frame: TableFrame | VertexFrame | EdgeFrame

The frame the element belongs to.

Type:

TableFrame, VertexFrame, or EdgeFrame

property position: int

The position of the element’s row in its frame.

Type:

int

property properties: dict

A dictionary of the properties of the element. The keys are the property names.

Type:

dict