Entity Property

This module contains the definition of the generic property. It has the definition of the EntityProperty that allows to define the properties of an entity with a value, type and category.

Example

Creating properties:

number_property = EntityProperty(0, PropertyType.NUMBER, "Category 1")
string_property = EntityProperty("0", PropertyType.STRING, "Category 1")
boolean_property = EntityProperty(True, PropertyType.BOOLEAN, "Category 2")
gsf.core.entity.core.entity_property.EntityProperties

Group of properties of an entity

alias of Dict[str, gsf.core.entity.core.entity_property.EntityProperty]

class gsf.core.entity.core.entity_property.EntityProperty(value: Optional[T] = None, property_type: str = 'STRING', category: str = 'Generic')

Bases: Generic[gsf.core.entity.core.entity_property.T]

Property of an entity

Contains a value, type and category to describe an entity,

__value

Property value

Type

T

__type

Property type

Type

str

__category

Property category

Type

str

get_category()str

Returns the category of the property

get_type()str

Returns the name of the property

get_value()T

Returns the value of the property

set_value(value: T)

Sets the value of the property