py4cytoscape.py4cytoscape_utils.build_url

build_url(base_url='http://127.0.0.1:1234/v1', command=None)[source]

Append a command (if it exists) to a base URL.

Parameters
  • base_url (str) – Ignore unless you need to specify a custom domain, port or version to connect to the CyREST API. Default is http://127.0.0.1:1234 and the latest version of the CyREST API supported by this version of py4cytoscape.

  • command (str) – the command (if any) to append to the base_url

Returns

URL composed of base and URL-encoded command

Return type

str

Raises

none

Examples

>>> build_url()
'http://127.0.0.1:1234/v1'
>>> build_url('collections/1043355/tables/default')
'http://127.0.0.1:1234/v1/collections/1043355/tables/default'