Property Type

This module contains the definition of the available types of properties. It has the definition of PropertyType that contains the static constants of the available types. It also contains a method to verify the type of the property.

class gsf.core.entity.core.property_type.PropertyType

Bases: object

Type of a property

It contains the constants of the available types.

ANY = 'ANY'
BOOLEAN = 'BOOLEAN'
EVENT = 'EVENT'
EXPRESSION = 'EXPRESSION'
NUMBER = 'NUMBER'
STRING = 'STRING'
static validate(value: Any, property_type: str)bool

Validates if the value type equals to the expected type

gsf.core.entity.core.property_type.expected_types = {'ANY': typing.Any, 'BOOLEAN': <class 'bool'>, 'EVENT': typing.Any, 'EXPRESSION': <class 'gsf.core.expressions.expression.Expression'>, 'NUMBER': <class 'float'>, 'STRING': <class 'str'>}

Dict with names of the types and their corresponding type