Skip to content

Models

gi

Modules:

  • build
  • character
  • costume
  • icon
  • player
  • response

Classes:

  • Artifact

    Represents an artifact.

  • Build

    Represents a Genshin Impact build.

  • Character

    Represents a character.

  • Constellation

    Represents a character's constellation.

  • Costume

    Represents a character's costume.

  • FightProp

    Represents a character's stat (property.)

  • Icon

    Represents an icon in Genshin Impact.

  • Namecard

    Represents a namecard in Genshin Impact.

  • Player

    Represents a Genshin Impact player.

  • ShowcaseCharacter

    Represents a showcase character.

  • ShowcaseResponse

    Represents a Genshin Impact showcase response.

  • Stat

    Represents a stat.

  • Talent

    Represents a character's talent.

  • Weapon

    Represents a weapon.

Artifact pydantic-model

Represents an artifact.

Attributes:

Fields:

Validators:

equip_type pydantic-field

equip_type: EquipmentType

icon pydantic-field

icon: str

id pydantic-field

id: int

item_type pydantic-field

item_type: ItemType

level pydantic-field

level: int

main_stat pydantic-field

main_stat: Stat

main_stat_id pydantic-field

main_stat_id: int

name pydantic-field

name: str

rarity pydantic-field

rarity: int

set_name pydantic-field

set_name: str

sub_stat_ids pydantic-field

sub_stat_ids: list[int]

sub_stats pydantic-field

sub_stats: list[Stat]

Build pydantic-model

Represents a Genshin Impact build.

Attributes:

  • id (int) –

    The build's ID.

  • name (str) –

    The build's name.

  • order (Decimal) –

    The build's order.

  • live (bool) –

    Whether the build is live.

  • character_id (int) –

    The build's character ID.

  • character (C) –

    The build's character data.

Fields:

Character pydantic-model

Represents a character.

Attributes:

Config:

  • default: {'arbitrary_types_allowed': True}

Fields:

Validators:

artifacts pydantic-field

artifacts: list[Artifact]

ascension pydantic-field

ascension: Literal[0, 1, 2, 3, 4, 5, 6]

constellations pydantic-field

constellations: list[Constellation]

constellations_unlocked property

constellations_unlocked: int

The number of constellations unlocked.

costume pydantic-field

costume: Costume | None = None

costume_id pydantic-field

costume_id: int | None = None

element pydantic-field

element: Element = ANEMO

friendship_level pydantic-field

friendship_level: int

highest_dmg_bonus_stat property

highest_dmg_bonus_stat: FightProp

The character's highest damage bonus stat.

Returns the highest stat value from the damage bonus stats (elemental damage bonus, physical damage bonus, etc.).

icon pydantic-field

icon: Icon

id pydantic-field

id: int

level pydantic-field

level: int

max_level property

max_level: Literal[20, 40, 50, 60, 70, 80, 90]

The character's max level.

model_config class-attribute instance-attribute

model_config = {'arbitrary_types_allowed': True}

name pydantic-field

name: str = ''

namecard pydantic-field

namecard: Namecard | None = None

rarity pydantic-field

rarity: int = 0

skill_depot_id pydantic-field

skill_depot_id: int

specialized_stat property

specialized_stat: FightProp

The character's specialized stat

Returns the highest stat value from the specialized stats (elemental damage bonus and healing bonus).

stats pydantic-field

talent_extra_level_map pydantic-field

talent_extra_level_map: dict[str, int] | None = None

talent_order pydantic-field

talent_order: list[int]

talents pydantic-field

talents: list[Talent]

weapon pydantic-field

weapon: Weapon

Constellation pydantic-model

Represents a character's constellation.

Attributes:

  • id (int) –

    The constellation's ID.

  • name (str) –

    The constellation's name.

  • icon (str) –

    The constellation's icon.

  • unlocked (bool) –

    Whether the constellation is unlocked.

Fields:

icon pydantic-field

icon: str = ''

id pydantic-field

id: int

name pydantic-field

name: str = ''

unlocked pydantic-field

unlocked: bool

Costume pydantic-model

Represents a character's costume.

Attributes:

  • id (int) –

    The costume's ID.

  • icon (Icon) –

    The costume's icon.

Fields:

data pydantic-field

data: dict[str, Any]

icon property

icon: Icon

The costume's icon.

id pydantic-field

id: int

FightProp pydantic-model

Represents a character's stat (property.)

Attributes:

Fields:

Validators:

  • __convert_typetype

formatted_value property

formatted_value: str

The formatted value of the stat.

is_percentage property

is_percentage: bool

Whether this stat is a percentage stat.

name pydantic-field

name: str = ''

type pydantic-field

value pydantic-field

value: float

Icon pydantic-model

Represents an icon in Genshin Impact.

Attributes:

Fields:

circle property

circle: str

The circle (round) icon of the character.

e.g. https://enka.network/ui/UI_AvatarIcon_Ambor_Circle.png

front property

front: str

The front icon of the character.

e.g. https://enka.network/ui/UI_AvatarIcon_Ambor.png

gacha property

gacha: str

The gacha art of the character.

e.g. https://enka.network/ui/UI_Gacha_AvatarImg_Ambor.png

icon_ui_path property

icon_ui_path: str

The icon UI path of the character.

e.g. UI_AvatarIcon_Ambor

is_costume pydantic-field

is_costume: bool = False

side property

side: str

The side icon of the character.

e.g. https://enka.network/ui/UI_AvatarIcon_Side_Ambor.png

side_icon_ui_path pydantic-field

side_icon_ui_path: str

Namecard pydantic-model

Represents a namecard in Genshin Impact.

Attributes:

Fields:

full property

full: str

The full namecard.

e.g. https://enka.network/ui/UI_NameCardPic_0_P.png

icon property

icon: str

The namecard's icon.

e.g. https://enka.network/ui/UI_NameCardIcon_0.png

ui_path pydantic-field

ui_path: str

Player pydantic-model

Represents a Genshin Impact player.

Attributes:

Config:

  • default: {'arbitrary_types_allowed': True}

Fields:

Validators:

abyss_floor pydantic-field

abyss_floor: int = 0

abyss_level pydantic-field

abyss_level: int = 0

abyss_stars pydantic-field

abyss_stars: int | None = None

achievements pydantic-field

achievements: int = 0

level pydantic-field

level: int

max_friendship_character_count pydantic-field

max_friendship_character_count: int | None = None

model_config class-attribute instance-attribute

model_config = {'arbitrary_types_allowed': True}

namecard pydantic-field

namecard: Namecard

namecard_id pydantic-field

namecard_id: int

nickname pydantic-field

nickname: str | None = None

profile_picture_icon pydantic-field

profile_picture_icon: Icon

profile_picture_id pydantic-field

profile_picture_id: int

showcase_characters pydantic-field

showcase_characters: list[ShowcaseCharacter]

signature pydantic-field

signature: str | None = ''

stygian_clear_time pydantic-field

stygian_clear_time: int | None = None

stygian_difficulty pydantic-field

stygian_difficulty: Literal[1, 2, 3, 4, 5, 6, 7] | None = None

theater_act pydantic-field

theater_act: int | None = None

theater_stars pydantic-field

theater_stars: int | None = None

world_level pydantic-field

world_level: int = 0

ShowcaseCharacter pydantic-model

Represents a showcase character.

Attributes:

  • id (int) –

    The character's ID.

  • level (int) –

    The character's level.

  • costume (Costume | None) –

    The character's costume, if any.

  • costume_id (int | None) –

    The character's costume's ID, if any.

Config:

  • default: {'arbitrary_types_allowed': True}

Fields:

costume pydantic-field

costume: Costume | None = None

costume_id pydantic-field

costume_id: int | None = None

id pydantic-field

id: int

level pydantic-field

level: int

model_config class-attribute instance-attribute

model_config = {'arbitrary_types_allowed': True}

ShowcaseResponse pydantic-model

Represents a Genshin Impact showcase response.

Attributes:

Fields:

Validators:

characters pydantic-field

characters: list[Character]

owner pydantic-field

owner: Owner | None = None

player pydantic-field

player: Player

ttl pydantic-field

ttl: int

uid pydantic-field

uid: str

Stat pydantic-model

Represents a stat.

Attributes:

  • type (StatType) –

    The stat's type (e.g. FIGHT_PROP_HP, FIGHT_PROP_ATTACK).

  • value (float) –

    The stat's value.

  • name (str) –

    The stat's name.

Fields:

formatted_value property

formatted_value: str

"The formatted value of the stat.

is_percentage property

is_percentage: bool

Whether this stat is a percentage stat.

name pydantic-field

name: str = ''

type pydantic-field

type: StatType

value pydantic-field

value: float

Talent pydantic-model

Represents a character's talent.

Attributes:

  • id (int) –

    The talent's ID.

  • level (int) –

    The talent's level.

  • name (str) –

    The talent's name.

  • icon (str) –

    The talent's icon.

  • is_upgraded (bool) –

    Whether the talent's level is being upgraded by a constellation.

Fields:

icon pydantic-field

icon: str = ''

id pydantic-field

id: int

is_upgraded pydantic-field

is_upgraded: bool = False

level pydantic-field

level: int

name pydantic-field

name: str = ''

Weapon pydantic-model

Represents a weapon.

Attributes:

Fields:

Validators:

  • _extract_refinementrefinement
  • _convert_iconicon
  • _convert_statsstats
  • _stringify_text_map_hashname

ascension pydantic-field

ascension: Literal[0, 1, 2, 3, 4, 5, 6] = 0

icon pydantic-field

icon: str

item_id pydantic-field

item_id: int

item_type pydantic-field

item_type: ItemType

level pydantic-field

level: int

max_level property

max_level: int

name pydantic-field

name: str

rarity pydantic-field

rarity: int

refinement pydantic-field

refinement: Literal[1, 2, 3, 4, 5] = 1

stats pydantic-field

stats: list[Stat]