py4cytoscape.annotations.get_annotation_list

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

Get Annotation List

A list of named lists with annotation information

Parameters
  • network (SUID or str or None) – Name or SUID of the network. Default is the “current” network active in Cytoscape.

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

Returns

List of annotation records

Return type

list

Raises
  • CyError – if network name doesn’t exist

  • requests.exceptions.HTTPError – if can’t connect to Cytoscape or Cytoscape returns an error

Examples

>>> get_annotation_list()
[{'canvas': 'foreground', 'color': '#000000', 'rotation': '41.0', 'type': 'org.cytoscape.view.presentation.annotations.TextAnnotation', 'fontStyle': 'plain', 'uuid': '92aafea6-0653-4df1-a017-cf3edfa5fdc8', 'fontFamily': 'Arial', 'name': 'TextExample', 'x': '2168', 'y': '1823', 'z': '0', 'fontSize': '14', 'text': 'Text'}, ...]