paya.runtime.networks.Tagger#

class Tagger(*args, **kwargs)#

Inheritance

System Network Network DependNode DependNode PyNode ProxyUnicode

classmethod create(node)#

Adds a tagger node to the specified node.

Parameters

node (str, DependNode) – the node to which to add a tagger system

Returns

The tagger node.

Return type

Tagger

classmethod getFromTaggingNode(taggingNode, create=False)#
Parameters
  • taggingNode (str, DependNode) – The tagging node.

  • create (bool) – create a tagger if one was not found; defaults to False

Returns

The tagger utility node, if present.

Return type

Tagger, None

tag(tagName, *attrsOrNodes)#

Tags attributes or nodes for later retrieval via getByTag().

Parameters
  • tagName (str) – the tag to use

  • *attrsOrNodes – the attributes or nodes to tags

Returns

getByTag(tagName)#
Parameters

tagName (str) – the tag to inspect

Returns

Nodes and attributes tagged with the specified tagName.

Return type

list [:class:

getTags()#
Returns

Tags in use.

Return type

list [str]

clearTags(*tagNames, removeTaggerIfEmpty=False)#
Parameters

*tagNames – the tags to remove; if none are specified, all tags will be removed

Returns

None if all tags were removed and removeTaggerIfEmpty is True, otherwise self

Return type

Tagger, None