python-igraph manual

For using igraph from Python

   Home       Trees       Indices       Help   
Package igraph :: Package remote :: Module gephi :: Class GephiGraphStreamingAPIFormat
[hide private]

Class GephiGraphStreamingAPIFormat

source code

object --+
         |
        GephiGraphStreamingAPIFormat

Object that implements the Gephi graph streaming API format and returns Python objects corresponding to the events defined in the API.
Instance Methods [hide private]
 
get_add_node_event(self, identifier, attributes={})
Generates a Python object corresponding to the event that adds a node with the given identifier and attributes in the Gephi graph streaming API.
source code
 
get_add_edge_event(self, identifier, source, target, directed, attributes={})
Generates a Python object corresponding to the event that adds an edge with the given source, target, directednessr and attributes in the Gephi graph streaming API.
source code
 
get_change_node_event(self, identifier, attributes)
Generates a Python object corresponding to the event that changes the attributes of some node in the Gephi graph streaming API. The given attributes are merged into the existing ones; use C{None} as the attribute value to delete a given attribute.
source code
 
get_change_edge_event(self, identifier, attributes)
Generates a Python object corresponding to the event that changes the attributes of some edge in the Gephi graph streaming API. The given attributes are merged into the existing ones; use C{None} as the attribute value to delete a given attribute.
source code
 
get_delete_node_event(self, identifier)
Generates a Python object corresponding to the event that deletes a node with the given identifier in the Gephi graph streaming API.
source code
 
get_delete_edge_event(self, identifier)
Generates a Python object corresponding to the event that deletes an edge with the given identifier in the Gephi graph streaming API.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

get_add_node_event(self, identifier, attributes={})

source code 

Generates a Python object corresponding to the event that adds a node with the given identifier and attributes in the Gephi graph streaming API.

Example:

>>> api = GephiGraphStreamingAPIFormat()
>>> api.get_add_node_event("spam")
{'an': {'spam': {}}}
>>> api.get_add_node_event("spam", dict(ham="eggs"))
{'an': {'spam': {'ham': 'eggs'}}}

get_change_node_event(self, identifier, attributes)

source code 

Generates a Python object corresponding to the event that changes the attributes of some node in the Gephi graph streaming API. The given attributes are merged into the existing ones; use C{None} as the attribute value to delete a given attribute.

Example:

>>> api = GephiGraphStreamingAPIFormat()
>>> api.get_change_node_event("spam", dict(ham="eggs"))
{'cn': {'spam': {'ham': 'eggs'}}}
>>> api.get_change_node_event("spam", dict(ham=None))
{'cn': {'spam': {'ham': None}}}

get_change_edge_event(self, identifier, attributes)

source code 

Generates a Python object corresponding to the event that changes the attributes of some edge in the Gephi graph streaming API. The given attributes are merged into the existing ones; use C{None} as the attribute value to delete a given attribute.

Example:

>>> api = GephiGraphStreamingAPIFormat()
>>> api.get_change_edge_event("spam", dict(ham="eggs"))
{'ce': {'spam': {'ham': 'eggs'}}}
>>> api.get_change_edge_event("spam", dict(ham=None))
{'ce': {'spam': {'ham': None}}}

get_delete_node_event(self, identifier)

source code 

Generates a Python object corresponding to the event that deletes a node with the given identifier in the Gephi graph streaming API.

Example:

>>> api = GephiGraphStreamingAPIFormat()
>>> api.get_delete_node_event("spam")
{'dn': {'spam': {}}}

get_delete_edge_event(self, identifier)

source code 

Generates a Python object corresponding to the event that deletes an edge with the given identifier in the Gephi graph streaming API.

Example:

>>> api = GephiGraphStreamingAPIFormat()
>>> api.get_delete_edge_event("spam:ham")
{'de': {'spam:ham': {}}}

   Home       Trees       Indices       Help