Models / Conditions

AllOfCondition

class teksi_hooks.models.conditions.AllOfCondition(conditions)[source]

Composite condition that is true only if all child conditions are true.

This represents a logical AND between the contained conditions.

Parameters:

conditions (tuple[Condition, ...])

Base class: Condition

Fields

conditions

Type: tuple

Conditions that must all evaluate to true.

AnyOfCondition

class teksi_hooks.models.conditions.AnyOfCondition(conditions)[source]

Composite condition that is true if at least one child condition is true.

This represents a logical OR between the contained conditions.

Parameters:

conditions (tuple[Condition, ...])

Base class: Condition

Fields

conditions

Type: tuple

Conditions of which at least one must evaluate to true.

LocalCondition

class teksi_hooks.models.conditions.LocalCondition(attribute, operator, value=None)[source]

Condition evaluated against the current object.

A local condition reads an attribute from the object currently being validated and compares it using the configured operator and optional value.

Parameters:
  • attribute (str)

  • operator (str)

  • value (str | None)

Base class: Condition

Fields

attribute

Type: str

Name of the local attribute to evaluate.

operator

Type: str

Comparison operator to apply, for example equals, is_null, in or equals_context.

value

Type: str | None

Optional comparison value. Some operators, such as is_null, may not require a value.

RemoteCondition

class teksi_hooks.models.conditions.RemoteCondition(relation, attribute, operator, value=None)[source]

Condition evaluated against a related object.

A remote condition follows a relation from the current object, reads an attribute on the related object and compares it using the configured operator and optional value.

Parameters:
  • relation (str)

  • attribute (str)

  • operator (str)

  • value (str | None)

Base class: Condition

Fields

relation

Type: str

Name of the relation used to reach the related object.

attribute

Type: str

Name of the attribute on the related object to evaluate.

operator

Type: str

Comparison operator to apply, for example equals, is_null, in or equals_context.

value

Type: str | None

Optional comparison value. Some operators may not require a value.