otx.api.entities.id#
This module implements the ID entity.
Classes
|
An identifier for objects that can be persisted in repositories. |
- class otx.api.entities.id.ID(representation: str | ObjectId | None = None)[source]#
Bases:
str
An identifier for objects that can be persisted in repositories.
- Usually the creation of IDs is handled by the repositories. In that case objects are initialized with an empty ID()
>>> str(ID()) ''
- Parameters:
Optional[Union[str – value of the identifier
ObjectId]] – value of the identifier
Creates a new ID object.
- property representation#
Returns the value of the identifier.