Skip to content

pixano.app.models.item_info

ItemInfoModel(created_at=None, updated_at=None, **data)

Bases: ItemModel

Item information.

It contains all the information contained in an ItemModel and additional information about the dataset item such as the number of annotations, embeddings, entities and views.

Attributes:

Name Type Description
infos

Information about the dataset item. Structure: {info_name: {sub_info_name: {"count": int, ...}, ...}, ...}

Source code in pixano/app/models/base_schema.py
def __init__(self, /, created_at: datetime | None = None, updated_at: datetime | None = None, **data: Any):
    """Create a new model by parsing and validating input data from keyword arguments.

    Raises [`ValidationError`][pydantic_core.ValidationError] if the input data cannot be
    validated to form a valid model.

    `self` is explicitly positional-only to allow `self` as a field name.

    Args:
        created_at: The creation date of the object.
        updated_at: The last modification date of the object.
        data: The data of the object validated by Pydantic.
    """
    created_at, updated_at = validate_and_init_create_at_and_update_at(created_at, updated_at)
    data.update({"created_at": created_at, "updated_at": updated_at})
    super().__init__(**data)