pymaid.add_tags¶
- pymaid.add_tags(node_list, tags, node_type, remote_instance=None, override_existing=False)[source]¶
Add or edit tag(s) for a list of node(s) or connector(s).
- Parameters
node_list (list) – Node or connector IDs to edit.
tags (str | list | dict) – Tags(s) to add to provided node/connector ids. If a dictionary is provided {node_id: [tag1, tag2], …} each node gets individual tags. If string or list are provided, all nodes will get the same tags.
node_type ('NODE' | 'CONNECTOR') – Set which node type of IDs you have provided as they use different API endpoints!
override_existing (bool, default = False) – This needs to be set to True if you want to delete a tag. Otherwise, your tags (even if empty) will not override existing tags.
remote_instance (CatmaidInstance, optional) – If not passed directly, will try using global.
- Returns
Confirmation from Catmaid server
- Return type
str
Notes
Use
tags=''
andoverride_existing=True
to delete all tags from nodes.See also
delete_tags()
Function to delete given tags from nodes.