class_docstr: Object that represents a connection to a Gephi master server.
class_docstr_tok: ["Object","that","represents","a","connection","to","a","Gephi","master","server","."]
docstr: Constructs a connection to a Gephi master server.
  
  The connection object can be constructed either by specifying the
  ``url`` directly, or by specifying the ``host``, ``port`` and
  ``workspace`` arguments.  The latter three are evaluated only if
  ``url`` is None; otherwise the ``url`` will take precedence.
  
  The ``url`` argument does not have to include the operation (e.g.,
  ``?operation=updateGraph``); the connection will take care of it.
  E.g., if you wish to connect to workspace 2 in a local Gephi instance
  on port 7341, the correct form to use for the ``url`` is as follows::
  
      http://localhost:7341/workspace0
docstr_tok: ["Constructs","a","connection","to","a","Gephi","master","server",".","The","connection","object","can","be","constructed","either","by","specifying","the","``","url","``","directly",",","or","by","specifying","the","``","host","``",",","``","port","``","and","``","workspace","``","arguments",".","The","latter","three","are","evaluated","only","if","``","url","``","is","None",";","otherwise","the","``","url","``","will","take","precedence",".","The","``","url","``","argument","does","not","have","to","include","the","operation","(","e.g.",",","``","?","operation=updateGraph","``",")",";","the","connection","will","take","care","of","it",".","E.g.",",","if","you","wish","to","connect","to","workspace","2","in","a","local","Gephi","instance","on","port","7341",",","the","correct","form","to","use","for","the","``","url","``","is","as","follows",":",":","http",":","\/\/localhost:7341\/workspace0"]
code: def __init__(
      self, url=None, host="127.0.0.1", port=8080, workspace=1
  ):
      """Constructs a connection to a Gephi master server.
  
      The connection object can be constructed either by specifying the
      ``url`` directly, or by specifying the ``host``, ``port`` and
      ``workspace`` arguments.  The latter three are evaluated only if
      ``url`` is None; otherwise the ``url`` will take precedence.
  
      The ``url`` argument does not have to include the operation (e.g.,
      ``?operation=updateGraph``); the connection will take care of it.
      E.g., if you wish to connect to workspace 2 in a local Gephi instance
      on port 7341, the correct form to use for the ``url`` is as follows::
  
          http://localhost:7341/workspace0
      """
      self._pending_operations = []
      self._autoflush_threshold = 1024
  
      self.url = url or self._construct_default_url(
          host, port, workspace
      )
  
imports: import json
  import urllib.error
  import urllib.parse
  import urllib.request
label_desc: Use image node_id 1 to create a new GephiConnection object  with example: obj = GephiConnection(url, host, port, workspace)