UniqueAnnotation
- class app.portfolio.models.annotation.unique_annotation.UniqueAnnotation[source]
Bases:
Annotation[TypeVar, TypeVar],Generic
Inheritance Diagram for UniqueAnnotation
Methods
get(entity_or_uid)get_or_create(entity_or_uid, /, **kwargs)model_post_init(context)Attributes
Configuration for the model, should be a dictionary conforming to
ConfigDict.instance_nameuidentity_logentity_dependentsinstance_parent_weakref- classmethod get(entity_or_uid: Entity | EntityRecord | Uid) T | None[source]
- Parameters:
entity_or_uid (Entity | EntityRecord | Uid)
- Return type:
T | None
- classmethod get_or_create(entity_or_uid: Entity | EntityRecord | Uid, /, **kwargs) T[source]
- Parameters:
entity_or_uid (Entity | EntityRecord | Uid)
- Return type:
T
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'serialize_by_alias': True, 'validate_assignment': True, 'validate_by_alias': True}
Configuration for the model, should be a dictionary conforming to
ConfigDict.