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:
-
id(int) –The artifact's ID.
-
main_stat_id(int) –The main stat's ID.
-
sub_stat_ids(list[int]) –The sub stats' IDs.
-
level(int) –The artifact's level.
-
equip_type(EquipmentType) –The artifact's type (e.g. FLOWER, GOBLET).
-
icon(str) –The artifact's icon.
-
item_type(ItemType) –The artifact's type.
-
name(str) –The artifact's name.
-
rarity(int) –The artifact's rarity.
-
main_stat(Stat) –The artifact's main stat.
-
sub_stats(list[Stat]) –The artifact's sub stats.
-
set_name(str) –The artifact's set name.
Fields:
-
id(int) -
main_stat_id(int) -
sub_stat_ids(list[int]) -
level(int) -
equip_type(EquipmentType) -
icon(str) -
item_type(ItemType) -
name(str) -
rarity(int) -
main_stat(Stat) -
sub_stats(list[Stat]) -
set_name(str)
Validators:
-
_convert_level→level -
_convert_icon→icon -
_convert_main_stat→main_stat -
_convert_sub_stats→sub_stats -
_stringify_text_map_hash→name,set_name
Build
pydantic-model
Character
pydantic-model
Represents a character.
Attributes:
-
id(int) –The character's ID.
-
artifacts(list[Artifact]) –The character's artifacts.
-
weapon(Weapon) –The character's weapon.
-
stats(dict[FightPropType | int, FightProp]) –The character's stats.
-
constellations(list[Constellation]) –The character's unlocked constellations.
-
talents(list[Talent]) –The character's talents.
-
ascension(Literal[0, 1, 2, 3, 4, 5, 6]) –The character's ascension level.
-
level(int) –The character's level.
-
skill_depot_id(int) –The character's skill depot ID.
-
name(str) –The character's name.
-
talent_extra_level_map(dict[str, int] | None) –The map of character's extra talent levels, this is only used internally, the wrapper will handle this.
-
icon(Icon) –The character's icon.
-
friendship_level(int) –The character's friendship level (1~10).
-
element(Element) –The character's element.
-
talent_order(list[int]) –The character's talent order. 1. Normal attack 2. Elemental skill 3. Elemental burst
-
rarity(int) –The character's rarity (4~5).
-
max_level(Literal[20, 40, 50, 60, 70, 80, 90]) –The character's max level.
-
highest_dmg_bonus_stat(FightProp) –The character's highest damage bonus stat.
-
namecard(Namecard | None) –The character's namecard. Travelers don't have namecards.
-
costume(Costume | None) –The character's costume, if any.
-
costume_id(int | None) –The character's costume's ID, if any.
-
constellations_unlocked(int) –The number of constellations unlocked.
Config:
default:{'arbitrary_types_allowed': True}
Fields:
-
id(int) -
artifacts(list[Artifact]) -
weapon(Weapon) -
stats(dict[FightPropType | int, FightProp]) -
constellations(list[Constellation]) -
talents(list[Talent]) -
ascension(Literal[0, 1, 2, 3, 4, 5, 6]) -
level(int) -
skill_depot_id(int) -
talent_extra_level_map(dict[str, int] | None) -
friendship_level(int) -
name(str) -
icon(Icon) -
element(Element) -
talent_order(list[int]) -
rarity(int) -
namecard(Namecard | None) -
costume(Costume | None) -
costume_id(int | None)
Validators:
-
_intify_ascension→ascension -
_convert_stats→stats -
_convert_constellations→constellations -
_convert_talents→talents -
_flatten_weapon_data→weapon -
_flatten_artifacts_data→artifacts -
_transform_values
constellations_unlocked
property
constellations_unlocked: int
The number of constellations unlocked.
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.).
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).
Constellation
pydantic-model
Costume
pydantic-model
FightProp
pydantic-model
Icon
pydantic-model
Represents an icon in Genshin Impact.
Attributes:
-
side_icon_ui_path(str) –The side icon UI path of the character.
-
is_costume(bool) –Whether the icon is for a costume.
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
side
property
side: str
The side icon of the character.
e.g. https://enka.network/ui/UI_AvatarIcon_Side_Ambor.png
Namecard
pydantic-model
Represents a namecard in Genshin Impact.
Attributes:
Fields:
Player
pydantic-model
Represents a Genshin Impact player.
Attributes:
-
achievements(int) –The number of completed achievements.
-
level(int) –The player's adventure level.
-
namecard_id(int) –The player's namecard's ID.
-
namecard(Namecard) –The player's namecard.
-
nickname(str | None) –The player's nickname.
-
signature(str | None) –The player's signature.
-
abyss_floor(int) –The player's Spiral Abyss floor.
-
abyss_level(int) –The player's Spiral Abyss level.
-
world_level(int) –The player's world level.
-
profile_picture_id(int) –The player's profile picture's ID.
-
profile_picture_icon(Icon) –The player's profile picture's icon.
-
showcase_characters(list[ShowcaseCharacter]) –The player's showcase characters.
-
max_friendship_character_count(int | None) –The maximum number of characters with friendship level 10.
-
abyss_stars(int | None) –The number of stars in Spiral Abyss.
-
theater_stars(int | None) –The number of stars in Imaginarium Theater.
-
theater_act(int | None) –The current act in Imaginarium Theater.
-
stygian_difficulty(Literal[1, 2, 3, 4, 5, 6, 7] | None) –The maximum difficulty reached in Stygian Onslaught.
-
stygian_clear_time(int | None) –The clear time for Stygian Onslaught.
Config:
default:{'arbitrary_types_allowed': True}
Fields:
-
achievements(int) -
level(int) -
namecard_id(int) -
namecard(Namecard) -
nickname(str | None) -
signature(str | None) -
abyss_floor(int) -
abyss_level(int) -
world_level(int) -
profile_picture_id(int) -
profile_picture_icon(Icon) -
showcase_characters(list[ShowcaseCharacter]) -
max_friendship_character_count(int | None) -
abyss_stars(int | None) -
theater_stars(int | None) -
theater_act(int | None) -
stygian_difficulty(Literal[1, 2, 3, 4, 5, 6, 7] | None) -
stygian_clear_time(int | None)
Validators:
-
_extract_avatar_id→profile_picture_id
ShowcaseCharacter
pydantic-model
ShowcaseResponse
pydantic-model
Represents a Genshin Impact showcase response.
Attributes:
-
characters(list[Character]) –The characters in the showcase.
-
player(Player) –The player of the showcase.
-
ttl(int) –The time to live of the response.
-
uid(str) –The UID of the showcase.
-
owner(Owner | None) –The owner of the showcase's account.
Fields:
Validators:
-
__handle_none_value→characters
Stat
pydantic-model
Talent
pydantic-model
Weapon
pydantic-model
Represents a weapon.
Attributes:
-
item_id(int) –The weapon's ID.
-
refinement(Literal[1, 2, 3, 4, 5]) –The weapon's refinement level (1~5).
-
level(int) –The weapon's level.
-
ascension(Literal[0, 1, 2, 3, 4, 5, 6]) –The weapon's ascension level.
-
icon(str) –The weapon's icon.
-
name(str) –The weapon's name.
-
rarity(int) –The weapon's rarity.
-
stats(list[Stat]) –The weapon's stats.
Fields:
-
item_id(int) -
refinement(Literal[1, 2, 3, 4, 5]) -
level(int) -
ascension(Literal[0, 1, 2, 3, 4, 5, 6]) -
icon(str) -
item_type(ItemType) -
name(str) -
rarity(int) -
stats(list[Stat])
Validators:
-
_extract_refinement→refinement -
_convert_icon→icon -
_convert_stats→stats -
_stringify_text_map_hash→name