Skip to content

Models

hsr

Modules:

  • build
  • character
  • icon
  • player
  • response

Classes:

  • Build

    Represents a HSR build.

  • Character

    Represents a character in HSR.

  • CharacterIcon

    Represents a HSR character icon.

  • LightCone

    Represents a light cone (weapon.)

  • LightConeIcon

    Represents a HSR light cone icon.

  • Player

    Represents a HSR player.

  • PlayerStats

    Represents the statistics of a HSR player.

  • Relic

    Represents a relic in HSR.

  • RelicSubAffix

    Represents a relic's sub-stat information.

  • ShowcaseResponse

    Represents a HSR showcase response.

  • Stat

    Represents a HSR stat.

  • Trace

    Represents a character's trace (skill).

Build pydantic-model

Represents a HSR 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 in HSR.

Attributes:

Config:

  • arbitrary_types_allowed: True

Fields:

Validators:

ascension pydantic-field

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

eidolons pydantic-field

eidolons: list[Eidolon]

eidolons_unlocked pydantic-field

eidolons_unlocked: int = 0

element pydantic-field

element: Element = FIRE

enhanced pydantic-field

enhanced: bool = False

highest_dmg_bonus_stat property

highest_dmg_bonus_stat: Stat

Character's highest damage bonus stat.

icon pydantic-field

id pydantic-field

id: int

is_assist pydantic-field

is_assist: bool = False

level pydantic-field

level: int

light_cone pydantic-field

light_cone: LightCone | None = None

max_level property

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

Character's max level.

model_config class-attribute instance-attribute

model_config = ConfigDict(arbitrary_types_allowed=True)

name pydantic-field

name: str = ''

path pydantic-field

path: Path = ABUNDANCE

rarity pydantic-field

rarity: Literal[4, 5] = 4

relics pydantic-field

relics: list[Relic]

stats pydantic-field

stats: dict[StatType, Stat]

traces pydantic-field

traces: list[Trace]

CharacterIcon pydantic-model

Represents a HSR character icon.

Attributes:

Fields:

card property

card: str

Character icon in card shape.

Provided by Project Yatta. e.g. https://api.yatta.top/hsr/assets/UI//avatar/medium/1001.png

character_id pydantic-field

character_id: int

gacha property

gacha: str

Character gacha splash art.

e.g. https://enka.network/ui/hsr/SpriteOutput/AvatarDrawCard/1001.png

round property

round: str

Character icon in round shape.

e.g. https://enka.network/ui/hsr/SpriteOutput/AvatarRoundIcon/1001.png

LightCone pydantic-model

Represents a light cone (weapon.)

Attributes:

Config:

  • arbitrary_types_allowed: True

Fields:

Validators:

  • _stringify_namename
  • _flatten_flat

ascension pydantic-field

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

icon pydantic-field

id pydantic-field

id: int

level pydantic-field

level: int

max_level property

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

Light Cone's max level.

model_config class-attribute instance-attribute

model_config = ConfigDict(arbitrary_types_allowed=True)

name pydantic-field

name: str

path pydantic-field

path: Path = NONE

rarity pydantic-field

rarity: Literal[3, 4, 5] = 3

stats pydantic-field

stats: list[Stat]

superimpose pydantic-field

superimpose: Literal[1, 2, 3, 4, 5]

LightConeIcon pydantic-model

Represents a HSR light cone icon.

Attributes:

Fields:

image property

image: str

Light cone icon image.

e.g. https://enka.network/ui/hsr/SpriteOutput/LightConeFigures/20000.png

item property

item: str

Light cone icon item.

Provided by Project Yatta. e.g. https://api.yatta.top/hsr/assets/UI//equipment/medium/20000.png

light_cone_id pydantic-field

light_cone_id: int

Player pydantic-model

Represents a HSR player.

Attributes:

Fields:

Validators:

  • _stringify_iconicon

equilibrium_level pydantic-field

equilibrium_level: int = 0

friend_count pydantic-field

friend_count: int = 0

icon pydantic-field

icon: str = ''

level pydantic-field

level: int

nickname pydantic-field

nickname: str

signature pydantic-field

signature: str = ''

stats pydantic-field

stats: PlayerStats

uid pydantic-field

uid: int

PlayerStats pydantic-model

Represents the statistics of a HSR player.

Attributes:

Fields:

achievement_count pydantic-field

achievement_count: int = 0

book_count pydantic-field

book_count: int | None = None

character_count pydantic-field

character_count: int

light_cone_count pydantic-field

light_cone_count: int = 0

max_simulated_universe_world pydantic-field

max_simulated_universe_world: int | None = None

music_count pydantic-field

music_count: int | None = None

relic_count pydantic-field

relic_count: int | None = None

Relic pydantic-model

Represents a relic in HSR.

Attributes:

Fields:

Validators:

  • _stringify_set_nameset_name
  • _extract_props

icon pydantic-field

icon: str = ''

id pydantic-field

id: int

level pydantic-field

level: int = 0

main_affix_id pydantic-field

main_affix_id: int

main_stat property

main_stat: Stat

The relic's main stat.

rarity pydantic-field

rarity: Literal[3, 4, 5] = 3

set_id pydantic-field

set_id: int = 0

set_name pydantic-field

set_name: str = ''

stats pydantic-field

stats: list[Stat]

sub_affix_list pydantic-field

sub_affix_list: list[RelicSubAffix]

sub_stats property

sub_stats: list[Stat]

The relic's sub-stats.

type pydantic-field

type: RelicType

RelicSubAffix pydantic-model

Represents a relic's sub-stat information.

Attributes:

  • id (int) –

    The ID of the sub-stat.

  • cnt (int) –

    The count of the sub-stat.

  • step (int | None) –

    The step of the sub-stat.

Fields:

cnt pydantic-field

cnt: int

id pydantic-field

id: int

step pydantic-field

step: int | None = None

ShowcaseResponse pydantic-model

Represents a HSR showcase response.

Attributes:

Fields:

Validators:

  • _flatten_data

characters pydantic-field

characters: list[Character]

owner pydantic-field

owner: Owner | None = None

player pydantic-field

player: Player

ttl pydantic-field

ttl: int = 0

uid pydantic-field

uid: str

Stat pydantic-model

Represents a HSR stat.

Attributes:

Fields:

formatted_value property

formatted_value: str

The formatted value of the stat.

icon pydantic-field

icon: str = ''

is_percentage property

is_percentage: bool

Whether the stat is a percentage stat.

name pydantic-field

name: str = ''

type pydantic-field

type: StatType

value pydantic-field

value: float

Trace pydantic-model

Represents a character's trace (skill).

Attributes:

Fields:

anchor pydantic-field

anchor: str = ''

boosted pydantic-field

boosted: bool = False

Whether the level of this trace is boosted by an activated eidolon's effect.

icon pydantic-field

icon: str = ''

id pydantic-field

id: int

level pydantic-field

level: int

max_level pydantic-field

max_level: int = 0

type pydantic-field