Skip to content

Models

Artifact

Bases: BaseModel

Represents an artifact.

Attributes:

Name Type Description
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.

BaseBuild

Bases: BaseModel, Generic[C]

Represents a character build.

Attributes:

Name Type Description
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.

Build

Bases: BaseBuild[Character]

Represents a Genshin Impact build.

Attributes:

Name Type Description
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.

Character

Bases: BaseModel

Represents a character.

Attributes:

Name Type Description
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.

constellations_unlocked property

The number of constellations unlocked.

highest_dmg_bonus_stat property

The character's highest damage bonus stat.

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

max_level property

The character's max level.

specialized_stat property

The character's specialized stat

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

Constellation

Bases: BaseModel

Represents a character's constellation.

Attributes:

Name Type Description
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.

Costume

Bases: BaseModel

Represents a character's costume.

Attributes:

Name Type Description
id int

The costume's ID.

icon Icon

The costume's icon.

icon property

The costume's icon.

FightProp

Bases: BaseModel

Represents a character's stat (property.)

Attributes:

Name Type Description
type FightPropType | int

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

value float

The fight prop's value.

name str

The fight prop's name.

formatted_value property

The formatted value of the stat.

is_percentage property

Whether this stat is a percentage stat.

Icon

Bases: BaseModel

Represents an icon in Genshin Impact.

Attributes:

Name Type Description
side_icon_ui_path str

The side icon UI path of the character.

is_costume bool

Whether the icon is for a costume.

circle property

The circle (round) icon of the character.

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

front property

The front icon of the character.

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

gacha property

The gacha art of the character.

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

icon_ui_path property

The icon UI path of the character.

e.g. UI_AvatarIcon_Ambor

side property

The side icon of the character.

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

Namecard

Bases: BaseModel

Represents a namecard in Genshin Impact.

Attributes:

Name Type Description
ui_path str

The UI path of the namecard.

full property

The full namecard.

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

icon property

The namecard's icon.

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

Player

Bases: BaseModel

Represents a Genshin Impact player.

Attributes:

Name Type Description
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.

ShowcaseCharacter

Bases: BaseModel

Represents a showcase character.

Attributes:

Name Type Description
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.

ShowcaseResponse

Bases: BaseModel

Represents a Genshin Impact showcase response.

Attributes:

Name Type Description
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.

Stat

Bases: BaseModel

Represents a stat.

Attributes:

Name Type Description
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.

formatted_value property

"The formatted value of the stat.

is_percentage property

Whether this stat is a percentage stat.

Talent

Bases: BaseModel

Represents a character's talent.

Attributes:

Name Type Description
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.

Weapon

Bases: BaseModel

Represents a weapon.

Attributes:

Name Type Description
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.