Skip to content

Food Models

food

Classes:

  • Food –

    Represents a food item (summary view).

  • FoodDetail –

    Represents detailed information about a food item.

  • FoodEffect –

    Represents the effect of a food item.

  • FoodRecipe –

    Represents the recipe details for a food item.

  • FoodSource –

    Represents a source where food can be obtained.

Food pydantic-model

Represents a food item (summary view).

Attributes:

  • id (int) –

    The unique identifier for the food.

  • name (str) –

    The name of the food.

  • type (str) –

    The type or category of the food.

  • recipe (bool) –

    Indicates if the food is obtained via a recipe.

  • icon (str) –

    The URL of the food's icon.

  • rarity (int) –

    The rarity or rank of the food.

  • route (str) –

    The internal route or identifier for the food.

  • effect_icon (str | None) –

    The URL of the icon representing the food's effect category, if applicable.

Fields:

Validators:

effect_icon pydantic-field

effect_icon: str | None = None

icon pydantic-field

icon: str

id pydantic-field

id: int

name pydantic-field

name: str

rarity pydantic-field

rarity: int

recipe pydantic-field

recipe: bool

route pydantic-field

route: str

type pydantic-field

type: str

FoodDetail pydantic-model

Represents detailed information about a food item.

Attributes:

  • name (str) –

    The name of the food.

  • description (str) –

    The description of the food.

  • type (str) –

    The type or category of the food.

  • recipe (FoodRecipe | bool) –

    Details about the recipe if the food can be cooked, otherwise False.

  • sources (list[FoodSource]) –

    A list of sources where the food can be obtained.

  • icon (str) –

    The URL of the food's icon.

  • rarity (int) –

    The rarity or rank of the food.

  • route (str) –

    The internal route or identifier for the food.

Fields:

Validators:

  • _convert_recipe → recipe
  • _convert_icon_url → icon

description pydantic-field

description: str

icon pydantic-field

icon: str

name pydantic-field

name: str

rarity pydantic-field

rarity: int

recipe pydantic-field

recipe: FoodRecipe | bool

route pydantic-field

route: str

sources pydantic-field

sources: list[FoodSource]

type pydantic-field

type: str

FoodEffect pydantic-model

Represents the effect of a food item.

Attributes:

  • id (str) –

    The identifier for the effect.

  • description (str) –

    The description of the effect.

Fields:

description pydantic-field

description: str

id pydantic-field

id: str

FoodRecipe pydantic-model

Represents the recipe details for a food item.

Attributes:

Fields:

Validators:

effect_icon pydantic-field

effect_icon: str

effects pydantic-field

effects: list[FoodEffect]

FoodSource pydantic-model

Represents a source where food can be obtained.

Attributes:

  • name (str) –

    The name of the source (e.g., an NPC or location).

  • type (str) –

    The type of source (e.g., "Shop", "Quest").

Fields:

name pydantic-field

name: str

type pydantic-field

type: str