Skip to content

model

Model implementation for a custom list.

CustomListEntryModel

Bases: BaseModel

A model class representing a custom list entry.

Source code in mlte/custom_list/model.py
21
22
23
24
25
26
27
28
29
30
31
class CustomListEntryModel(BaseModel):
    """A model class representing a custom list entry."""

    name: str
    """A name to uniquely identify the entry."""

    description: str
    """A description of the the entry."""

    parent: str
    """ID of parent."""

description instance-attribute

A description of the the entry.

name instance-attribute

A name to uniquely identify the entry.

parent instance-attribute

ID of parent.

CustomListModel

Bases: BaseModel

A model class representing a custom list.

Source code in mlte/custom_list/model.py
11
12
13
14
15
16
17
18
class CustomListModel(BaseModel):
    """A model class representing a custom list."""

    name: CustomListName
    """An name to uniquely identify the list."""

    entries: List[CustomListEntryModel] = []
    """A list of entries in the list."""

entries = [] class-attribute instance-attribute

A list of entries in the list.

name instance-attribute

An name to uniquely identify the list.