bundle.core.entity¶
Attributes¶
Classes¶
Base data model class, providing utilities for serialization and deserialization |
|
An extension of the Data model that represents an entity with enhanced introspection |
Module Contents¶
- bundle.core.entity.LOGGER¶
- bundle.core.entity.NAMESPACE¶
- bundle.core.entity.UNIQUE_GENERATOR_ACTIVE = True¶
- class bundle.core.entity.Identifier(/, **data: Any)[source]¶
Bases:
bundle.core.data.DataBase data model class, providing utilities for serialization and deserialization from/to JSON, along with JSON Schema generation.
- model_config¶
Default model configuration settings.
- static next() Identifier[source]¶
- bundle.core.entity.ENTITY_ID_GENERATOR¶
- class bundle.core.entity.Entity(/, **data: Any)[source]¶
Bases:
bundle.core.DataAn extension of the Data model that represents an entity with enhanced introspection and optional persistence capabilities. It tracks the entity’s creation time and can automatically save its state upon destruction if configured to do so.
- Properties:
class_name (str): The name of the entity’s class. age (int): The age of the entity in nanoseconds, calculated from its born_time.
- identifier: Identifier = None¶