Module genshin.models.starrail.chronicle.challenge
Starrail chronicle challenge.
Classes
class APCShadowBoss (**data: Any)-
Expand source code
class APCShadowBoss(APIModel): """Boss in an apocalyptic shadow challenge.""" id: int name: str = Aliased("name_mi18n") icon: strBoss in an apocalyptic shadow challenge.
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.selfis explicitly positional-only to allowselfas a field name.Ancestors
- APIModel
- pydantic.main.BaseModel
Class variables
var icon : strvar id : intvar model_config : pydantic.config.ConfigDictvar name : str
class APCShadowFloor (**data: Any)-
Expand source code
class APCShadowFloor(StarRailChallengeFloor): """Floor in an apocalyptic shadow challenge.""" node_1: typing.Optional[APCShadowFloorNode] = Aliased(default=None) node_2: typing.Optional[APCShadowFloorNode] = Aliased(default=None) node_3: typing.Optional[APCShadowFloorNode] = Aliased(default=None) last_update_time: PartialTime @property def score(self) -> int: """Total score of the floor.""" node_1_score = self.node_1.score if self.node_1 is not None else 0 node_2_score = self.node_2.score if self.node_2 is not None else 0 node_3_score = self.node_3.score if self.node_3 is not None else 0 return node_1_score + node_2_score + node_3_scoreFloor in an apocalyptic shadow challenge.
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.selfis explicitly positional-only to allowselfas a field name.Ancestors
- StarRailChallengeFloor
- APIModel
- pydantic.main.BaseModel
Class variables
var last_update_time : PartialTimevar model_config : pydantic.config.ConfigDictvar node_1 : APCShadowFloorNode | Nonevar node_2 : APCShadowFloorNode | Nonevar node_3 : APCShadowFloorNode | None
Instance variables
prop score : int-
Expand source code
@property def score(self) -> int: """Total score of the floor.""" node_1_score = self.node_1.score if self.node_1 is not None else 0 node_2_score = self.node_2.score if self.node_2 is not None else 0 node_3_score = self.node_3.score if self.node_3 is not None else 0 return node_1_score + node_2_score + node_3_scoreTotal score of the floor.
Inherited members
class APCShadowFloorNode (**data: Any)-
Expand source code
class APCShadowFloorNode(FloorNode): """Node for a apocalyptic shadow floor.""" challenge_time: typing.Optional[PartialTime] # type: ignore[assignment] buff: typing.Optional[ChallengeBuff] score: int boss_defeated: bool @property def has_data(self) -> bool: """Check if the node has data.""" return bool(self.avatars)Node for a apocalyptic shadow floor.
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.selfis explicitly positional-only to allowselfas a field name.Ancestors
Class variables
var boss_defeated : boolvar buff : ChallengeBuff | Nonevar challenge_time : PartialTime | Nonevar model_config : pydantic.config.ConfigDictvar score : int
Instance variables
prop has_data : bool-
Expand source code
@property def has_data(self) -> bool: """Check if the node has data.""" return bool(self.avatars)Check if the node has data.
class APCShadowSeason (**data: Any)-
Expand source code
class APCShadowSeason(StarRailChallengeSeason): """Season of an apocalyptic shadow challenge.""" upper_boss: typing.Optional[APCShadowBoss] = Aliased(default=None) lower_boss: typing.Optional[APCShadowBoss] = Aliased(default=None) starward_boss: typing.Optional[APCShadowBoss] = Aliased("tierce_boss", default=None)Season of an apocalyptic shadow challenge.
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.selfis explicitly positional-only to allowselfas a field name.Ancestors
- StarRailChallengeSeason
- APIModel
- pydantic.main.BaseModel
Class variables
var lower_boss : APCShadowBoss | Nonevar model_config : pydantic.config.ConfigDictvar starward_boss : APCShadowBoss | Nonevar upper_boss : APCShadowBoss | None
class AnomalyArbitration (**data: Any)-
Expand source code
class AnomalyArbitration(APIModel): """HSR Anomaly Arbitration info.""" records: list[AnomalyRecord] = Aliased("challenge_peak_records") summary: typing.Optional[AnomalySummary] = Aliased("challenge_peak_best_record_brief", default=None) player: AnomalyPlayer = Aliased("role")HSR Anomaly Arbitration info.
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.selfis explicitly positional-only to allowselfas a field name.Ancestors
- APIModel
- pydantic.main.BaseModel
Class variables
var model_config : pydantic.config.ConfigDictvar player : AnomalyPlayervar records : list[AnomalyRecord]var summary : AnomalySummary | None
class AnomalyBossInfo (**data: Any)-
Expand source code
class AnomalyBossInfo(APIModel): """Anomaly Arbitration boss info.""" id: int = Aliased("maze_id") name: str = Aliased("name_mi18n") game_mode_name: str = Aliased("hard_mode_name_mi18n") icon: strAnomaly Arbitration boss info.
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.selfis explicitly positional-only to allowselfas a field name.Ancestors
- APIModel
- pydantic.main.BaseModel
Class variables
var game_mode_name : strvar icon : strvar id : intvar model_config : pydantic.config.ConfigDictvar name : str
class AnomalyBossRecord (**data: Any)-
Expand source code
class AnomalyBossRecord(APIModel): """Anomaly Arbitration boss record.""" id: int = Aliased("maze_id") has_data: bool = Aliased("has_challenge_record") time: PartialTime = Aliased("challenge_time") characters: list[FloorCharacter] = Aliased("avatars") buff: ChallengeBuff is_hard_mode: bool = Aliased("hard_mode") cycles_used: int = Aliased("round_num") stars: int = Aliased("star_num") has_color_medal: bool = Aliased("finish_color_medal") medal_type: str = Aliased("challenge_peak_rank_icon_type") medal_icon: str = Aliased("challenge_peak_rank_icon") record_unique_key: strAnomaly Arbitration boss record.
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.selfis explicitly positional-only to allowselfas a field name.Ancestors
- APIModel
- pydantic.main.BaseModel
Class variables
var buff : ChallengeBuffvar characters : list[FloorCharacter]var cycles_used : intvar has_color_medal : boolvar has_data : boolvar id : intvar is_hard_mode : boolvar medal_icon : strvar medal_type : strvar model_config : pydantic.config.ConfigDictvar record_unique_key : strvar stars : intvar time : PartialTime
class AnomalyMiniBossInfo (**data: Any)-
Expand source code
class AnomalyMiniBossInfo(APIModel): """Anomaly Arbitration mini boss info.""" id: int = Aliased("maze_id") level_name: str = Aliased("name") name: str = Aliased("monster_name") icon: str = Aliased("monster_icon")Anomaly Arbitration mini boss info.
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.selfis explicitly positional-only to allowselfas a field name.Ancestors
- APIModel
- pydantic.main.BaseModel
Class variables
var icon : strvar id : intvar level_name : strvar model_config : pydantic.config.ConfigDictvar name : str
class AnomalyMiniBossRecord (**data: Any)-
Expand source code
class AnomalyMiniBossRecord(APIModel): """Anomaly Arbitration mini boss record.""" id: int = Aliased("maze_id") has_data: bool = Aliased("has_challenge_record") time: typing.Optional[PartialTime] = Aliased("challenge_time") characters: list[FloorCharacter] = Aliased("avatars") cycles_used: int = Aliased("round_num") stars: int = Aliased("star_num") is_quick_clear: bool = Aliased("is_fast")Anomaly Arbitration mini boss record.
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.selfis explicitly positional-only to allowselfas a field name.Ancestors
- APIModel
- pydantic.main.BaseModel
Class variables
var characters : list[FloorCharacter]var cycles_used : intvar has_data : boolvar id : intvar is_quick_clear : boolvar model_config : pydantic.config.ConfigDictvar stars : intvar time : PartialTime | None
class AnomalyPlayer (**data: Any)-
Expand source code
class AnomalyPlayer(APIModel): """HSR Anomaly Arbitration player info.""" server: str nickname: str level: int uid: str = Aliased("role_id")HSR Anomaly Arbitration player info.
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.selfis explicitly positional-only to allowselfas a field name.Ancestors
- APIModel
- pydantic.main.BaseModel
Class variables
var level : intvar model_config : pydantic.config.ConfigDictvar nickname : strvar server : strvar uid : str
class AnomalyRecord (**data: Any)-
Expand source code
class AnomalyRecord(APIModel): """HSR Anomaly Arbitration record.""" season: AnomalySeason = Aliased("group") boss: AnomalyBossInfo = Aliased("boss_info") mini_bosses: list[AnomalyMiniBossInfo] = Aliased("mob_infos") has_data: bool = Aliased("has_challenge_record") cycles_used: int = Aliased("battle_num") boss_record: typing.Optional[AnomalyBossRecord] = Aliased("boss_record", default=None) mini_boss_records: list[AnomalyMiniBossRecord] = Aliased("mob_records") boss_stars: int mini_boss_stars: int = Aliased("mob_stars")HSR Anomaly Arbitration record.
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.selfis explicitly positional-only to allowselfas a field name.Ancestors
- APIModel
- pydantic.main.BaseModel
Class variables
var boss : AnomalyBossInfovar boss_record : AnomalyBossRecord | Nonevar boss_stars : intvar cycles_used : intvar has_data : boolvar mini_boss_records : list[AnomalyMiniBossRecord]var mini_boss_stars : intvar mini_bosses : list[AnomalyMiniBossInfo]var model_config : pydantic.config.ConfigDictvar season : AnomalySeason
class AnomalySeason (**data: Any)-
Expand source code
class AnomalySeason(APIModel): """Anomaly Arbitration season.""" id: int = Aliased("group_id") begin_time: PartialTime end_time: PartialTime status: str name: str = Aliased("name_mi18n") game_version: str icon: str = Aliased("theme_pic_path")Anomaly Arbitration season.
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.selfis explicitly positional-only to allowselfas a field name.Ancestors
- APIModel
- pydantic.main.BaseModel
Class variables
var begin_time : PartialTimevar end_time : PartialTimevar game_version : strvar icon : strvar id : intvar model_config : pydantic.config.ConfigDictvar name : strvar status : str
class AnomalySummary (**data: Any)-
Expand source code
class AnomalySummary(APIModel): """HSR Anomaly Arbitration summary.""" challenge_attempts: int = Aliased("total_battle_num") mini_boss_stars: int = Aliased("mob_stars") boss_stars: int medal_type: str = Aliased("challenge_peak_rank_icon_type") medal_icon: str = Aliased("challenge_peak_rank_icon")HSR Anomaly Arbitration summary.
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.selfis explicitly positional-only to allowselfas a field name.Ancestors
- APIModel
- pydantic.main.BaseModel
Class variables
var boss_stars : intvar challenge_attempts : intvar medal_icon : strvar medal_type : strvar mini_boss_stars : intvar model_config : pydantic.config.ConfigDict
class ChallengeBuff (**data: Any)-
Expand source code
class ChallengeBuff(APIModel): """Buff used in a pure fiction or apocalyptic shadow node.""" id: int name: str = Aliased("name_mi18n") description: str = Aliased("desc_mi18n") simple_description: typing.Optional[str] = Aliased("simple_desc_mi18m", default=None) # only for PF icon: strBuff used in a pure fiction or apocalyptic shadow node.
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.selfis explicitly positional-only to allowselfas a field name.Ancestors
- APIModel
- pydantic.main.BaseModel
Class variables
var description : strvar icon : strvar id : intvar model_config : pydantic.config.ConfigDictvar name : strvar simple_description : str | None
class FictionFloor (**data: Any)-
Expand source code
class FictionFloor(StarRailChallengeFloor): """Floor in a Pure Fiction challenge.""" round_num: int node_1: typing.Optional[FictionFloorNode] = Aliased(default=None) node_2: typing.Optional[FictionFloorNode] = Aliased(default=None) node_3: typing.Optional[FictionFloorNode] = Aliased(default=None) @property def score(self) -> int: """Total score of the floor.""" node_1_score = self.node_1.score if self.node_1 is not None else 0 node_2_score = self.node_2.score if self.node_2 is not None else 0 node_3_score = self.node_3.score if self.node_3 is not None else 0 return node_1_score + node_2_score + node_3_scoreFloor in a Pure Fiction challenge.
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.selfis explicitly positional-only to allowselfas a field name.Ancestors
- StarRailChallengeFloor
- APIModel
- pydantic.main.BaseModel
Class variables
var model_config : pydantic.config.ConfigDictvar node_1 : FictionFloorNode | Nonevar node_2 : FictionFloorNode | Nonevar node_3 : FictionFloorNode | Nonevar round_num : int
Instance variables
prop score : int-
Expand source code
@property def score(self) -> int: """Total score of the floor.""" node_1_score = self.node_1.score if self.node_1 is not None else 0 node_2_score = self.node_2.score if self.node_2 is not None else 0 node_3_score = self.node_3.score if self.node_3 is not None else 0 return node_1_score + node_2_score + node_3_scoreTotal score of the floor.
Inherited members
class FictionFloorNode (**data: Any)-
Expand source code
class FictionFloorNode(FloorNode): """Node for a Pure Fiction floor.""" buff: typing.Optional[ChallengeBuff] score: intNode for a Pure Fiction floor.
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.selfis explicitly positional-only to allowselfas a field name.Ancestors
Class variables
var buff : ChallengeBuff | Nonevar model_config : pydantic.config.ConfigDictvar score : int
class FloorNode (**data: Any)-
Expand source code
class FloorNode(APIModel): """Node for a memory of chaos floor.""" challenge_time: PartialTime avatars: list[FloorCharacter]Node for a memory of chaos floor.
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.selfis explicitly positional-only to allowselfas a field name.Ancestors
- APIModel
- pydantic.main.BaseModel
Subclasses
Class variables
var avatars : list[FloorCharacter]var challenge_time : PartialTimevar model_config : pydantic.config.ConfigDict
class StarRailAPCShadow (**data: Any)-
Expand source code
class StarRailAPCShadow(APIModel): """Apocalyptic shadow challenge in a season.""" total_stars: int = Aliased("star_num") starward_stars: int = Aliased("extra_star_num", default=0) max_floor: str total_battles: int = Aliased("battle_num") has_data: bool floors: list[APCShadowFloor] = Aliased("all_floor_detail") seasons: list[APCShadowSeason] = Aliased("groups") max_floor_id: intApocalyptic shadow challenge in a season.
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.selfis explicitly positional-only to allowselfas a field name.Ancestors
- APIModel
- pydantic.main.BaseModel
Class variables
var floors : list[APCShadowFloor]var has_data : boolvar max_floor : strvar max_floor_id : intvar model_config : pydantic.config.ConfigDictvar seasons : list[APCShadowSeason]var starward_stars : intvar total_battles : intvar total_stars : int
class StarRailChallenge (**data: Any)-
Expand source code
class StarRailChallenge(APIModel): """Memory of chaos challenge in a season.""" name: str season: int = Aliased("schedule_id") begin_time: typing.Optional[PartialTime] end_time: typing.Optional[PartialTime] total_stars: int = Aliased("star_num") starward_stars: int = Aliased("extra_star_num", default=0) max_floor: str max_floor_id: int total_battles: int = Aliased("battle_num") has_data: bool floors: typing.Sequence[StarRailFloor] = Aliased("all_floor_detail") seasons: typing.Sequence[StarRailChallengeSeason] = Aliased("groups") @pydantic.model_validator(mode="before") def __extract_name(cls, values: dict[str, typing.Any]) -> dict[str, typing.Any]: if "groups" in values and isinstance(values["groups"], list): seasons = typing.cast(list[dict[str, typing.Any]], values["groups"]) if len(seasons) > 0: values["name"] = seasons[0]["name_mi18n"] else: values["name"] = "" return valuesMemory of chaos challenge in a season.
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.selfis explicitly positional-only to allowselfas a field name.Ancestors
- APIModel
- pydantic.main.BaseModel
Class variables
var begin_time : PartialTime | Nonevar end_time : PartialTime | Nonevar floors : Sequence[StarRailFloor]var has_data : boolvar max_floor : strvar max_floor_id : intvar model_config : pydantic.config.ConfigDictvar name : strvar season : intvar seasons : Sequence[StarRailChallengeSeason]var starward_stars : intvar total_battles : intvar total_stars : int
class StarRailChallengeFloor (**data: Any)-
Expand source code
class StarRailChallengeFloor(APIModel): """Base model for star rail challenge floors.""" id: int = Aliased("maze_id") name: str star_num: int is_quick_clear: bool = Aliased("is_fast") has_starward_mode: bool = Aliased("is_tierce", default=False) starward_stars: int = Aliased("extra_star_num", default=0) @pydantic.computed_field # type: ignore[prop-decorator] @property def stars(self) -> int: """Number of stars earned on the floor.""" return self.star_num + self.starward_starsBase model for star rail challenge floors.
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.selfis explicitly positional-only to allowselfas a field name.Ancestors
- APIModel
- pydantic.main.BaseModel
Subclasses
Class variables
var has_starward_mode : boolvar id : intvar is_quick_clear : boolvar model_config : pydantic.config.ConfigDictvar name : strvar star_num : intvar starward_stars : int
Instance variables
prop stars : int-
Expand source code
@pydantic.computed_field # type: ignore[prop-decorator] @property def stars(self) -> int: """Number of stars earned on the floor.""" return self.star_num + self.starward_starsNumber of stars earned on the floor.
class StarRailChallengeSeason (**data: Any)-
Expand source code
class StarRailChallengeSeason(APIModel): """A season of a challenge.""" id: int = Aliased("schedule_id") name: str = Aliased("name_mi18n") status: str begin_time: PartialTime end_time: PartialTimeA season of a challenge.
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.selfis explicitly positional-only to allowselfas a field name.Ancestors
- APIModel
- pydantic.main.BaseModel
Subclasses
Class variables
var begin_time : PartialTimevar end_time : PartialTimevar id : intvar model_config : pydantic.config.ConfigDictvar name : strvar status : str
class StarRailFloor (**data: Any)-
Expand source code
class StarRailFloor(StarRailChallengeFloor): """Floor in a memory of chaos challenge.""" round_num: int is_chaos: bool node_1: typing.Optional[FloorNode] = Aliased(default=None) node_2: typing.Optional[FloorNode] = Aliased(default=None) node_3: typing.Optional[FloorNode] = Aliased(default=None)Floor in a memory of chaos challenge.
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.selfis explicitly positional-only to allowselfas a field name.Ancestors
- StarRailChallengeFloor
- APIModel
- pydantic.main.BaseModel
Class variables
var is_chaos : boolvar model_config : pydantic.config.ConfigDictvar node_1 : FloorNode | Nonevar node_2 : FloorNode | Nonevar node_3 : FloorNode | Nonevar round_num : int
Inherited members
class StarRailPureFiction (**data: Any)-
Expand source code
class StarRailPureFiction(APIModel): """Pure Fiction challenge in a season.""" name: str = pydantic.Field(deprecated="Use `season_id` together with `seasons instead`.") season_id: int = pydantic.Field(deprecated="Use `season_id` together with `seasons instead`.") begin_time: PartialTime = pydantic.Field(deprecated="Use `season_id` together with `seasons instead`.") end_time: PartialTime = pydantic.Field(deprecated="Use `season_id` together with `seasons instead`.") total_stars: int = Aliased("star_num") starward_stars: int = Aliased("extra_star_num", default=0) max_floor: str total_battles: int = Aliased("battle_num") has_data: bool floors: list[FictionFloor] = Aliased("all_floor_detail") seasons: list[StarRailChallengeSeason] = Aliased("groups") max_floor_id: int @pydantic.model_validator(mode="before") def __unnest_groups(cls, values: dict[str, typing.Any]) -> dict[str, typing.Any]: if "groups" in values and isinstance(values["groups"], list): seasons = typing.cast(list[dict[str, typing.Any]], values["groups"]) if len(seasons) > 0: values["name"] = seasons[0]["name_mi18n"] values["season_id"] = seasons[0]["schedule_id"] values["begin_time"] = seasons[0]["begin_time"] values["end_time"] = seasons[0]["end_time"] return valuesPure Fiction challenge in a season.
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.selfis explicitly positional-only to allowselfas a field name.Ancestors
- APIModel
- pydantic.main.BaseModel
Class variables
var floors : list[FictionFloor]var has_data : boolvar max_floor : strvar max_floor_id : intvar model_config : pydantic.config.ConfigDictvar seasons : list[StarRailChallengeSeason]var starward_stars : intvar total_battles : intvar total_stars : int
Instance variables
var begin_time : PartialTime-
Expand source code
def __get__(self, obj: BaseModel | None, obj_type: type[BaseModel] | None = None) -> Any: if obj is None: if self.wrapped_property is not None: return self.wrapped_property.__get__(None, obj_type) raise AttributeError(self.field_name) warnings.warn(self.msg, DeprecationWarning, stacklevel=2) if self.wrapped_property is not None: return self.wrapped_property.__get__(obj, obj_type) return obj.__dict__[self.field_name]Read-only data descriptor used to emit a runtime deprecation warning before accessing a deprecated field.
Attributes
msg- The deprecation message to be emitted.
wrapped_property- The property instance if the deprecated field is a computed field, or
None. field_name- The name of the field being deprecated.
var end_time : PartialTime-
Expand source code
def __get__(self, obj: BaseModel | None, obj_type: type[BaseModel] | None = None) -> Any: if obj is None: if self.wrapped_property is not None: return self.wrapped_property.__get__(None, obj_type) raise AttributeError(self.field_name) warnings.warn(self.msg, DeprecationWarning, stacklevel=2) if self.wrapped_property is not None: return self.wrapped_property.__get__(obj, obj_type) return obj.__dict__[self.field_name]Read-only data descriptor used to emit a runtime deprecation warning before accessing a deprecated field.
Attributes
msg- The deprecation message to be emitted.
wrapped_property- The property instance if the deprecated field is a computed field, or
None. field_name- The name of the field being deprecated.
var name : str-
Expand source code
def __get__(self, obj: BaseModel | None, obj_type: type[BaseModel] | None = None) -> Any: if obj is None: if self.wrapped_property is not None: return self.wrapped_property.__get__(None, obj_type) raise AttributeError(self.field_name) warnings.warn(self.msg, DeprecationWarning, stacklevel=2) if self.wrapped_property is not None: return self.wrapped_property.__get__(obj, obj_type) return obj.__dict__[self.field_name]Read-only data descriptor used to emit a runtime deprecation warning before accessing a deprecated field.
Attributes
msg- The deprecation message to be emitted.
wrapped_property- The property instance if the deprecated field is a computed field, or
None. field_name- The name of the field being deprecated.
var season_id : int-
Expand source code
def __get__(self, obj: BaseModel | None, obj_type: type[BaseModel] | None = None) -> Any: if obj is None: if self.wrapped_property is not None: return self.wrapped_property.__get__(None, obj_type) raise AttributeError(self.field_name) warnings.warn(self.msg, DeprecationWarning, stacklevel=2) if self.wrapped_property is not None: return self.wrapped_property.__get__(obj, obj_type) return obj.__dict__[self.field_name]Read-only data descriptor used to emit a runtime deprecation warning before accessing a deprecated field.
Attributes
msg- The deprecation message to be emitted.
wrapped_property- The property instance if the deprecated field is a computed field, or
None. field_name- The name of the field being deprecated.