pixano.features.schemas.entities.named_entity
NamedEntity(created_at=None, updated_at=None, **data)
Bases: Entity
A named entity.
A NamedEntity represents an entity with a simple name attribute.
Attributes:
Name | Type | Description |
---|---|---|
name |
str
|
The name of the entity. |
Source code in pixano/features/schemas/base_schema.py
create_named_entity(name, id='', item_ref=ItemRef.none(), view_ref=ViewRef.none(), parent_ref=EntityRef.none())
Create a NamedEntity
instance.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name
|
str
|
The name of the entity. |
required |
id
|
str
|
NamedEntity ID. |
''
|
item_ref
|
ItemRef
|
Item reference. |
none()
|
view_ref
|
ViewRef
|
View reference. |
none()
|
parent_ref
|
EntityRef
|
Entity reference. |
none()
|
Returns:
Type | Description |
---|---|
NamedEntity
|
The created |
Source code in pixano/features/schemas/entities/named_entity.py
is_named_entity(cls, strict=False)
Check if the given class is a NamedEntity
or a subclass of NamedEntity
.