py4cytoscape.py4cytoscape_utils.verify_supported_versions

verify_supported_versions(cyrest=1, cytoscape=3.6, base_url='http://127.0.0.1:1234/v1', caller=None)[source]

Throws exception if min supported versions of api and cytoscape are not running.

Extracts numerics from api and major cytoscape versions before making comparison.

Parameters
  • cyrest (int) – minimum CyREST version

  • cytoscape (float or str) – minimum Cytoscape version … should be str if version > 3.9

  • 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.

  • caller (str) – name of function in which error is to be reported

Returns

None

Raises
  • CyError – if required version is greater than current version

  • AttributeError – if required version can’t be parsed

Examples

>>> verify_supported_versions(1, 3.7)
>>> verify_supported_versions(1, '3.10')
>>> verify_supported_versions(1, '3.10.1')