10.1.4. Class cerebro.aclasses.AbstractTag

class cerebro.aclasses.AbstractTag(tag_id)[source]

Basic class of task tag.

Methods

Note

In Cerebro tags are used as additional task attributes. Having been applied to a project, a tag applies automatically to the task. In the process of working with tasks, gradually, tags are being filled with values.

TYPE_ = ''

Tag types

TYPE_ENUM = 1

Enumeration.

TYPE_INTEGER = 0

Integer.

TYPE_MULTI_ENUM = 4

Multi enumeration.

TYPE_REAL = 2

Real number.

TYPE_STRING = 3

String.

elements()[source]
Returns:a list of possible enumeration elements. If tag type is neither Enumeration nor Multi enumeration, None is returned.
Return type:[(element_id, element_name),] - a list of 2-field tuples: enumeration element ID, enumeration name
id()[source]
Returns:Tag ID.
Return type:int
name()[source]
Returns:tag name.
Return type:string
type()[source]
Returns:tag type.
Return type:int