search in docstrings

Search bar offers the following options:

- Term presence. The below example searches for documents that must contain “foo”, might contain “bar” and must not contain “baz”: `+foo bar -baz`
- Wildcards. The below example searches for documents with words beginning with “foo”: `foo*`
- Search in specific fields. The following search matches all objects in "twisted.mail" that matches “search”: `+qname:twisted.mail.* +search`

  Possible fields: 'name', 'qname' (fully qualified name), 'docstring', and 'kind'. Last two fields are only applicable if "search in docstrings" is enabled.

- Fuzzy matches. The following search matches all documents that have a word within 1 edit distance of “foo”: `foo~1`

Results provided by Lunr.js

# ``igraph`.`remote`.`gephi`.`GephiGraphStreamer``

class documentation

`class GephiGraphStreamer: (source)`

Constructor: `GephiGraphStreamer(encoder)`

View In Hierarchy

Class that produces JSON event objects that stream an igraph graph to Gephi using the Gephi Graph Streaming API.

The Gephi graph streaming format is a simple JSON-based format that can be used to post mutations to a graph (i.e. node and edge additions, removals and updates) to a remote component. For instance, one can open up Gephi (http://www.gephi.org), install the Gephi graph streaming plugin and then send a graph from igraph straight into the Gephi window by using `GephiGraphStreamer` with the appropriate URL where Gephi is listening.

Example:

    >>> from cStringIO import StringIO
    >>> from igraph import Graph
    >>> buf = StringIO()
    >>> streamer = GephiGraphStreamer()
    >>> graph = Graph.Formula("A --> B, B --> C")
    >>> streamer.post(graph, buf)
    >>> print(buf.getvalue())        # doctest: +ELLIPSIS, +NORMALIZE_WHITESPACE
    {"an": {"igraph:...:v:0": {"name": "A"}}}
    {"an": {"igraph:...:v:1": {"name": "B"}}}
    {"an": {"igraph:...:v:2": {"name": "C"}}}
    {"ae": {"igraph:...:e:0:1": {...}}}
    {"ae": {"igraph:...:e:1:2": {...}}}
    <BLANKLINE>

Method | `__init__` | Constructs a Gephi graph streamer that will post graphs to a given file-like object or a Gephi connection.
Method | `iterjsonobj` | Iterates over the JSON objects that build up the graph using the Gephi graph streaming API. The objects returned from this function are Python objects; they must be formatted with `json.dumps` before sending them to the destination.
Method | `post` | Posts the given graph to the destination of the streamer using the given JSON encoder. When `encoder` is `None`, it falls back to the default JSON encoder of the streamer in the `encoder` property.
Method | `send_event` | Sends a single JSON event to the given destination using the given JSON encoder. When `encoder` is `None`, it falls back to the default JSON encoder of the streamer in the `encoder` property.
Instance Variable | `encoder` | Undocumented
Instance Variable | `format` | Undocumented

def __init__(self, encoder=None): (source)

Constructs a Gephi graph streamer that will post graphs to a given file-like object or a Gephi connection.

`encoder` must either be `None` or an instance of `json.JSONEncoder` and it must contain the JSON encoder to be used when posting JSON objects.

def iterjsonobj(self, graph): (source)

Iterates over the JSON objects that build up the graph using the Gephi graph streaming API. The objects returned from this function are Python objects; they must be formatted with `json.dumps` before sending them to the destination.

def post(self, graph, destination, encoder=None): (source)

Posts the given graph to the destination of the streamer using the given JSON encoder. When `encoder` is `None`, it falls back to the default JSON encoder of the streamer in the `encoder` property.

`destination` must be a file-like object or an instance of `GephiConnection`.

def send_event(self, event, destination, encoder=None, flush=True): (source)

Sends a single JSON event to the given destination using the given JSON encoder. When `encoder` is `None`, it falls back to the default JSON encoder of the streamer in the `encoder` property.

`destination` must be a file-like object or an instance of `GephiConnection`.

The method flushes the destination after sending the event. If you want to avoid this (e.g., because you are sending many events), set `flush` to `False`.

encoder = (source)

Undocumented

format = (source)

Undocumented