API Reference
gi
Modules:
-
artifact–Genshin Impact artifact models.
-
character–Genshin Impact character models.
-
mw–Miliastra Wonderland costume and item models.
-
new–Genshin Impact new data model.
-
stygian–Genshin Impact Stygian Onslaught models.
-
weapon–Genshin Impact weapon models.
Classes:
-
Artifact–Represent a Genshin Impact artifact.
-
ArtifactSet–Represent a Genshin Impact artifact set.
-
ArtifactSetDetail–Represent a Genshin Impact artifact set detail.
-
ArtifactSetDetailSetEffects–Represent set effects of an artifact set detail.
-
ArtifactSetEffect–Represent an artifact set effect.
-
ArtifactSetEffects–Represent artifact set effects.
-
Character–Represent a Genshin Impact character.
-
CharacterConstellation–Represent a character's constellation.
-
CharacterDetail–Represent a Genshin Impact character detail.
-
CharacterInfo–Represent a character's information.
-
CharacterPassive–Represent a character's passive talent.
-
CharacterSkill–Represent a character's skill.
-
CharacterStatsModifier–Represent a character's stat modifiers.
-
FightPropGrowthCurve–Represent a character's stat growth curve data.
-
MWCostume–Miliastra Wonderland costume
-
MWCostumeSet–Miliastra Wonderland costume set
-
MWItem–Miliastra Wonderland item
-
Namecard–Represent a character's namecard.
-
New–Represent new Genshin Impact data.
-
SetEffect–Represent a set effect.
-
SkillUpgradeInfo–Represent a character's skill upgrade information.
-
Stygian–A Stygian Onslaught entry.
-
StygianDetail–Details of a Stygian Onslaught entry.
-
StygianDifficultyConfig–Configuration for a Stygian Onslaught difficulty.
-
StygianEnemy–A Stygian Onslaught enemy.
-
StygianEnemyBuff–A buff associated with a Stygian Abyss enemy.
-
StygianEnemyRecommendation–Recommendations for dealing with a Stygian Abyss enemy.
-
StygianLevel–A Stygian Onslaught level.
-
UpgradeMaterial–Represent a character's upgrade material.
-
UpgradeMaterialInfo–Represent character's upgrade material information.
-
UpgradeMaterialInfos–Represent character's upgrade material information.
-
Weapon–Represent a Genshin Impact weapon.
-
WeaponDetail–Represent a Genshin Impact weapon detail.
-
WeaponProperty–Represent a weapon's property.
-
WeaponRefinement–Represent a weapon's refinement.
-
WeaponStatModifier–Represent a weapon's stat modifier.
Artifact
pydantic-model
ArtifactSet
pydantic-model
Represent a Genshin Impact artifact set.
Attributes:
-
id(int) –ID of the artifact set.
-
icon(str) –Icon URL of the artifact set.
-
rarities(list[int]) –List of rarities for the artifact set.
-
set_effect(ArtifactSetEffects) –Set effects of the artifact set.
-
names(dict[Literal['en', 'ko', 'zh', 'ja'], str]) –Dictionary of names in different languages.
-
name(str) –Name of the artifact set.
Fields:
-
id(int) -
icon(str) -
rarities(list[int]) -
set_effect(ArtifactSetEffects) -
names(dict[Literal['en', 'ko', 'zh', 'ja'], str]) -
name(str)
Validators:
-
__format_fields -
__convert_icon→icon -
__assign_set_effects→set_effect -
__extract_names
ArtifactSetDetail
pydantic-model
Represent a Genshin Impact artifact set detail.
Attributes:
-
id(int) –ID of the artifact set.
-
icon(str) –Icon URL of the artifact set.
-
set_effect(ArtifactSetDetailSetEffects) –Set effects of the artifact set.
-
parts(dict[str, Artifact]) –Parts of the artifact set.
Fields:
-
id(int) -
icon(str) -
set_effect(ArtifactSetDetailSetEffects) -
parts(dict[str, Artifact])
Validators:
-
__format_fields -
__convert_icon→icon -
__assign_set_effect→set_effect
ArtifactSetDetailSetEffects
pydantic-model
Represent set effects of an artifact set detail.
Attributes:
-
two_piece(SetEffect) –Two-piece set effect.
-
four_piece(SetEffect | None) –Four-piece set effect, if available.
Fields:
-
two_piece(SetEffect) -
four_piece(SetEffect | None)
Validators:
-
__format_fields
ArtifactSetEffect
pydantic-model
Represent an artifact set effect.
Attributes:
-
names(dict[Literal['en', 'ko', 'zh', 'ja'], str]) –Dictionary of names in different languages.
-
name(str) –Name of the artifact set effect.
-
descriptions(dict[Literal['en', 'ko', 'zh', 'ja'], str]) –Dictionary of descriptions in different languages.
-
description(str) –Description of the artifact set effect.
Fields:
-
names(dict[Literal['en', 'ko', 'zh', 'ja'], str]) -
name(str) -
descriptions(dict[Literal['en', 'ko', 'zh', 'ja'], str]) -
description(str)
Validators:
-
__format_fields -
__transform_names
ArtifactSetEffects
pydantic-model
Represent artifact set effects.
Attributes:
-
two_piece(ArtifactSetEffect) –Two-piece set effect.
-
four_piece(ArtifactSetEffect | None) –Four-piece set effect, if available.
Fields:
-
two_piece(ArtifactSetEffect) -
four_piece(ArtifactSetEffect | None)
Validators:
-
__format_fields
Character
pydantic-model
Represent a Genshin Impact character.
Attributes:
-
id(str) –ID of the character.
-
icon(str) –Icon URL of the character.
-
rarity(Literal[4, 5]) –Rarity of the character.
-
description(str) –Description of the character.
-
element(GIElement | None) –Element of the character, if available.
-
names(dict[Literal['en', 'zh', 'ko', 'ja'], str]) –Dictionary of names in different languages.
-
name(str) –Name of the character.
Fields:
-
id(str) -
icon(str) -
rarity(Literal[4, 5]) -
description(str) -
element(GIElement | None) -
names(dict[Literal['en', 'zh', 'ko', 'ja'], str]) -
name(str)
Validators:
-
__format_fields -
__convert_icon→icon -
__convert_rarity→rarity -
__convert_element→element -
__transform_names
CharacterConstellation
pydantic-model
Represent a character's constellation.
Attributes:
-
name(str) –Name of the constellation.
-
description(str) –Description of the constellation.
-
parameters(list[float]) –List of parameters for the constellation.
-
icon(str) –Icon URL of the constellation.
Fields:
-
name(str) -
description(str) -
parameters(list[float]) -
icon(str)
Validators:
-
__format_fields -
__convert_icon→icon
CharacterDetail
pydantic-model
Represent a Genshin Impact character detail.
Attributes:
-
name(str) –Name of the character.
-
description(str) –Description of the character.
-
info(CharacterInfo) –Character information.
-
rarity(Literal[4, 5]) –Rarity of the character.
-
icon(str) –Icon URL of the character.
-
skills(list[CharacterSkill]) –List of character skills.
-
passives(list[CharacterPassive]) –List of character passive talents.
-
constellations(list[CharacterConstellation]) –List of character constellations.
-
stamina_recovery(float) –Stamina recovery rate of the character.
-
base_hp(float) –Base HP of the character.
-
base_atk(float) –Base ATK of the character.
-
base_def(float) –Base DEF of the character.
-
crit_rate(float) –Critical rate of the character.
-
crit_dmg(float) –Critical damage of the character.
-
stats_modifier(CharacterStatsModifier) –Character stat modifiers.
-
upgrade_materials(UpgradeMaterialInfos) –Character upgrade materials.
Fields:
-
name(str) -
description(str) -
info(CharacterInfo) -
rarity(Literal[4, 5]) -
icon(str) -
skills(list[CharacterSkill]) -
passives(list[CharacterPassive]) -
constellations(list[CharacterConstellation]) -
stamina_recovery(float) -
base_hp(float) -
base_atk(float) -
base_def(float) -
crit_rate(float) -
crit_dmg(float) -
stats_modifier(CharacterStatsModifier) -
upgrade_materials(UpgradeMaterialInfos)
Validators:
CharacterInfo
pydantic-model
CharacterPassive
pydantic-model
Represent a character's passive talent.
Attributes:
-
name(str) –Name of the passive talent.
-
description(str) –Description of the passive talent.
-
parameters(list[float]) –List of parameters for the passive talent.
-
icon(str) –Icon URL of the passive talent.
Fields:
Validators:
-
__format_fields -
__convert_icon→icon
CharacterSkill
pydantic-model
Represent a character's skill.
Attributes:
-
name(str) –Name of the skill.
-
description(str) –Description of the skill.
-
upgrade_info(dict[str, SkillUpgradeInfo]) –Dictionary of skill upgrade information.
Fields:
-
name(str) -
description(str) -
upgrade_info(dict[str, SkillUpgradeInfo])
Validators:
-
__format_fields
CharacterStatsModifier
pydantic-model
Represent a character's stat modifiers.
Attributes:
-
hp(dict[str, float]) –HP stat modifiers.
-
atk(dict[str, float]) –ATK stat modifiers.
-
def_(dict[str, float]) –DEF stat modifiers.
-
ascension(list[dict[str, float]]) –List of ascension stat modifiers.
-
prop_growth_curves(list[FightPropGrowthCurve] | None) –List of property growth curves.
Fields:
-
hp(dict[str, float]) -
atk(dict[str, float]) -
def_(dict[str, float]) -
ascension(list[dict[str, float]]) -
prop_growth_curves(list[FightPropGrowthCurve] | None)
Validators:
-
__format_fields
FightPropGrowthCurve
pydantic-model
Represent a character's stat growth curve data.
Attributes:
-
stat_type(str) –Type of the stat.
-
growth_type(str) –Type of the growth curve.
Fields:
-
stat_type(str) -
growth_type(str)
Validators:
-
__format_fields
MWCostume
pydantic-model
MWCostumeSet
pydantic-model
MWItem
pydantic-model
Namecard
pydantic-model
New
pydantic-model
Represent new Genshin Impact data.
Attributes:
-
character_ids(list[str | int]) –A list of character IDs.
-
weapon_ids(list[int]) –A list of weapon IDs.
-
artifact_set_ids(list[int]) –A list of artifact set IDs.
-
monster_ids(list[int]) –A list of monster IDs.
-
item_ids(list[int]) –A list of item IDs.
-
version(str) –The current version.
Fields:
-
character_ids(list[str | int]) -
weapon_ids(list[int]) -
artifact_set_ids(list[int]) -
monster_ids(list[int]) -
item_ids(list[int]) -
version(str)
Validators:
-
__format_fields
SetEffect
pydantic-model
Represent a set effect.
Attributes:
-
id(int) –ID of the set effect.
-
affix_id(int) –Affix ID of the set effect.
-
name(str) –Name of the set effect.
-
description(str) –Description of the set effect.
-
parameters(list[float]) –List of parameters for the set effect.
Fields:
Validators:
-
__format_fields
SkillUpgradeInfo
pydantic-model
Represent a character's skill upgrade information.
Attributes:
-
level(int) –Level of the skill upgrade.
-
icon(str) –Icon URL of the skill upgrade.
-
attributes(list[str]) –List of attributes for the skill upgrade.
-
parameters(list[float]) –List of parameters for the skill upgrade.
Fields:
-
level(int) -
icon(str) -
attributes(list[str]) -
parameters(list[float])
Validators:
-
__format_fields -
__convert_icon→icon -
__remove_empty_attributes→attributes
Stygian
pydantic-model
A Stygian Onslaught entry.
Attributes:
-
id(int) –The Stygian ID.
-
names(dict[Literal['en', 'zh', 'ko', 'ja'], str]) –A dictionary of names in different languages.
-
beta_start_at(datetime | None) –The start datetime of the beta period, if applicable.
-
beta_end_at(datetime | None) –The end datetime of the beta period, if applicable.
-
live_start_at(datetime | None) –The start datetime of the live period, if applicable.
-
live_end_at(datetime | None) –The end datetime of the live period, if applicable.
-
name(str) –The name of the Stygian (added in post-processing).
Fields:
-
id(int) -
names(dict[Literal['en', 'zh', 'ko', 'ja'], str]) -
beta_start_at(datetime | None) -
beta_end_at(datetime | None) -
live_start_at(datetime | None) -
live_end_at(datetime | None) -
name(str)
Validators:
-
__format_fields -
__transform_names
StygianDetail
pydantic-model
Details of a Stygian Onslaught entry.
Attributes:
-
id(int) –The Stygian ID.
-
name(str) –The name of the Stygian.
-
start_at(datetime) –The start datetime of the Stygian event.
-
end_at(datetime) –The end datetime of the Stygian event.
-
levels(dict[int, StygianLevel]) –A mapping of level IDs to StygianLevel objects.
Fields:
Validators:
-
__format_fields -
__process_levels→levels
StygianDifficultyConfig
pydantic-model
StygianEnemy
pydantic-model
A Stygian Onslaught enemy.
Attributes:
-
id(int) –The enemy ID.
-
name(str) –The enemy name.
-
description(str) –The enemy description.
-
icon(str) –The enemy icon URL.
-
buffs(list[StygianEnemyBuff]) –A list of buffs associated with the enemy.
-
recommendation(StygianEnemyRecommendation | None) –Recommendations for dealing with the enemy.
Fields:
-
id(int) -
name(str) -
description(str) -
icon(str) -
buffs(list[StygianEnemyBuff]) -
recommendation(StygianEnemyRecommendation | None)
Validators:
-
__format_fields -
__process_icon→icon -
__process_model
StygianEnemyBuff
pydantic-model
A buff associated with a Stygian Abyss enemy.
Attributes:
-
name(str) –The buff name.
-
description(str) –The buff description.
Fields:
-
name(str) -
description(str)
Validators:
-
__format_fields
StygianEnemyRecommendation
pydantic-model
Recommendations for dealing with a Stygian Abyss enemy.
Attributes:
-
recommend(str) –Recommended strategies or characters.
-
dont_recommend(str | None) –Strategies or characters to avoid.
Fields:
-
recommend(str) -
dont_recommend(str | None)
Validators:
-
__format_fields -
__remove_color_tags→recommend,dont_recommend
StygianLevel
pydantic-model
A Stygian Onslaught level.
Attributes:
-
id(int) –The level ID.
-
enemy_level(int) –The enemy level.
-
difficulty_config(StygianDifficultyConfig) –The difficulty configuration.
-
enemies(dict[int, StygianEnemy]) –A mapping of enemy IDs to enemy details.
Fields:
-
id(int) -
enemy_level(int) -
difficulty_config(StygianDifficultyConfig) -
enemies(dict[int, StygianEnemy])
Validators:
-
__format_fields -
__process_enemies→enemies
UpgradeMaterial
pydantic-model
UpgradeMaterialInfo
pydantic-model
Represent character's upgrade material information.
Attributes:
-
materials(list[UpgradeMaterial]) –List of upgrade materials.
-
mora_cost(int) –Mora cost for the upgrade.
Fields:
Validators:
-
__format_fields
UpgradeMaterialInfos
pydantic-model
Represent character's upgrade material information.
Attributes:
-
ascensions(list[UpgradeMaterialInfo]) –List of upgrade material information for ascensions.
-
talents(list[list[UpgradeMaterialInfo]]) –List of lists of upgrade material information for talents.
Fields:
Validators:
-
__format_fields
Weapon
pydantic-model
Represent a Genshin Impact weapon.
Attributes:
-
id(int) –ID of the weapon.
-
icon(str) –Icon URL of the weapon.
-
rarity(Literal[1, 2, 3, 4, 5]) –Rarity of the weapon.
-
description(str) –Description of the weapon.
-
names(dict[Literal['en', 'zh', 'ko', 'ja'], str]) –Dictionary of names in different languages.
-
name(str) –Name of the weapon.
Fields:
-
id(int) -
icon(str) -
rarity(Literal[1, 2, 3, 4, 5]) -
description(str) -
names(dict[Literal['en', 'zh', 'ko', 'ja'], str]) -
name(str)
Validators:
-
__format_fields -
__convert_icon→icon -
__transform_names
WeaponDetail
pydantic-model
Represent a Genshin Impact weapon detail.
Attributes:
-
name(str) –Name of the weapon.
-
description(str) –Description of the weapon.
-
rarity(Literal[1, 2, 3, 4, 5]) –Rarity of the weapon.
-
icon(str) –Icon URL of the weapon.
-
stat_modifiers(dict[str, WeaponStatModifier] | None) –Dictionary of stat modifiers for the weapon.
-
xp_requirements(dict[str, float] | None) –Dictionary of XP requirements for the weapon.
-
ascension(dict[str, dict[str, float]] | None) –Dictionary of ascension data for the weapon.
-
refinments(dict[str, WeaponRefinement] | None) –Dictionary of refinements for the weapon.
Fields:
-
name(str) -
description(str) -
rarity(Literal[1, 2, 3, 4, 5]) -
icon(str) -
stat_modifiers(dict[str, WeaponStatModifier] | None) -
xp_requirements(dict[str, float] | None) -
ascension(dict[str, dict[str, float]] | None) -
refinments(dict[str, WeaponRefinement] | None)
Validators:
-
__format_fields -
__convert_icon→icon
WeaponProperty
pydantic-model
Represent a weapon's property.
Attributes:
-
type(str) –Type of the property.
-
init_value(float) –Initial value of the property.
-
growth_type(str) –Growth type of the property.
Fields:
-
type(str) -
init_value(float) -
growth_type(str)
Validators:
-
__format_fields
WeaponRefinement
pydantic-model
Represent a weapon's refinement.
Attributes:
-
name(str) –Name of the refinement.
-
description(str) –Description of the refinement.
-
parameters(list[float]) –List of parameters for the refinement.
Fields:
-
name(str) -
description(str) -
parameters(list[float])
Validators:
-
__format_fields