ftrack_api.event.expression
- class ftrack_api.event.expression.Parser[source]
Parse string based expression into
Expression
instance.- parse(expression)[source]
Parse string expression into
Expression
.Raise
ftrack_api.exception.ParseError
if expression could not be parsed.
- class ftrack_api.event.expression.Expression[source]
Represent a structured expression to test candidates against.
- __init__()
- class ftrack_api.event.expression.All(expressions=None)[source]
Match candidate that matches all of the specified expressions.
Note
If no expressions are supplied then will always match.
- class ftrack_api.event.expression.Any(expressions=None)[source]
Match candidate that matches any of the specified expressions.
Note
If no expressions are supplied then will never match.
- class ftrack_api.event.expression.Condition(key, operator, value)[source]
Represent condition.
- __init__(key, operator, value)[source]
Initialise condition.
key is the key to check on the data when matching. It can be a nested key represented by dots. For example, ‘data.eventType’ would attempt to match candidate[‘data’][‘eventType’]. If the candidate is missing any of the requested keys then the match fails immediately.
operator is the operator function to use to perform the match between the retrieved candidate value and the conditional value.
If value is a string, it can use a wildcard ‘*’ at the end to denote that any values matching the substring portion are valid when matching equality only.