Models#
Common#
This module contains models for miscellaneous objects.
- class aiosu.models.common.Achievement(*, id: int, name: str, slug: str, description: str, grouping: str, icon_url: str, ordering: int, mode: Gamemode | None = None, instructions: str | None = None)#
- id: int#
- name: str#
- slug: str#
- description: str#
- grouping: str#
- icon_url: str#
- ordering: int#
- instructions: str | None#
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'description': FieldInfo(annotation=str, required=True), 'grouping': FieldInfo(annotation=str, required=True), 'icon_url': FieldInfo(annotation=str, required=True), 'id': FieldInfo(annotation=int, required=True), 'instructions': FieldInfo(annotation=Union[str, NoneType], required=False), 'mode': FieldInfo(annotation=Union[Gamemode, NoneType], required=False), 'name': FieldInfo(annotation=str, required=True), 'ordering': FieldInfo(annotation=int, required=True), 'slug': FieldInfo(annotation=str, required=True)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class aiosu.models.common.Country(*, code: str, name: str)#
- code: str#
- name: str#
- property flag_emoji: str#
Emoji for the flag.
- Returns:
Unicode emoji representation of the country’s flag
- Return type:
str
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'code': FieldInfo(annotation=str, required=True), 'name': FieldInfo(annotation=str, required=True)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class aiosu.models.common.CurrentUserAttributes(*, can_beatmap_update_owner: bool | None = None, can_delete: bool | None = None, can_edit_metadata: bool | None = None, can_edit_tags: bool | None = None, can_hype: bool | None = None, can_hype_reason: str | None = None, can_love: bool | None = None, can_remove_from_loved: bool | None = None, is_watching: bool | None = None, new_hype_time: datetime | None = None, nomination_modes: list[Gamemode] | None = None, remaining_hype: int | None = None, can_destroy: bool | None = None, can_reopen: bool | None = None, can_moderate_kudosu: bool | None = None, can_resolve: bool | None = None, vote_score: int | None = None, can_message: bool | None = None, can_message_error: str | None = None, last_read_id: int | None = None, can_new_comment: bool | None = None, can_new_comment_reason: str | None = None, pin: PinAttributes | None = None)#
- can_beatmap_update_owner: bool | None#
- can_delete: bool | None#
- can_edit_metadata: bool | None#
- can_edit_tags: bool | None#
- can_hype: bool | None#
- can_hype_reason: str | None#
- can_love: bool | None#
- can_remove_from_loved: bool | None#
- is_watching: bool | None#
- new_hype_time: datetime | None#
- remaining_hype: int | None#
- can_destroy: bool | None#
- can_reopen: bool | None#
- can_moderate_kudosu: bool | None#
- can_resolve: bool | None#
- vote_score: int | None#
- can_message: bool | None#
- can_message_error: str | None#
- last_read_id: int | None#
- can_new_comment: bool | None#
- can_new_comment_reason: str | None#
- pin: PinAttributes | None#
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'can_beatmap_update_owner': FieldInfo(annotation=Union[bool, NoneType], required=False), 'can_delete': FieldInfo(annotation=Union[bool, NoneType], required=False), 'can_destroy': FieldInfo(annotation=Union[bool, NoneType], required=False), 'can_edit_metadata': FieldInfo(annotation=Union[bool, NoneType], required=False), 'can_edit_tags': FieldInfo(annotation=Union[bool, NoneType], required=False), 'can_hype': FieldInfo(annotation=Union[bool, NoneType], required=False), 'can_hype_reason': FieldInfo(annotation=Union[str, NoneType], required=False), 'can_love': FieldInfo(annotation=Union[bool, NoneType], required=False), 'can_message': FieldInfo(annotation=Union[bool, NoneType], required=False), 'can_message_error': FieldInfo(annotation=Union[str, NoneType], required=False), 'can_moderate_kudosu': FieldInfo(annotation=Union[bool, NoneType], required=False), 'can_new_comment': FieldInfo(annotation=Union[bool, NoneType], required=False), 'can_new_comment_reason': FieldInfo(annotation=Union[str, NoneType], required=False), 'can_remove_from_loved': FieldInfo(annotation=Union[bool, NoneType], required=False), 'can_reopen': FieldInfo(annotation=Union[bool, NoneType], required=False), 'can_resolve': FieldInfo(annotation=Union[bool, NoneType], required=False), 'is_watching': FieldInfo(annotation=Union[bool, NoneType], required=False), 'last_read_id': FieldInfo(annotation=Union[int, NoneType], required=False), 'new_hype_time': FieldInfo(annotation=Union[datetime, NoneType], required=False), 'nomination_modes': FieldInfo(annotation=Union[list[Gamemode], NoneType], required=False), 'pin': FieldInfo(annotation=Union[PinAttributes, NoneType], required=False), 'remaining_hype': FieldInfo(annotation=Union[int, NoneType], required=False), 'vote_score': FieldInfo(annotation=Union[int, NoneType], required=False)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class aiosu.models.common.CursorModel(*, cursor_string: str | None = None, next: partial[Coroutine[object, object, CursorModel]] | None = None)#
NOTE: This model is not serializable by orjson directly.
Use the provided .model_dump_json() or .model_dump() methods instead.
- cursor_string: str | None#
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'cursor_string': FieldInfo(annotation=Union[str, NoneType], required=False), 'next': FieldInfo(annotation=Union[partial[Coroutine[object, object, CursorModel]], NoneType], required=False, exclude=True)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- next: partial[Coroutine[object, object, CursorModel]] | None#
Partial function to get the next page of results.
- class aiosu.models.common.HTMLBody(*, html: str, raw: str | None = None, bbcode: str | None = None)#
- html: str#
- raw: str | None#
- bbcode: str | None#
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'bbcode': FieldInfo(annotation=Union[str, NoneType], required=False), 'html': FieldInfo(annotation=str, required=True), 'raw': FieldInfo(annotation=Union[str, NoneType], required=False)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class aiosu.models.common.TimestampedCount(*, start_date: datetime, count: int)#
- start_date: datetime#
- count: int#
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'count': FieldInfo(annotation=int, required=True), 'start_date': FieldInfo(annotation=datetime, required=True)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- aiosu.models.common.SortType#
alias of
Literal
[‘id_asc’, ‘id_desc’]
- aiosu.models.common.ScoreType#
alias of
Literal
[‘solo_score’, ‘score_best_osu’, ‘score_best_taiko’, ‘score_best_fruits’, ‘score_best_mania’, ‘score_osu’, ‘score_taiko’, ‘score_fruits’, ‘score_mania’]
- aiosu.models.common.BeatmapScoreboardType#
alias of
Literal
[‘global’, ‘country’, ‘friend’]
Rankings#
This module contains models for rankings.
- class aiosu.models.rankings.Rankings(*, cursor_string: str | None = None, next: partial[Coroutine[object, object, CursorModel]] | None = None, ranking: list[UserStats], total: int | None = None, spotlight: Spotlight | None = None, beatmapsets: list[Beatmapset] | None = None)#
-
- total: int | None#
- beatmapsets: list[Beatmapset] | None#
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'beatmapsets': FieldInfo(annotation=Union[list[Beatmapset], NoneType], required=False), 'cursor_string': FieldInfo(annotation=Union[str, NoneType], required=False), 'next': FieldInfo(annotation=Union[partial[Coroutine[object, object, CursorModel]], NoneType], required=False, exclude=True), 'ranking': FieldInfo(annotation=list[UserStats], required=True), 'spotlight': FieldInfo(annotation=Union[Spotlight, NoneType], required=False), 'total': FieldInfo(annotation=Union[int, NoneType], required=False)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- cursor_string: str | None#
- next: partial[Coroutine[object, object, CursorModel]] | None#
Partial function to get the next page of results.
- aiosu.models.rankings.RankingType#
alias of
Literal
[‘performance’, ‘score’, ‘country’, ‘charts’]
- aiosu.models.rankings.RankingFilter#
alias of
Literal
[‘all’, ‘friends’]
- aiosu.models.rankings.RankingVariant#
alias of
Literal
[‘4k’, ‘7k’]
User#
This module contains models for User objects.
- class aiosu.models.user.User(*, avatar_url: str, country_code: str, id: int, username: str, default_group: str | None = None, is_active: bool | None = None, is_bot: bool | None = None, is_online: bool | None = None, is_supporter: bool | None = None, pm_friends_only: bool | None = None, profile_colour: str | None = None, is_deleted: bool | None = None, last_visit: datetime | None = None, discord: str | None = None, has_supported: bool | None = None, interests: str | None = None, join_date: datetime | None = None, kudosu: UserKudosu | None = None, location: str | None = None, max_blocks: int | None = None, max_friends: int | None = None, occupation: str | None = None, playmode: Gamemode | None = None, playstyle: list[str] | None = None, post_count: int | None = None, profile_order: list[str] | None = None, title: str | None = None, twitter: str | None = None, website: str | None = None, country: Country | None = None, cover: UserProfileCover | None = None, is_restricted: bool | None = None, account_history: list[UserAccountHistory] | None = None, active_tournament_banners: list[UserProfileTournamentBanner] | None = None, badges: list[UserBadge] | None = None, beatmap_playcounts_count: int | None = None, favourite_beatmapset_count: int | None = None, follow_user_mapping: list[int] | None = None, follower_count: int | None = None, friends: list[UserRelation] | None = None, graveyard_beatmapset_count: int | None = None, groups: list[UserGroup] | None = None, loved_beatmapset_count: int | None = None, mapping_follower_count: int | None = None, monthly_playcounts: list[TimestampedCount] | None = None, page: HTMLBody | None = None, pending_beatmapset_count: int | None = None, previous_usernames: list[str] | None = None, rank_highest: UserRankHighest | None = None, rank_history: UserRankHistoryElement | None = None, ranked_beatmapset_count: int | None = None, replays_watched_counts: list[TimestampedCount] | None = None, scores_best_count: int | None = None, scores_first_count: int | None = None, scores_recent_count: int | None = None, statistics: UserStats | None = None, statistics_rulesets: UserStatsRulesets | None = None, support_level: int | None = None, unread_pm_count: int | None = None, user_achievements: list[UserAchievmement] | None = None)#
- avatar_url: str#
- country_code: str#
- id: int#
- username: str#
- default_group: str | None#
- is_active: bool | None#
- is_bot: bool | None#
- is_online: bool | None#
- is_supporter: bool | None#
- pm_friends_only: bool | None#
- profile_colour: str | None#
- is_deleted: bool | None#
- last_visit: datetime | None#
- discord: str | None#
- has_supported: bool | None#
- interests: str | None#
- join_date: datetime | None#
- kudosu: UserKudosu | None#
- location: str | None#
- max_blocks: int | None#
- max_friends: int | None#
- occupation: str | None#
- playstyle: list[str] | None#
- post_count: int | None#
- profile_order: list[str] | None#
- title: str | None#
- twitter: str | None#
- website: str | None#
- cover: UserProfileCover | None#
- is_restricted: bool | None#
- account_history: list[UserAccountHistory] | None#
- active_tournament_banners: list[UserProfileTournamentBanner] | None#
- beatmap_playcounts_count: int | None#
- favourite_beatmapset_count: int | None#
- follow_user_mapping: list[int] | None#
- follower_count: int | None#
- friends: list[UserRelation] | None#
- graveyard_beatmapset_count: int | None#
- loved_beatmapset_count: int | None#
- mapping_follower_count: int | None#
- monthly_playcounts: list[TimestampedCount] | None#
- pending_beatmapset_count: int | None#
- previous_usernames: list[str] | None#
- rank_highest: UserRankHighest | None#
- rank_history: UserRankHistoryElement | None#
- ranked_beatmapset_count: int | None#
- replays_watched_counts: list[TimestampedCount] | None#
- scores_best_count: int | None#
- scores_first_count: int | None#
- scores_recent_count: int | None#
- statistics_rulesets: UserStatsRulesets | None#
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'account_history': FieldInfo(annotation=Union[list[UserAccountHistory], NoneType], required=False), 'active_tournament_banners': FieldInfo(annotation=Union[list[UserProfileTournamentBanner], NoneType], required=False), 'avatar_url': FieldInfo(annotation=str, required=True), 'badges': FieldInfo(annotation=Union[list[UserBadge], NoneType], required=False), 'beatmap_playcounts_count': FieldInfo(annotation=Union[int, NoneType], required=False), 'country': FieldInfo(annotation=Union[Country, NoneType], required=False), 'country_code': FieldInfo(annotation=str, required=True), 'cover': FieldInfo(annotation=Union[UserProfileCover, NoneType], required=False), 'default_group': FieldInfo(annotation=Union[str, NoneType], required=False), 'discord': FieldInfo(annotation=Union[str, NoneType], required=False), 'favourite_beatmapset_count': FieldInfo(annotation=Union[int, NoneType], required=False), 'follow_user_mapping': FieldInfo(annotation=Union[list[int], NoneType], required=False), 'follower_count': FieldInfo(annotation=Union[int, NoneType], required=False), 'friends': FieldInfo(annotation=Union[list[UserRelation], NoneType], required=False), 'graveyard_beatmapset_count': FieldInfo(annotation=Union[int, NoneType], required=False), 'groups': FieldInfo(annotation=Union[list[UserGroup], NoneType], required=False), 'has_supported': FieldInfo(annotation=Union[bool, NoneType], required=False), 'id': FieldInfo(annotation=int, required=True), 'interests': FieldInfo(annotation=Union[str, NoneType], required=False), 'is_active': FieldInfo(annotation=Union[bool, NoneType], required=False), 'is_bot': FieldInfo(annotation=Union[bool, NoneType], required=False), 'is_deleted': FieldInfo(annotation=Union[bool, NoneType], required=False), 'is_online': FieldInfo(annotation=Union[bool, NoneType], required=False), 'is_restricted': FieldInfo(annotation=Union[bool, NoneType], required=False), 'is_supporter': FieldInfo(annotation=Union[bool, NoneType], required=False), 'join_date': FieldInfo(annotation=Union[datetime, NoneType], required=False), 'kudosu': FieldInfo(annotation=Union[UserKudosu, NoneType], required=False), 'last_visit': FieldInfo(annotation=Union[datetime, NoneType], required=False), 'location': FieldInfo(annotation=Union[str, NoneType], required=False), 'loved_beatmapset_count': FieldInfo(annotation=Union[int, NoneType], required=False), 'mapping_follower_count': FieldInfo(annotation=Union[int, NoneType], required=False), 'max_blocks': FieldInfo(annotation=Union[int, NoneType], required=False), 'max_friends': FieldInfo(annotation=Union[int, NoneType], required=False), 'monthly_playcounts': FieldInfo(annotation=Union[list[TimestampedCount], NoneType], required=False), 'occupation': FieldInfo(annotation=Union[str, NoneType], required=False), 'page': FieldInfo(annotation=Union[HTMLBody, NoneType], required=False), 'pending_beatmapset_count': FieldInfo(annotation=Union[int, NoneType], required=False), 'playmode': FieldInfo(annotation=Union[Gamemode, NoneType], required=False), 'playstyle': FieldInfo(annotation=Union[list[str], NoneType], required=False), 'pm_friends_only': FieldInfo(annotation=Union[bool, NoneType], required=False), 'post_count': FieldInfo(annotation=Union[int, NoneType], required=False), 'previous_usernames': FieldInfo(annotation=Union[list[str], NoneType], required=False), 'profile_colour': FieldInfo(annotation=Union[str, NoneType], required=False), 'profile_order': FieldInfo(annotation=Union[list[str], NoneType], required=False), 'rank_highest': FieldInfo(annotation=Union[UserRankHighest, NoneType], required=False), 'rank_history': FieldInfo(annotation=Union[UserRankHistoryElement, NoneType], required=False), 'ranked_beatmapset_count': FieldInfo(annotation=Union[int, NoneType], required=False), 'replays_watched_counts': FieldInfo(annotation=Union[list[TimestampedCount], NoneType], required=False), 'scores_best_count': FieldInfo(annotation=Union[int, NoneType], required=False), 'scores_first_count': FieldInfo(annotation=Union[int, NoneType], required=False), 'scores_recent_count': FieldInfo(annotation=Union[int, NoneType], required=False), 'statistics': FieldInfo(annotation=Union[UserStats, NoneType], required=False), 'statistics_rulesets': FieldInfo(annotation=Union[UserStatsRulesets, NoneType], required=False), 'support_level': FieldInfo(annotation=Union[int, NoneType], required=False), 'title': FieldInfo(annotation=Union[str, NoneType], required=False), 'twitter': FieldInfo(annotation=Union[str, NoneType], required=False), 'unread_pm_count': FieldInfo(annotation=Union[int, NoneType], required=False), 'user_achievements': FieldInfo(annotation=Union[list[UserAchievmement], NoneType], required=False), 'username': FieldInfo(annotation=str, required=True), 'website': FieldInfo(annotation=Union[str, NoneType], required=False)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- support_level: int | None#
- unread_pm_count: int | None#
- user_achievements: list[UserAchievmement] | None#
- property url: str#
- class aiosu.models.user.UserAccountHistory(*, id: int, timestamp: datetime, length: int, permanent: bool, type: Literal['note', 'restriction', 'silence', 'tournament_ban'], description: str | None = None)#
- id: int#
- timestamp: datetime#
- length: int#
- permanent: bool#
- type: UserAccountHistoryType#
- description: str | None#
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'description': FieldInfo(annotation=Union[str, NoneType], required=False), 'id': FieldInfo(annotation=int, required=True), 'length': FieldInfo(annotation=int, required=True), 'permanent': FieldInfo(annotation=bool, required=True), 'timestamp': FieldInfo(annotation=datetime, required=True), 'type': FieldInfo(annotation=Literal['note', 'restriction', 'silence', 'tournament_ban'], required=True)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class aiosu.models.user.UserBadge(*, awarded_at: datetime, description: str, image_url: str, image_2x_url: str, url: str)#
- awarded_at: datetime#
- description: str#
- image_url: str#
- image_2x_url: str#
- url: str#
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'awarded_at': FieldInfo(annotation=datetime, required=True), 'description': FieldInfo(annotation=str, required=True), 'image_2x_url': FieldInfo(annotation=str, required=True, alias='image@2x_url', alias_priority=2), 'image_url': FieldInfo(annotation=str, required=True), 'url': FieldInfo(annotation=str, required=True)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class aiosu.models.user.UserGradeCounts(*, ssh: int, ss: int, sh: int, s: int, a: int)#
- ssh: int#
Number of Silver SS ranks achieved.
- ss: int#
Number of SS ranks achieved.
- sh: int#
Number of Silver S ranks achieved.
- s: int#
Number of S ranks achieved.
- a: int#
Number of A ranks achieved.
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'a': FieldInfo(annotation=int, required=True), 's': FieldInfo(annotation=int, required=True), 'sh': FieldInfo(annotation=int, required=True), 'ss': FieldInfo(annotation=int, required=True), 'ssh': FieldInfo(annotation=int, required=True)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class aiosu.models.user.UserGroup(*, id: int, identifier: str, name: str, short_name: str, has_listing: bool, has_playmodes: bool, is_probationary: bool, colour: str | None = None, playmodes: list[Gamemode] | None = None, description: str | None = None)#
- id: int#
- identifier: str#
- name: str#
- short_name: str#
- has_listing: bool#
- has_playmodes: bool#
- is_probationary: bool#
- colour: str | None#
- description: str | None#
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'colour': FieldInfo(annotation=Union[str, NoneType], required=False), 'description': FieldInfo(annotation=Union[str, NoneType], required=False), 'has_listing': FieldInfo(annotation=bool, required=True), 'has_playmodes': FieldInfo(annotation=bool, required=True), 'id': FieldInfo(annotation=int, required=True), 'identifier': FieldInfo(annotation=str, required=True), 'is_probationary': FieldInfo(annotation=bool, required=True), 'name': FieldInfo(annotation=str, required=True), 'playmodes': FieldInfo(annotation=Union[list[Gamemode], NoneType], required=False), 'short_name': FieldInfo(annotation=str, required=True)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class aiosu.models.user.UserKudosu(*, total: int, available: int)#
- total: int#
- available: int#
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'available': FieldInfo(annotation=int, required=True), 'total': FieldInfo(annotation=int, required=True)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class aiosu.models.user.UserLevel(*, current: int, progress: int)#
- current: int#
- progress: int#
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'current': FieldInfo(annotation=int, required=True), 'progress': FieldInfo(annotation=int, required=True)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class aiosu.models.user.UserProfileCover(*, url: str, custom_url: str | None = None, id: str | None = None)#
- url: str#
- custom_url: str | None#
- id: str | None#
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'custom_url': FieldInfo(annotation=Union[str, NoneType], required=False), 'id': FieldInfo(annotation=Union[str, NoneType], required=False), 'url': FieldInfo(annotation=str, required=True)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class aiosu.models.user.UserProfileTournamentBanner(*, tournament_id: int, id: int | None = None, image: str | None = None, image_2_x: str | None = None)#
- tournament_id: int#
- id: int | None#
- image: str | None#
- image_2_x: str | None#
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'id': FieldInfo(annotation=Union[int, NoneType], required=False), 'image': FieldInfo(annotation=Union[str, NoneType], required=False), 'image_2_x': FieldInfo(annotation=Union[str, NoneType], required=False, alias='image@2x', alias_priority=2), 'tournament_id': FieldInfo(annotation=int, required=True)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class aiosu.models.user.UserQueryType(value)#
An enumeration.
- ID = 'id'#
- USERNAME = 'username'#
- property old_api_name: str#
- property new_api_name: str#
- class aiosu.models.user.UserRankHighest(*, rank: int, updated_at: datetime)#
- rank: int#
- updated_at: datetime#
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'rank': FieldInfo(annotation=int, required=True), 'updated_at': FieldInfo(annotation=datetime, required=True)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class aiosu.models.user.UserRankHistoryElement(*, mode: str, data: list[int])#
- mode: str#
- data: list[int]#
- property average_gain: float#
Average rank gain.
- Returns:
Average rank gain for a user
- Return type:
float
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'data': FieldInfo(annotation=list[int], required=True), 'mode': FieldInfo(annotation=str, required=True)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class aiosu.models.user.UserRelation#
- target_id: int#
- relation_type: str#
- mutual: bool#
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'mutual': FieldInfo(annotation=bool, required=True), 'relation_type': FieldInfo(annotation=str, required=True), 'target': FieldInfo(annotation=Union[User, NoneType], required=False), 'target_id': FieldInfo(annotation=int, required=True)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class aiosu.models.user.UserStats#
Fields are marked as optional since they might be missing from rankings other than performance.
- ranked_score: int | None#
- play_count: int | None#
- grade_counts: UserGradeCounts | None#
- total_hits: int | None#
- is_ranked: bool | None#
- total_score: int | None#
- hit_accuracy: float | None#
- play_time: int | None#
- pp: float | None#
- pp_exp: float | None#
- replays_watched_by_others: int | None#
- maximum_combo: int | None#
- global_rank: int | None#
- global_rank_exp: int | None#
- country_rank: int | None#
- count_300: int | None#
- count_100: int | None#
- count_50: int | None#
- count_miss: int | None#
- variants: list[UserStatsVariant] | None#
- property pp_per_playtime: float#
PP per playtime.
- Returns:
PP per playtime
- Return type:
float
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'count_100': FieldInfo(annotation=Union[int, NoneType], required=False), 'count_300': FieldInfo(annotation=Union[int, NoneType], required=False), 'count_50': FieldInfo(annotation=Union[int, NoneType], required=False), 'count_miss': FieldInfo(annotation=Union[int, NoneType], required=False), 'country_rank': FieldInfo(annotation=Union[int, NoneType], required=False), 'global_rank': FieldInfo(annotation=Union[int, NoneType], required=False), 'global_rank_exp': FieldInfo(annotation=Union[int, NoneType], required=False), 'grade_counts': FieldInfo(annotation=Union[UserGradeCounts, NoneType], required=False), 'hit_accuracy': FieldInfo(annotation=Union[float, NoneType], required=False), 'is_ranked': FieldInfo(annotation=Union[bool, NoneType], required=False), 'level': FieldInfo(annotation=Union[UserLevel, NoneType], required=False), 'maximum_combo': FieldInfo(annotation=Union[int, NoneType], required=False), 'play_count': FieldInfo(annotation=Union[int, NoneType], required=False), 'play_time': FieldInfo(annotation=Union[int, NoneType], required=False), 'pp': FieldInfo(annotation=Union[float, NoneType], required=False), 'pp_exp': FieldInfo(annotation=Union[float, NoneType], required=False), 'ranked_score': FieldInfo(annotation=Union[int, NoneType], required=False), 'replays_watched_by_others': FieldInfo(annotation=Union[int, NoneType], required=False), 'total_hits': FieldInfo(annotation=Union[int, NoneType], required=False), 'total_score': FieldInfo(annotation=Union[int, NoneType], required=False), 'user': FieldInfo(annotation=Union[User, NoneType], required=False), 'variants': FieldInfo(annotation=Union[list[UserStatsVariant], NoneType], required=False)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class aiosu.models.user.UserStatsRulesets#
-
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'fruits': FieldInfo(annotation=Union[UserStats, NoneType], required=False), 'mania': FieldInfo(annotation=Union[UserStats, NoneType], required=False), 'osu': FieldInfo(annotation=Union[UserStats, NoneType], required=False), 'taiko': FieldInfo(annotation=Union[UserStats, NoneType], required=False)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class aiosu.models.user.UserStatsVariant(*, mode: Gamemode, variant: str, pp: float, country_rank: int | None = None, global_rank: int | None = None)#
-
- variant: str#
- pp: float#
- country_rank: int | None#
- global_rank: int | None#
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'country_rank': FieldInfo(annotation=Union[int, NoneType], required=False), 'global_rank': FieldInfo(annotation=Union[int, NoneType], required=False), 'mode': FieldInfo(annotation=Gamemode, required=True), 'pp': FieldInfo(annotation=float, required=True), 'variant': FieldInfo(annotation=str, required=True)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
Beatmap#
This module contains models for Beatmap objects.
- class aiosu.models.beatmap.Beatmap#
- id: int#
- url: str#
- beatmapset_id: int#
- difficulty_rating: float#
- status: BeatmapRankStatus#
- total_length: int#
- user_id: int#
- version: str#
- accuracy: float | None#
- ar: float | None#
- cs: float | None#
- bpm: float | None#
- convert: bool | None#
- count_circles: int | None#
- count_sliders: int | None#
- count_spinners: int | None#
- deleted_at: datetime | None#
- drain: float | None#
- hit_length: int | None#
- is_scoreable: bool | None#
- last_updated: datetime | None#
- passcount: int | None#
- play_count: int | None#
- checksum: str | None#
- max_combo: int | None#
- beatmapset: Beatmapset | None#
- failtimes: BeatmapFailtimes | None#
- property discussion_url: str#
- property count_objects: int | None#
Total count of the objects.
- Returns:
Sum of counts of all objects. None if no object count information.
- Return type:
Optional[int]
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'accuracy': FieldInfo(annotation=Union[float, NoneType], required=False), 'ar': FieldInfo(annotation=Union[float, NoneType], required=False), 'beatmapset': FieldInfo(annotation=Union[Beatmapset, NoneType], required=False), 'beatmapset_id': FieldInfo(annotation=int, required=True), 'bpm': FieldInfo(annotation=Union[float, NoneType], required=False), 'checksum': FieldInfo(annotation=Union[str, NoneType], required=False), 'convert': FieldInfo(annotation=Union[bool, NoneType], required=False), 'count_circles': FieldInfo(annotation=Union[int, NoneType], required=False), 'count_sliders': FieldInfo(annotation=Union[int, NoneType], required=False), 'count_spinners': FieldInfo(annotation=Union[int, NoneType], required=False), 'cs': FieldInfo(annotation=Union[float, NoneType], required=False), 'deleted_at': FieldInfo(annotation=Union[datetime, NoneType], required=False), 'difficulty_rating': FieldInfo(annotation=float, required=True), 'drain': FieldInfo(annotation=Union[float, NoneType], required=False), 'failtimes': FieldInfo(annotation=Union[BeatmapFailtimes, NoneType], required=False), 'hit_length': FieldInfo(annotation=Union[int, NoneType], required=False), 'id': FieldInfo(annotation=int, required=True), 'is_scoreable': FieldInfo(annotation=Union[bool, NoneType], required=False), 'last_updated': FieldInfo(annotation=Union[datetime, NoneType], required=False), 'max_combo': FieldInfo(annotation=Union[int, NoneType], required=False), 'mode': FieldInfo(annotation=Gamemode, required=True), 'passcount': FieldInfo(annotation=Union[int, NoneType], required=False), 'play_count': FieldInfo(annotation=Union[int, NoneType], required=False, alias='playcount', alias_priority=2), 'status': FieldInfo(annotation=BeatmapRankStatus, required=True), 'total_length': FieldInfo(annotation=int, required=True), 'url': FieldInfo(annotation=str, required=True), 'user_id': FieldInfo(annotation=int, required=True), 'version': FieldInfo(annotation=str, required=True)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class aiosu.models.beatmap.BeatmapAvailability(*, more_information: str | None = None, download_disabled: bool | None = None)#
- more_information: str | None#
- download_disabled: bool | None#
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'download_disabled': FieldInfo(annotation=Union[bool, NoneType], required=False), 'more_information': FieldInfo(annotation=Union[str, NoneType], required=False)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class aiosu.models.beatmap.BeatmapCovers(*, cover: str, card: str, list: str, slimcover: str, cover_2_x: str | None = None, card_2_x: str | None = None, list_2_x: str | None = None, slimcover_2_x: str | None = None)#
- cover: str#
- card: str#
- list: str#
- slimcover: str#
- cover_2_x: str | None#
- card_2_x: str | None#
- list_2_x: str | None#
- slimcover_2_x: str | None#
- classmethod from_beatmapset_id(beatmapset_id: int) BeatmapCovers #
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'card': FieldInfo(annotation=str, required=True), 'card_2_x': FieldInfo(annotation=Union[str, NoneType], required=False, alias='card@2x', alias_priority=2), 'cover': FieldInfo(annotation=str, required=True), 'cover_2_x': FieldInfo(annotation=Union[str, NoneType], required=False, alias='cover@2x', alias_priority=2), 'list': FieldInfo(annotation=str, required=True), 'list_2_x': FieldInfo(annotation=Union[str, NoneType], required=False, alias='list@2x', alias_priority=2), 'slimcover': FieldInfo(annotation=str, required=True), 'slimcover_2_x': FieldInfo(annotation=Union[str, NoneType], required=False, alias='slimcover@2x', alias_priority=2)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class aiosu.models.beatmap.BeatmapDescription(*, bbcode: str | None = None, description: str | None = None)#
- bbcode: str | None#
- description: str | None#
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'bbcode': FieldInfo(annotation=Union[str, NoneType], required=False), 'description': FieldInfo(annotation=Union[str, NoneType], required=False)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class aiosu.models.beatmap.BeatmapDifficultyAttributes(*, max_combo: int, star_rating: float, aim_difficulty: float | None = None, approach_rate: float | None = None, flashlight_difficulty: float | None = None, overall_difficulty: float | None = None, slider_factor: float | None = None, speed_difficulty: float | None = None, speed_note_count: float | None = None, stamina_difficulty: float | None = None, rhythm_difficulty: float | None = None, colour_difficulty: float | None = None, great_hit_window: float | None = None, score_multiplier: float | None = None)#
- max_combo: int#
- star_rating: float#
- aim_difficulty: float | None#
- approach_rate: float | None#
- flashlight_difficulty: float | None#
- overall_difficulty: float | None#
- slider_factor: float | None#
- speed_difficulty: float | None#
- speed_note_count: float | None#
- stamina_difficulty: float | None#
- rhythm_difficulty: float | None#
- colour_difficulty: float | None#
- great_hit_window: float | None#
- score_multiplier: float | None#
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'aim_difficulty': FieldInfo(annotation=Union[float, NoneType], required=False), 'approach_rate': FieldInfo(annotation=Union[float, NoneType], required=False), 'colour_difficulty': FieldInfo(annotation=Union[float, NoneType], required=False), 'flashlight_difficulty': FieldInfo(annotation=Union[float, NoneType], required=False), 'great_hit_window': FieldInfo(annotation=Union[float, NoneType], required=False), 'max_combo': FieldInfo(annotation=int, required=True), 'overall_difficulty': FieldInfo(annotation=Union[float, NoneType], required=False), 'rhythm_difficulty': FieldInfo(annotation=Union[float, NoneType], required=False), 'score_multiplier': FieldInfo(annotation=Union[float, NoneType], required=False), 'slider_factor': FieldInfo(annotation=Union[float, NoneType], required=False), 'speed_difficulty': FieldInfo(annotation=Union[float, NoneType], required=False), 'speed_note_count': FieldInfo(annotation=Union[float, NoneType], required=False), 'stamina_difficulty': FieldInfo(annotation=Union[float, NoneType], required=False), 'star_rating': FieldInfo(annotation=float, required=True)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class aiosu.models.beatmap.BeatmapFailtimes(*, exit: list[int] | None = None, fail: list[int] | None = None)#
- exit: list[int] | None#
- fail: list[int] | None#
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'exit': FieldInfo(annotation=Union[list[int], NoneType], required=False), 'fail': FieldInfo(annotation=Union[list[int], NoneType], required=False)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class aiosu.models.beatmap.BeatmapGenre(*, name: str, id: int | None = None)#
- name: str#
- id: int | None#
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'id': FieldInfo(annotation=Union[int, NoneType], required=False), 'name': FieldInfo(annotation=str, required=True)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class aiosu.models.beatmap.BeatmapHype(*, current: int, required: int)#
- current: int#
- required: int#
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'current': FieldInfo(annotation=int, required=True), 'required': FieldInfo(annotation=int, required=True)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class aiosu.models.beatmap.BeatmapLanguage(*, name: str, id: int | None = None)#
- name: str#
- id: int | None#
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'id': FieldInfo(annotation=Union[int, NoneType], required=False), 'name': FieldInfo(annotation=str, required=True)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class aiosu.models.beatmap.BeatmapNominations(*, current: int | None = None, required: int | None = None)#
- current: int | None#
- required: int | None#
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'current': FieldInfo(annotation=Union[int, NoneType], required=False), 'required': FieldInfo(annotation=Union[int, NoneType], required=False)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class aiosu.models.beatmap.BeatmapPack(*, author: str, date: datetime, name: str, no_diff_reduction: bool, tag: str, url: str, ruleset_id: int | None = None, beatmapsets: list[Beatmapset] | None = None, user_completion_data: BeatmapPackUserCompletion | None = None)#
- author: str#
- date: datetime#
- name: str#
- no_diff_reduction: bool#
- tag: str#
- url: str#
- ruleset_id: int | None#
- beatmapsets: list[Beatmapset] | None#
- user_completion_data: BeatmapPackUserCompletion | None#
- property pack_type: BeatmapPackType#
- property id: int#
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'author': FieldInfo(annotation=str, required=True), 'beatmapsets': FieldInfo(annotation=Union[list[Beatmapset], NoneType], required=False), 'date': FieldInfo(annotation=datetime, required=True), 'name': FieldInfo(annotation=str, required=True), 'no_diff_reduction': FieldInfo(annotation=bool, required=True), 'ruleset_id': FieldInfo(annotation=Union[int, NoneType], required=False), 'tag': FieldInfo(annotation=str, required=True), 'url': FieldInfo(annotation=str, required=True), 'user_completion_data': FieldInfo(annotation=Union[BeatmapPackUserCompletion, NoneType], required=False)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class aiosu.models.beatmap.BeatmapPackType(value)#
An enumeration.
- STANDARD = ('S', 'Standard')#
- FEATURED = ('F', 'Featured Artist')#
- TOURNAMENT = ('P', 'Tournament')#
- LOVED = ('L', 'Project Loved')#
- CHART = ('R', 'Spotlights')#
- THEME = ('T', 'Theme')#
- ARTIST = ('A', 'Artist/Album')#
- classmethod from_tag(tag: str) BeatmapPackType #
- class aiosu.models.beatmap.BeatmapPackUserCompletion(*, beatmapset_ids: list[int], completed: bool)#
- beatmapset_ids: list[int]#
- completed: bool#
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'beatmapset_ids': FieldInfo(annotation=list[int], required=True), 'completed': FieldInfo(annotation=bool, required=True)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class aiosu.models.beatmap.BeatmapPacksResponse(*, cursor_string: str | None = None, next: partial[Coroutine[object, object, CursorModel]] | None = None, beatmap_packs: list[BeatmapPack])#
- beatmap_packs: list[BeatmapPack]#
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'beatmap_packs': FieldInfo(annotation=list[BeatmapPack], required=True), 'cursor_string': FieldInfo(annotation=Union[str, NoneType], required=False), 'next': FieldInfo(annotation=Union[partial[Coroutine[object, object, CursorModel]], NoneType], required=False, exclude=True)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- cursor_string: str | None#
- next: partial[Coroutine[object, object, CursorModel]] | None#
Partial function to get the next page of results.
- class aiosu.models.beatmap.BeatmapRankStatus(value)#
An enumeration.
- GRAVEYARD = -2#
- WIP = -1#
- PENDING = 0#
- RANKED = 1#
- APPROVED = 2#
- QUALIFIED = 3#
- LOVED = 4#
- property id: int#
- property name_api: str#
- class aiosu.models.beatmap.BeatmapUserPlaycount#
- count: int#
- beatmap_id: int#
- beatmapset: Beatmapset | None#
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'beatmap': FieldInfo(annotation=Union[Beatmap, NoneType], required=False), 'beatmap_id': FieldInfo(annotation=int, required=True), 'beatmapset': FieldInfo(annotation=Union[Beatmapset, NoneType], required=False), 'count': FieldInfo(annotation=int, required=True)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class aiosu.models.beatmap.Beatmapset#
- id: int#
- artist: str#
- artist_unicode: str#
- covers: BeatmapCovers#
- creator: str#
- favourite_count: int#
- play_count: int#
- preview_url: str#
- source: str#
- status: BeatmapRankStatus#
- title: str#
- title_unicode: str#
- user_id: int#
- video: bool#
- nsfw: bool | None#
- hype: BeatmapHype | None#
- availability: BeatmapAvailability | None#
- bpm: float | None#
- can_be_hyped: bool | None#
- discussion_enabled: bool | None#
- discussion_locked: bool | None#
- is_scoreable: bool | None#
- last_updated: datetime | None#
- legacy_thread_url: str | None#
- nominations: BeatmapNominations | None#
- current_nominations: list[BeatmapNomination] | None#
- ranked_date: datetime | None#
- storyboard: bool | None#
- submitted_date: datetime | None#
- tags: str | None#
- pack_tags: list[str] | None#
- track_id: int | None#
- current_user_attributes: CurrentUserAttributes | None#
- description: BeatmapDescription | None#
- genre: BeatmapGenre | None#
- language: BeatmapLanguage | None#
- ratings: list[int] | None#
- discussions: list[BeatmapsetDiscussion] | None#
- events: list[BeatmapsetEvent] | None#
- has_favourited: bool | None#
- property url: str#
- property discussion_url: str#
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'artist': FieldInfo(annotation=str, required=True), 'artist_unicode': FieldInfo(annotation=str, required=True), 'availability': FieldInfo(annotation=Union[BeatmapAvailability, NoneType], required=False), 'beatmaps': FieldInfo(annotation=Union[list[Beatmap], NoneType], required=False), 'bpm': FieldInfo(annotation=Union[float, NoneType], required=False), 'can_be_hyped': FieldInfo(annotation=Union[bool, NoneType], required=False), 'converts': FieldInfo(annotation=Union[list[Beatmap], NoneType], required=False), 'covers': FieldInfo(annotation=BeatmapCovers, required=True), 'creator': FieldInfo(annotation=str, required=True), 'current_nominations': FieldInfo(annotation=Union[list[BeatmapNomination], NoneType], required=False), 'current_user_attributes': FieldInfo(annotation=Union[CurrentUserAttributes, NoneType], required=False), 'description': FieldInfo(annotation=Union[BeatmapDescription, NoneType], required=False), 'discussion_enabled': FieldInfo(annotation=Union[bool, NoneType], required=False), 'discussion_locked': FieldInfo(annotation=Union[bool, NoneType], required=False), 'discussions': FieldInfo(annotation=Union[list[BeatmapsetDiscussion], NoneType], required=False), 'events': FieldInfo(annotation=Union[list[BeatmapsetEvent], NoneType], required=False), 'favourite_count': FieldInfo(annotation=int, required=True), 'genre': FieldInfo(annotation=Union[BeatmapGenre, NoneType], required=False), 'has_favourited': FieldInfo(annotation=Union[bool, NoneType], required=False), 'hype': FieldInfo(annotation=Union[BeatmapHype, NoneType], required=False), 'id': FieldInfo(annotation=int, required=True), 'is_scoreable': FieldInfo(annotation=Union[bool, NoneType], required=False), 'language': FieldInfo(annotation=Union[BeatmapLanguage, NoneType], required=False), 'last_updated': FieldInfo(annotation=Union[datetime, NoneType], required=False), 'legacy_thread_url': FieldInfo(annotation=Union[str, NoneType], required=False), 'nominations': FieldInfo(annotation=Union[BeatmapNominations, NoneType], required=False), 'nsfw': FieldInfo(annotation=Union[bool, NoneType], required=False), 'pack_tags': FieldInfo(annotation=Union[list[str], NoneType], required=False), 'play_count': FieldInfo(annotation=int, required=True, alias='playcount', alias_priority=2), 'preview_url': FieldInfo(annotation=str, required=True), 'ranked_date': FieldInfo(annotation=Union[datetime, NoneType], required=False), 'ratings': FieldInfo(annotation=Union[list[int], NoneType], required=False), 'recent_favourites': FieldInfo(annotation=Union[list[User], NoneType], required=False), 'related_users': FieldInfo(annotation=Union[list[User], NoneType], required=False), 'source': FieldInfo(annotation=str, required=True), 'status': FieldInfo(annotation=BeatmapRankStatus, required=True), 'storyboard': FieldInfo(annotation=Union[bool, NoneType], required=False), 'submitted_date': FieldInfo(annotation=Union[datetime, NoneType], required=False), 'tags': FieldInfo(annotation=Union[str, NoneType], required=False), 'title': FieldInfo(annotation=str, required=True), 'title_unicode': FieldInfo(annotation=str, required=True), 'track_id': FieldInfo(annotation=Union[int, NoneType], required=False), 'user': FieldInfo(annotation=Union[User, NoneType], required=False), 'user_id': FieldInfo(annotation=int, required=True), 'video': FieldInfo(annotation=bool, required=True)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class aiosu.models.beatmap.BeatmapsetDiscussion(*, id: int, beatmapset_id: int, user_id: int, message_type: Literal['hype', 'praise', 'problem', 'review', 'suggestion', 'mapper_note'], resolved: bool, can_be_resolved: bool, can_grant_kudosu: bool, created_at: datetime, beatmap_id: int | None = None, deleted_by_id: int | None = None, parent_id: int | None = None, timestamp: int | None = None, updated_at: datetime | None = None, deleted_at: datetime | None = None, last_post_at: datetime | None = None, kudosu_denied: bool | None = None, starting_post: BeatmapsetDiscussionPost | None = None)#
- id: int#
- beatmapset_id: int#
- user_id: int#
- message_type: BeatmapsetDisscussionType#
- resolved: bool#
- can_be_resolved: bool#
- can_grant_kudosu: bool#
- created_at: datetime#
- beatmap_id: int | None#
- deleted_by_id: int | None#
- parent_id: int | None#
- timestamp: int | None#
- updated_at: datetime | None#
- deleted_at: datetime | None#
- last_post_at: datetime | None#
- kudosu_denied: bool | None#
- starting_post: BeatmapsetDiscussionPost | None#
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'beatmap_id': FieldInfo(annotation=Union[int, NoneType], required=False), 'beatmapset_id': FieldInfo(annotation=int, required=True), 'can_be_resolved': FieldInfo(annotation=bool, required=True), 'can_grant_kudosu': FieldInfo(annotation=bool, required=True), 'created_at': FieldInfo(annotation=datetime, required=True), 'deleted_at': FieldInfo(annotation=Union[datetime, NoneType], required=False), 'deleted_by_id': FieldInfo(annotation=Union[int, NoneType], required=False), 'id': FieldInfo(annotation=int, required=True), 'kudosu_denied': FieldInfo(annotation=Union[bool, NoneType], required=False), 'last_post_at': FieldInfo(annotation=Union[datetime, NoneType], required=False), 'message_type': FieldInfo(annotation=Literal['hype', 'praise', 'problem', 'review', 'suggestion', 'mapper_note'], required=True), 'parent_id': FieldInfo(annotation=Union[int, NoneType], required=False), 'resolved': FieldInfo(annotation=bool, required=True), 'starting_post': FieldInfo(annotation=Union[BeatmapsetDiscussionPost, NoneType], required=False), 'timestamp': FieldInfo(annotation=Union[int, NoneType], required=False), 'updated_at': FieldInfo(annotation=Union[datetime, NoneType], required=False), 'user_id': FieldInfo(annotation=int, required=True)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class aiosu.models.beatmap.BeatmapsetDiscussionPost(*, id: int, user_id: int, system: bool, message: str, created_at: datetime, beatmap_discussion_id: int | None = None, last_editor_id: int | None = None, deleted_by_id: int | None = None, updated_at: datetime | None = None, deleted_at: datetime | None = None)#
- id: int#
- user_id: int#
- system: bool#
- message: str#
- created_at: datetime#
- beatmap_discussion_id: int | None#
- last_editor_id: int | None#
- deleted_by_id: int | None#
- updated_at: datetime | None#
- deleted_at: datetime | None#
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'beatmap_discussion_id': FieldInfo(annotation=Union[int, NoneType], required=False), 'created_at': FieldInfo(annotation=datetime, required=True), 'deleted_at': FieldInfo(annotation=Union[datetime, NoneType], required=False), 'deleted_by_id': FieldInfo(annotation=Union[int, NoneType], required=False), 'id': FieldInfo(annotation=int, required=True), 'last_editor_id': FieldInfo(annotation=Union[int, NoneType], required=False), 'message': FieldInfo(annotation=str, required=True), 'system': FieldInfo(annotation=bool, required=True), 'updated_at': FieldInfo(annotation=Union[datetime, NoneType], required=False), 'user_id': FieldInfo(annotation=int, required=True)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class aiosu.models.beatmap.BeatmapsetDiscussionPostResponse(*, cursor_string: str | None = None, next: partial[Coroutine[object, object, CursorModel]] | None = None, beatmapsets: list[Beatmapset], posts: list[BeatmapsetDiscussionPost], users: list[User])#
- beatmapsets: list[Beatmapset]#
- posts: list[BeatmapsetDiscussionPost]#
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'beatmapsets': FieldInfo(annotation=list[Beatmapset], required=True), 'cursor_string': FieldInfo(annotation=Union[str, NoneType], required=False), 'next': FieldInfo(annotation=Union[partial[Coroutine[object, object, CursorModel]], NoneType], required=False, exclude=True), 'posts': FieldInfo(annotation=list[BeatmapsetDiscussionPost], required=True), 'users': FieldInfo(annotation=list[User], required=True)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- cursor_string: str | None#
- next: partial[Coroutine[object, object, CursorModel]] | None#
Partial function to get the next page of results.
- class aiosu.models.beatmap.BeatmapsetDiscussionResponse(*, cursor_string: str | None = None, next: partial[Coroutine[object, object, CursorModel]] | None = None, beatmaps: list[Beatmap], discussions: list[BeatmapsetDiscussion], included_discussions: list[BeatmapsetDiscussion], users: list[User], max_blocks: int)#
-
- discussions: list[BeatmapsetDiscussion]#
- included_discussions: list[BeatmapsetDiscussion]#
- max_blocks: int#
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'beatmaps': FieldInfo(annotation=list[Beatmap], required=True), 'cursor_string': FieldInfo(annotation=Union[str, NoneType], required=False), 'discussions': FieldInfo(annotation=list[BeatmapsetDiscussion], required=True), 'included_discussions': FieldInfo(annotation=list[BeatmapsetDiscussion], required=True), 'max_blocks': FieldInfo(annotation=int, required=True), 'next': FieldInfo(annotation=Union[partial[Coroutine[object, object, CursorModel]], NoneType], required=False, exclude=True), 'users': FieldInfo(annotation=list[User], required=True)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- cursor_string: str | None#
- next: partial[Coroutine[object, object, CursorModel]] | None#
Partial function to get the next page of results.
- class aiosu.models.beatmap.BeatmapsetDiscussionVoteResponse(*, cursor_string: str | None = None, next: partial[Coroutine[object, object, CursorModel]] | None = None, votes: list[BeatmapsetVoteEvent], discussions: list[BeatmapsetDiscussion], users: list[User])#
- votes: list[BeatmapsetVoteEvent]#
- discussions: list[BeatmapsetDiscussion]#
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'cursor_string': FieldInfo(annotation=Union[str, NoneType], required=False), 'discussions': FieldInfo(annotation=list[BeatmapsetDiscussion], required=True), 'next': FieldInfo(annotation=Union[partial[Coroutine[object, object, CursorModel]], NoneType], required=False, exclude=True), 'users': FieldInfo(annotation=list[User], required=True), 'votes': FieldInfo(annotation=list[BeatmapsetVoteEvent], required=True)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- cursor_string: str | None#
- next: partial[Coroutine[object, object, CursorModel]] | None#
Partial function to get the next page of results.
- class aiosu.models.beatmap.BeatmapsetEvent(*, id: int, type: Literal['approve', 'beatmap_owner_change', 'discussion_delete', 'discussion_post_delete', 'discussion_post_restore', 'discussion_restore', 'discussion_lock', 'discussion_unlock', 'disqualify', 'genre_edit', 'issue_reopen', 'issue_resolve', 'kudosu_allow', 'kudosu_deny', 'kudosu_gain', 'kudosu_lost', 'kudosu_recalculate', 'language_edit', 'love', 'nominate', 'nomination_reset', 'nomination_reset_received', 'nsfw_toggle', 'offset_edit', 'qualify', 'rank', 'remove_from_loved'], created_at: datetime, user_id: int, beatmapset: Beatmapset | None = None, discussion: BeatmapsetDiscussion | None = None, comment: dict | None = None)#
- id: int#
- type: BeatmapsetEventType#
Information on types: https://github.com/ppy/osu-web/blob/master/resources/assets/lib/interfaces/beatmapset-event-json.ts
- created_at: datetime#
- user_id: int#
- beatmapset: Beatmapset | None#
- discussion: BeatmapsetDiscussion | None#
- comment: dict | None#
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'beatmapset': FieldInfo(annotation=Union[Beatmapset, NoneType], required=False), 'comment': FieldInfo(annotation=Union[dict, NoneType], required=False), 'created_at': FieldInfo(annotation=datetime, required=True), 'discussion': FieldInfo(annotation=Union[BeatmapsetDiscussion, NoneType], required=False), 'id': FieldInfo(annotation=int, required=True), 'type': FieldInfo(annotation=Literal['approve', 'beatmap_owner_change', 'discussion_delete', 'discussion_post_delete', 'discussion_post_restore', 'discussion_restore', 'discussion_lock', 'discussion_unlock', 'disqualify', 'genre_edit', 'issue_reopen', 'issue_resolve', 'kudosu_allow', 'kudosu_deny', 'kudosu_gain', 'kudosu_lost', 'kudosu_recalculate', 'language_edit', 'love', 'nominate', 'nomination_reset', 'nomination_reset_received', 'nsfw_toggle', 'offset_edit', 'qualify', 'rank', 'remove_from_loved'], required=True), 'user_id': FieldInfo(annotation=int, required=True)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class aiosu.models.beatmap.BeatmapsetEventComment(*, beatmap_discussion_id: int | None = None, beatmap_discussion_post_id: int | None = None, new_vote: BeatmapsetVoteEvent | None = None, votes: list[BeatmapsetVoteEvent] | None = None, mode: Gamemode | None = None, reason: str | None = None, source_user_id: int | None = None, source_user_username: str | None = None, nominator_ids: list[int] | None = None, new: str | None = None, old: str | None = None, new_user_id: int | None = None, new_user_username: str | None = None)#
- beatmap_discussion_id: int | None#
- beatmap_discussion_post_id: int | None#
- new_vote: BeatmapsetVoteEvent | None#
- votes: list[BeatmapsetVoteEvent] | None#
- reason: str | None#
- source_user_id: int | None#
- source_user_username: str | None#
- nominator_ids: list[int] | None#
- new: str | None#
- old: str | None#
- new_user_id: int | None#
- new_user_username: str | None#
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'beatmap_discussion_id': FieldInfo(annotation=Union[int, NoneType], required=False), 'beatmap_discussion_post_id': FieldInfo(annotation=Union[int, NoneType], required=False), 'mode': FieldInfo(annotation=Union[Gamemode, NoneType], required=False), 'new': FieldInfo(annotation=Union[str, NoneType], required=False), 'new_user_id': FieldInfo(annotation=Union[int, NoneType], required=False), 'new_user_username': FieldInfo(annotation=Union[str, NoneType], required=False), 'new_vote': FieldInfo(annotation=Union[BeatmapsetVoteEvent, NoneType], required=False), 'nominator_ids': FieldInfo(annotation=Union[list[int], NoneType], required=False), 'old': FieldInfo(annotation=Union[str, NoneType], required=False), 'reason': FieldInfo(annotation=Union[str, NoneType], required=False), 'source_user_id': FieldInfo(annotation=Union[int, NoneType], required=False), 'source_user_username': FieldInfo(annotation=Union[str, NoneType], required=False), 'votes': FieldInfo(annotation=Union[list[BeatmapsetVoteEvent], NoneType], required=False)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class aiosu.models.beatmap.BeatmapsetSearchResponse(*, cursor_string: str | None = None, next: partial[Coroutine[object, object, CursorModel]] | None = None)#
- beatmapsets: list[Beatmapset]#
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'beatmapsets': FieldInfo(annotation=list[Beatmapset], required=True), 'cursor_string': FieldInfo(annotation=Union[str, NoneType], required=False), 'next': FieldInfo(annotation=Union[partial[Coroutine[object, object, CursorModel]], NoneType], required=False, exclude=True)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- cursor_string: str | None#
- next: partial[Coroutine[object, object, CursorModel]] | None#
Partial function to get the next page of results.
- class aiosu.models.beatmap.BeatmapsetVoteEvent(*, score: int, user_id: int, id: int | None = None, created_at: datetime | None = None, updated_at: datetime | None = None, beatmapset_discussion_id: int | None = None)#
- score: int#
- user_id: int#
- id: int | None#
- created_at: datetime | None#
- updated_at: datetime | None#
- beatmapset_discussion_id: int | None#
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'beatmapset_discussion_id': FieldInfo(annotation=Union[int, NoneType], required=False), 'created_at': FieldInfo(annotation=Union[datetime, NoneType], required=False), 'id': FieldInfo(annotation=Union[int, NoneType], required=False), 'score': FieldInfo(annotation=int, required=True), 'updated_at': FieldInfo(annotation=Union[datetime, NoneType], required=False), 'user_id': FieldInfo(annotation=int, required=True)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- aiosu.models.beatmap.BeatmapsetDisscussionType#
alias of
Literal
[‘hype’, ‘praise’, ‘problem’, ‘review’, ‘suggestion’, ‘mapper_note’]
- aiosu.models.beatmap.BeatmapsetEventType#
alias of
Literal
[‘approve’, ‘beatmap_owner_change’, ‘discussion_delete’, ‘discussion_post_delete’, ‘discussion_post_restore’, ‘discussion_restore’, ‘discussion_lock’, ‘discussion_unlock’, ‘disqualify’, ‘genre_edit’, ‘issue_reopen’, ‘issue_resolve’, ‘kudosu_allow’, ‘kudosu_deny’, ‘kudosu_gain’, ‘kudosu_lost’, ‘kudosu_recalculate’, ‘language_edit’, ‘love’, ‘nominate’, ‘nomination_reset’, ‘nomination_reset_received’, ‘nsfw_toggle’, ‘offset_edit’, ‘qualify’, ‘rank’, ‘remove_from_loved’]
- aiosu.models.beatmap.BeatmapsetRequestStatus#
alias of
Literal
[‘all’, ‘ranked’, ‘qualified’, ‘disqualified’, ‘never_ranked’]
- aiosu.models.beatmap.UserBeatmapType#
alias of
Literal
[‘favourite’, ‘graveyard’, ‘loved’, ‘ranked’, ‘pending’]
Score#
This module contains models for Score objects.
- class aiosu.models.score.Score(*, user_id: int, accuracy: float, mods: Mods, score: int, max_combo: int, passed: bool, perfect: bool, statistics: ScoreStatistics, rank: str, created_at: datetime, mode: Gamemode, replay: bool, id: int | None = None, pp: float | None = 0, best_id: int | None = None, beatmap: Beatmap | None = None, beatmapset: Beatmapset | None = None, weight: ScoreWeight | None = None, user: User | None = None, rank_global: int | None = None, rank_country: int | None = None, type: str | None = None, current_user_attributes: CurrentUserAttributes | None = None, beatmap_id: int | None = None)#
- user_id: int#
- accuracy: float#
- score: int#
- max_combo: int#
- passed: bool#
- perfect: bool#
- statistics: ScoreStatistics#
- rank: str#
- created_at: datetime#
- replay: bool#
- id: int | None#
Always present except for API v1 recent scores.
- pp: float | None#
- best_id: int | None#
- beatmapset: Beatmapset | None#
- weight: ScoreWeight | None#
- rank_global: int | None#
- rank_country: int | None#
- type: str | None#
- current_user_attributes: CurrentUserAttributes | None#
- beatmap_id: int | None#
Only present on API v1
- property score_url: str | None#
Link to the score.
- Returns:
Link to the score on the osu! website
- Return type:
Optional[str]
- property replay_url: str | None#
Link to the replay.
- Returns:
Link to download the replay on the osu! website
- Return type:
Optional[str]
- property completion: float | None#
Beatmap completion.
- Raises:
ValueError – If mode is unknown
- Returns:
Beatmap completion of a score (%). 100% for passes. None if no beatmap.
- Return type:
Optional[float]
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'accuracy': FieldInfo(annotation=float, required=True), 'beatmap': FieldInfo(annotation=Union[Beatmap, NoneType], required=False), 'beatmap_id': FieldInfo(annotation=Union[int, NoneType], required=False), 'beatmapset': FieldInfo(annotation=Union[Beatmapset, NoneType], required=False), 'best_id': FieldInfo(annotation=Union[int, NoneType], required=False), 'created_at': FieldInfo(annotation=datetime, required=True), 'current_user_attributes': FieldInfo(annotation=Union[CurrentUserAttributes, NoneType], required=False), 'id': FieldInfo(annotation=Union[int, NoneType], required=False), 'max_combo': FieldInfo(annotation=int, required=True), 'mode': FieldInfo(annotation=Gamemode, required=True), 'mods': FieldInfo(annotation=Mods, required=True), 'passed': FieldInfo(annotation=bool, required=True), 'perfect': FieldInfo(annotation=bool, required=True), 'pp': FieldInfo(annotation=Union[float, NoneType], required=False, default=0), 'rank': FieldInfo(annotation=str, required=True), 'rank_country': FieldInfo(annotation=Union[int, NoneType], required=False), 'rank_global': FieldInfo(annotation=Union[int, NoneType], required=False), 'replay': FieldInfo(annotation=bool, required=True), 'score': FieldInfo(annotation=int, required=True), 'statistics': FieldInfo(annotation=ScoreStatistics, required=True), 'type': FieldInfo(annotation=Union[str, NoneType], required=False), 'user': FieldInfo(annotation=Union[User, NoneType], required=False), 'user_id': FieldInfo(annotation=int, required=True), 'weight': FieldInfo(annotation=Union[ScoreWeight, NoneType], required=False)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- async request_beatmap(client: v1.Client) None #
For v1 Scores: requests the beatmap from the API and sets it.
- Parameters:
client (aiosu.v1.client.Client) – An API v1 Client
- class aiosu.models.score.ScoreStatistics(*, count_50: int, count_100: int, count_300: int, count_miss: int, count_geki: int, count_katu: int)#
- count_50: int#
- count_100: int#
- count_300: int#
- count_miss: int#
- count_geki: int#
- count_katu: int#
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'count_100': FieldInfo(annotation=int, required=True), 'count_300': FieldInfo(annotation=int, required=True), 'count_50': FieldInfo(annotation=int, required=True), 'count_geki': FieldInfo(annotation=int, required=True), 'count_katu': FieldInfo(annotation=int, required=True), 'count_miss': FieldInfo(annotation=int, required=True)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class aiosu.models.score.ScoreWeight(*, percentage: float, pp: float)#
- percentage: float#
- pp: float#
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'percentage': FieldInfo(annotation=float, required=True), 'pp': FieldInfo(annotation=float, required=True)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- aiosu.models.score.calculate_score_completion(mode: Gamemode, statistics: ScoreStatistics, beatmap: Beatmap) float | None #
Calculates completion for a score.
- Parameters:
mode (aiosu.models.gamemode.Gamemode) – The gamemode of the score
statistics (aiosu.models.score.ScoreStatistics) – The statistics of the score
beatmap (aiosu.models.beatmap.Beatmap) – The beatmap of the score
- Raises:
ValueError – If the gamemode is unknown
- Returns:
Completion for the given score
- Return type:
Optional[float]
Replay#
This module contains models for replays.
- class aiosu.models.files.replay.ReplayEvent(*, time: int, x: float, y: float, keys: ReplayKey)#
Replay event data.
- time: int#
- x: float#
- y: float#
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'keys': FieldInfo(annotation=ReplayKey, required=True), 'time': FieldInfo(annotation=int, required=True), 'x': FieldInfo(annotation=float, required=True), 'y': FieldInfo(annotation=float, required=True)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class aiosu.models.files.replay.ReplayFile(*, mode: Gamemode, version: int, map_md5: str, player_name: str, played_at: datetime, replay_md5: str, online_id: int, score: int, max_combo: int, perfect_combo: bool, mods: Mods, statistics: ScoreStatistics, replay_data: list[ReplayEvent], lifebar_data: list[ReplayLifebarEvent], mod_extras: float | None = None, skip_offset: int | None = None, rng_seed: int | None = None, lazer_replay_data: LazerReplayData | None = None)#
Replay file data.
- version: int#
- map_md5: str#
- player_name: str#
- played_at: datetime#
- replay_md5: str#
- online_id: int#
- score: int#
- max_combo: int#
- perfect_combo: bool#
- statistics: ScoreStatistics#
- replay_data: list[ReplayEvent]#
- lifebar_data: list[ReplayLifebarEvent]#
- mod_extras: float | None#
- skip_offset: int | None#
- rng_seed: int | None#
- lazer_replay_data: LazerReplayData | None#
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'lazer_replay_data': FieldInfo(annotation=Union[LazerReplayData, NoneType], required=False), 'lifebar_data': FieldInfo(annotation=list[ReplayLifebarEvent], required=True), 'map_md5': FieldInfo(annotation=str, required=True), 'max_combo': FieldInfo(annotation=int, required=True), 'mod_extras': FieldInfo(annotation=Union[float, NoneType], required=False), 'mode': FieldInfo(annotation=Gamemode, required=True), 'mods': FieldInfo(annotation=Mods, required=True), 'online_id': FieldInfo(annotation=int, required=True), 'perfect_combo': FieldInfo(annotation=bool, required=True), 'played_at': FieldInfo(annotation=datetime, required=True), 'player_name': FieldInfo(annotation=str, required=True), 'replay_data': FieldInfo(annotation=list[ReplayEvent], required=True), 'replay_md5': FieldInfo(annotation=str, required=True), 'rng_seed': FieldInfo(annotation=Union[int, NoneType], required=False), 'score': FieldInfo(annotation=int, required=True), 'skip_offset': FieldInfo(annotation=Union[int, NoneType], required=False), 'statistics': FieldInfo(annotation=ScoreStatistics, required=True), 'version': FieldInfo(annotation=int, required=True)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class aiosu.models.files.replay.ReplayKey(value)#
Replay key data.
- K1 = 1#
- K2 = 2#
- K3 = 4#
- K4 = 8#
- K5 = 16#
- K6 = 32#
- K7 = 64#
- K8 = 128#
- K9 = 256#
- K10 = 512#
- K11 = 1024#
- K12 = 2048#
- K13 = 4096#
- K14 = 8192#
- K15 = 16384#
- K16 = 32768#
- K17 = 65536#
- K18 = 131072#
- class aiosu.models.files.replay.ReplayLifebarEvent(*, time: int, hp: float)#
Replay lifebar event data.
- time: int#
- hp: float#
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'hp': FieldInfo(annotation=float, required=True), 'time': FieldInfo(annotation=int, required=True)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
Mods#
This module contains models for mods.
- class aiosu.models.mods.Mod(value)#
Bitwise Flags representing osu! mods.
- NoMod = 0#
- NoFail = 1#
- Easy = 2#
- TouchDevice = 4#
- Hidden = 8#
- HardRock = 16#
- SuddenDeath = 32#
- DoubleTime = 64#
- Relax = 128#
- HalfTime = 256#
- Nightcore = 512#
Only set along with DoubleTime. i.e: NC only gives 576
- Flashlight = 1024#
- Autoplay = 2048#
- SpunOut = 4096#
- Autopilot = 8192#
Called Relax2 on osu! API documentation
- Perfect = 16384#
Only set along with SuddenDeath. i.e: PF only gives 16416
- Key4 = 32768#
- Key5 = 65536#
- Key6 = 131072#
- Key7 = 262144#
- Key8 = 524288#
- FadeIn = 1048576#
- Random = 2097152#
- Cinema = 4194304#
- Target = 8388608#
- Key9 = 16777216#
- KeyCoop = 33554432#
- Key1 = 67108864#
- Key3 = 134217728#
- Key2 = 268435456#
- ScoreV2 = 536870912#
- Mirror = 1073741824#
- property bitmask: int#
- property short_name: str#
- class aiosu.models.mods.Mods(mods: list[str] | str | int)#
List of Mod objects
- property bitwise: int#
Bitwise representation.
- Returns:
Bitwise representation of the mod combination
- Return type:
int
- append(item)#
S.append(value) – append value to the end of the sequence
- clear() None -- remove all items from S #
- copy()#
- count(value) integer -- return number of occurrences of value #
- extend(other)#
S.extend(iterable) – extend sequence by appending elements from the iterable
- index(value[, start[, stop]]) integer -- return first index of value. #
Raises ValueError if the value is not present.
Supporting start and stop arguments is optional, but recommended.
- insert(i, item)#
S.insert(index, value) – insert value before index
- pop([index]) item -- remove and return item at index (default last). #
Raise IndexError if list is empty or index is out of range.
- remove(item)#
S.remove(value) – remove first occurrence of value. Raise ValueError if the value is not present.
- reverse()#
S.reverse() – reverse IN PLACE
- sort(*args, **kwds)#
- aiosu.models.mods.KeyMod = 521109504#
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4
- aiosu.models.mods.FreemodAllowed = 1598026939#
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4
- aiosu.models.mods.ScoreIncreaseMods = 1112#
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4
- aiosu.models.mods.SpeedChangingMods = 832#
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4
Performance#
This module contains models for API v2 difficulty attribute objects.
- class aiosu.models.performance.CatchPerformanceAttributes(*, total: float)#
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'total': FieldInfo(annotation=float, required=True)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- total: float#
- class aiosu.models.performance.ManiaPerformanceAttributes(*, total: float, difficulty: float)#
- difficulty: float#
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'difficulty': FieldInfo(annotation=float, required=True), 'total': FieldInfo(annotation=float, required=True)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- total: float#
- class aiosu.models.performance.OsuPerformanceAttributes(*, total: float, aim: float, speed: float, accuracy: float, flashlight: float, effective_miss_count: float)#
- aim: float#
- speed: float#
- accuracy: float#
- flashlight: float#
- effective_miss_count: float#
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'accuracy': FieldInfo(annotation=float, required=True), 'aim': FieldInfo(annotation=float, required=True), 'effective_miss_count': FieldInfo(annotation=float, required=True), 'flashlight': FieldInfo(annotation=float, required=True), 'speed': FieldInfo(annotation=float, required=True), 'total': FieldInfo(annotation=float, required=True)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- total: float#
- class aiosu.models.performance.PerformanceAttributes(*, total: float)#
- total: float#
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'total': FieldInfo(annotation=float, required=True)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class aiosu.models.performance.TaikoPerformanceAttributes(*, total: float, difficulty: float, accuracy: float, effective_miss_count: float)#
- difficulty: float#
- accuracy: float#
- effective_miss_count: float#
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'accuracy': FieldInfo(annotation=float, required=True), 'difficulty': FieldInfo(annotation=float, required=True), 'effective_miss_count': FieldInfo(annotation=float, required=True), 'total': FieldInfo(annotation=float, required=True)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- total: float#
Gamemode#
This module contains models for Gamemode objects.
- class aiosu.models.gamemode.Gamemode(value)#
An enumeration.
- STANDARD = 0#
- TAIKO = 1#
- CTB = 2#
- MANIA = 3#
- property id: int#
- property name_full: str#
- property name_short: str#
- property name_api: str#
Lazer#
This module contains models for lazer specific data.
- class aiosu.models.lazer.LazerMod(*, acronym: str, settings: dict[str, object] = None)#
Temporary model for lazer mods.
- acronym: str#
- settings: dict[str, object]#
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'acronym': FieldInfo(annotation=str, required=True), 'settings': FieldInfo(annotation=dict[str, object], required=False, default_factory=dict)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class aiosu.models.lazer.LazerReplayData(*, mods: list[LazerMod], statistics: LazerScoreStatistics, maximum_statistics: LazerScoreStatistics)#
-
- statistics: LazerScoreStatistics#
- maximum_statistics: LazerScoreStatistics#
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'maximum_statistics': FieldInfo(annotation=LazerScoreStatistics, required=True), 'mods': FieldInfo(annotation=list[LazerMod], required=True), 'statistics': FieldInfo(annotation=LazerScoreStatistics, required=True)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class aiosu.models.lazer.LazerScore(*, id: int, accuracy: float, beatmap_id: int, max_combo: int, maximum_statistics: LazerScoreStatistics, mods: list[LazerMod], passed: bool, rank: str, ruleset_id: int, ended_at: datetime, statistics: LazerScoreStatistics, total_score: int, user_id: int, replay: bool, type: Literal['solo_score', 'score_best_osu', 'score_best_taiko', 'score_best_fruits', 'score_best_mania', 'score_osu', 'score_taiko', 'score_fruits', 'score_mania'], current_user_attributes: CurrentUserAttributes, beatmap: Beatmap, beatmapset: Beatmapset, user: User, build_id: int | None = None, legacy_score_id: int | None = None, legacy_total_score: int | None = None, started_at: datetime | None = None, best_id: int | None = None, legacy_perfect: bool | None = None, pp: float | None = None, weight: ScoreWeight | None = None)#
- id: int#
- accuracy: float#
- beatmap_id: int#
- max_combo: int#
- maximum_statistics: LazerScoreStatistics#
- passed: bool#
- rank: str#
- ruleset_id: int#
- ended_at: datetime#
- statistics: LazerScoreStatistics#
- total_score: int#
- user_id: int#
- replay: bool#
- type: ScoreType#
- current_user_attributes: CurrentUserAttributes#
- beatmapset: Beatmapset#
- build_id: int | None#
- legacy_score_id: int | None#
- legacy_total_score: int | None#
- started_at: datetime | None#
- best_id: int | None#
- legacy_perfect: bool | None#
- pp: float | None#
- weight: ScoreWeight | None#
- property created_at: datetime#
- property score: int#
- property has_replay: bool#
- property score_url: str | None#
Link to the score.
- Returns:
Link to the score on the osu! website
- Return type:
Optional[str]
- property replay_url: str | None#
Link to the replay.
- Returns:
Link to download the replay on the osu! website
- Return type:
Optional[str]
- property completion: float | None#
Beatmap completion.
- Returns:
Beatmap completion of a score (%). 100% for passes. None if no beatmap.
- Return type:
Optional[float]
- property mods_str: str#
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'accuracy': FieldInfo(annotation=float, required=True), 'beatmap': FieldInfo(annotation=Beatmap, required=True), 'beatmap_id': FieldInfo(annotation=int, required=True), 'beatmapset': FieldInfo(annotation=Beatmapset, required=True), 'best_id': FieldInfo(annotation=Union[int, NoneType], required=False), 'build_id': FieldInfo(annotation=Union[int, NoneType], required=False), 'current_user_attributes': FieldInfo(annotation=CurrentUserAttributes, required=True), 'ended_at': FieldInfo(annotation=datetime, required=True), 'id': FieldInfo(annotation=int, required=True), 'legacy_perfect': FieldInfo(annotation=Union[bool, NoneType], required=False), 'legacy_score_id': FieldInfo(annotation=Union[int, NoneType], required=False), 'legacy_total_score': FieldInfo(annotation=Union[int, NoneType], required=False), 'max_combo': FieldInfo(annotation=int, required=True), 'maximum_statistics': FieldInfo(annotation=LazerScoreStatistics, required=True), 'mods': FieldInfo(annotation=list[LazerMod], required=True), 'passed': FieldInfo(annotation=bool, required=True), 'pp': FieldInfo(annotation=Union[float, NoneType], required=False), 'rank': FieldInfo(annotation=str, required=True), 'replay': FieldInfo(annotation=bool, required=True), 'ruleset_id': FieldInfo(annotation=int, required=True), 'started_at': FieldInfo(annotation=Union[datetime, NoneType], required=False), 'statistics': FieldInfo(annotation=LazerScoreStatistics, required=True), 'total_score': FieldInfo(annotation=int, required=True), 'type': FieldInfo(annotation=Literal['solo_score', 'score_best_osu', 'score_best_taiko', 'score_best_fruits', 'score_best_mania', 'score_osu', 'score_taiko', 'score_fruits', 'score_mania'], required=True), 'user': FieldInfo(annotation=User, required=True), 'user_id': FieldInfo(annotation=int, required=True), 'weight': FieldInfo(annotation=Union[ScoreWeight, NoneType], required=False)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class aiosu.models.lazer.LazerScoreStatistics(*, ok: int = 0, meh: int = 0, miss: int = 0, great: int = 0, ignore_hit: int = 0, ignore_miss: int = 0, large_bonus: int = 0, large_tick_hit: int = 0, large_tick_miss: int = 0, small_bonus: int = 0, small_tick_hit: int = 0, small_tick_miss: int = 0, good: int = 0, perfect: int = 0, legacy_combo_increase: int = 0)#
- ok: int#
- meh: int#
- miss: int#
- great: int#
- ignore_hit: int#
- ignore_miss: int#
- large_bonus: int#
- large_tick_hit: int#
- large_tick_miss: int#
- small_bonus: int#
- small_tick_hit: int#
- small_tick_miss: int#
- good: int#
- perfect: int#
- legacy_combo_increase: int#
- property count_300: int#
- property count_100: int#
- property count_50: int#
- property count_miss: int#
- property count_geki: int#
- property count_katu: int#
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'good': FieldInfo(annotation=int, required=False, default=0), 'great': FieldInfo(annotation=int, required=False, default=0), 'ignore_hit': FieldInfo(annotation=int, required=False, default=0), 'ignore_miss': FieldInfo(annotation=int, required=False, default=0), 'large_bonus': FieldInfo(annotation=int, required=False, default=0), 'large_tick_hit': FieldInfo(annotation=int, required=False, default=0), 'large_tick_miss': FieldInfo(annotation=int, required=False, default=0), 'legacy_combo_increase': FieldInfo(annotation=int, required=False, default=0), 'meh': FieldInfo(annotation=int, required=False, default=0), 'miss': FieldInfo(annotation=int, required=False, default=0), 'ok': FieldInfo(annotation=int, required=False, default=0), 'perfect': FieldInfo(annotation=int, required=False, default=0), 'small_bonus': FieldInfo(annotation=int, required=False, default=0), 'small_tick_hit': FieldInfo(annotation=int, required=False, default=0), 'small_tick_miss': FieldInfo(annotation=int, required=False, default=0)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
Multiplayer#
This module contains models for multiplayer.
- class aiosu.models.multiplayer.MultiplayerEvent(*, id: int, timestamp: datetime, type: Literal['match-created', 'match-disbanded', 'host-changed', 'player-joined', 'player-left', 'player-kicked', 'match-created-no-user', 'match-disbanded-no-user', 'host-changed-no-user', 'player-joined-no-user', 'player-left-no-user', 'player-kicked-no-user', 'other'], user_id: int | None = None, game: MultiplayerGame | None = None)#
- id: int#
- timestamp: datetime#
- type: MultiplayerEventType#
- user_id: int | None#
- game: MultiplayerGame | None#
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'game': FieldInfo(annotation=Union[MultiplayerGame, NoneType], required=False), 'id': FieldInfo(annotation=int, required=True), 'timestamp': FieldInfo(annotation=datetime, required=True), 'type': FieldInfo(annotation=Literal['match-created', 'match-disbanded', 'host-changed', 'player-joined', 'player-left', 'player-kicked', 'match-created-no-user', 'match-disbanded-no-user', 'host-changed-no-user', 'player-joined-no-user', 'player-left-no-user', 'player-kicked-no-user', 'other'], required=True), 'user_id': FieldInfo(annotation=Union[int, NoneType], required=False)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class aiosu.models.multiplayer.MultiplayerGame(*, id: int, start_time: datetime, mode: Gamemode, scoring_type: Literal['score', 'accuracy', 'combo', 'scorev2'], team_type: Literal['head-to-head', 'tag-coop', 'team-vs', 'tag-team-vs'], mods: list[Mods | LazerMod], beatmap_id: int, scores: list[MultiplayerScore], beatmap: Beatmap | None = None, end_time: datetime | None = None)#
- id: int#
- start_time: datetime#
- scoring_type: MultiplayerScoringType#
- team_type: MultiplayerTeamType#
- beatmap_id: int#
- scores: list[MultiplayerScore]#
- end_time: datetime | None#
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'beatmap': FieldInfo(annotation=Union[Beatmap, NoneType], required=False), 'beatmap_id': FieldInfo(annotation=int, required=True), 'end_time': FieldInfo(annotation=Union[datetime, NoneType], required=False), 'id': FieldInfo(annotation=int, required=True), 'mode': FieldInfo(annotation=Gamemode, required=True), 'mods': FieldInfo(annotation=list[Union[Mods, LazerMod]], required=True), 'scores': FieldInfo(annotation=list[MultiplayerScore], required=True), 'scoring_type': FieldInfo(annotation=Literal['score', 'accuracy', 'combo', 'scorev2'], required=True), 'start_time': FieldInfo(annotation=datetime, required=True), 'team_type': FieldInfo(annotation=Literal['head-to-head', 'tag-coop', 'team-vs', 'tag-team-vs'], required=True)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class aiosu.models.multiplayer.MultiplayerLeaderboardItem(*, accuracy: float, attempts: int, completed: int, pp: float, room_id: int, total_score: int, user_id: int, user: User, position: int | None = None)#
- accuracy: float#
- attempts: int#
- completed: int#
- pp: float#
- room_id: int#
- total_score: int#
- user_id: int#
- position: int | None#
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'accuracy': FieldInfo(annotation=float, required=True), 'attempts': FieldInfo(annotation=int, required=True), 'completed': FieldInfo(annotation=int, required=True), 'position': FieldInfo(annotation=Union[int, NoneType], required=False), 'pp': FieldInfo(annotation=float, required=True), 'room_id': FieldInfo(annotation=int, required=True), 'total_score': FieldInfo(annotation=int, required=True), 'user': FieldInfo(annotation=User, required=True), 'user_id': FieldInfo(annotation=int, required=True)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class aiosu.models.multiplayer.MultiplayerLeaderboardResponse(*, leaderboard: list[MultiplayerLeaderboardItem], user_score: MultiplayerLeaderboardItem | None = None)#
- leaderboard: list[MultiplayerLeaderboardItem]#
- user_score: MultiplayerLeaderboardItem | None#
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'leaderboard': FieldInfo(annotation=list[MultiplayerLeaderboardItem], required=True), 'user_score': FieldInfo(annotation=Union[MultiplayerLeaderboardItem, NoneType], required=False)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class aiosu.models.multiplayer.MultiplayerMatch(*, id: int, name: str, start_time: datetime, end_time: datetime | None = None)#
- id: int#
- name: str#
- start_time: datetime#
- end_time: datetime | None#
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'end_time': FieldInfo(annotation=Union[datetime, NoneType], required=False), 'id': FieldInfo(annotation=int, required=True), 'name': FieldInfo(annotation=str, required=True), 'start_time': FieldInfo(annotation=datetime, required=True)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class aiosu.models.multiplayer.MultiplayerMatchResponse(*, match: MultiplayerMatch, events: list[MultiplayerEvent], users: list[User], first_event_id: int, latest_event_id: int, current_game_id: int | None = None)#
- match: MultiplayerMatch#
- events: list[MultiplayerEvent]#
- first_event_id: int#
- latest_event_id: int#
- current_game_id: int | None#
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'current_game_id': FieldInfo(annotation=Union[int, NoneType], required=False), 'events': FieldInfo(annotation=list[MultiplayerEvent], required=True), 'first_event_id': FieldInfo(annotation=int, required=True), 'latest_event_id': FieldInfo(annotation=int, required=True), 'match': FieldInfo(annotation=MultiplayerMatch, required=True), 'users': FieldInfo(annotation=list[User], required=True)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class aiosu.models.multiplayer.MultiplayerMatchesResponse(*, cursor_string: str | None = None, next: partial[Coroutine[object, object, CursorModel]] | None = None, matches: list[MultiplayerMatch])#
- matches: list[MultiplayerMatch]#
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'cursor_string': FieldInfo(annotation=Union[str, NoneType], required=False), 'matches': FieldInfo(annotation=list[MultiplayerMatch], required=True), 'next': FieldInfo(annotation=Union[partial[Coroutine[object, object, CursorModel]], NoneType], required=False, exclude=True)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- cursor_string: str | None#
- next: partial[Coroutine[object, object, CursorModel]] | None#
Partial function to get the next page of results.
- class aiosu.models.multiplayer.MultiplayerRoom(*, id: int, name: str, category: Literal['normal', 'spotlight', 'featured_artist'], type: Literal['playlists', 'realtime'], user_id: int, channel_id: int, active: bool, has_password: bool, auto_skip: bool, host: User, queue_mode: Literal['host_only', 'all_players', 'all_players_round_robin'], playlist: list[MultiplayerPlaylistItem], recent_participants: list[User], participant_count: int | None = None, starts_at: datetime | None = None, ends_at: datetime | None = None, max_attempts: int | None = None)#
- id: int#
- name: str#
- category: MultiplayerRoomCategory#
- type: MultiplayerRoomTypeGroup#
- user_id: int#
- channel_id: int#
- active: bool#
- has_password: bool#
- auto_skip: bool#
- queue_mode: MultiplayerQueueMode#
- playlist: list[MultiplayerPlaylistItem]#
- participant_count: int | None#
- starts_at: datetime | None#
- ends_at: datetime | None#
- max_attempts: int | None#
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'active': FieldInfo(annotation=bool, required=True), 'auto_skip': FieldInfo(annotation=bool, required=True), 'category': FieldInfo(annotation=Literal['normal', 'spotlight', 'featured_artist'], required=True), 'channel_id': FieldInfo(annotation=int, required=True), 'ends_at': FieldInfo(annotation=Union[datetime, NoneType], required=False), 'has_password': FieldInfo(annotation=bool, required=True), 'host': FieldInfo(annotation=User, required=True), 'id': FieldInfo(annotation=int, required=True), 'max_attempts': FieldInfo(annotation=Union[int, NoneType], required=False), 'name': FieldInfo(annotation=str, required=True), 'participant_count': FieldInfo(annotation=Union[int, NoneType], required=False), 'playlist': FieldInfo(annotation=list[MultiplayerPlaylistItem], required=True), 'queue_mode': FieldInfo(annotation=Literal['host_only', 'all_players', 'all_players_round_robin'], required=True), 'recent_participants': FieldInfo(annotation=list[User], required=True), 'starts_at': FieldInfo(annotation=Union[datetime, NoneType], required=False), 'type': FieldInfo(annotation=Literal['playlists', 'realtime'], required=True), 'user_id': FieldInfo(annotation=int, required=True)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class aiosu.models.multiplayer.MultiplayerRoomsResponse(*, cursor_string: str | None = None, next: partial[Coroutine[object, object, CursorModel]] | None = None, rooms: list[MultiplayerRoom])#
Currently unused. Relevant for api-version >= 99999999
- rooms: list[MultiplayerRoom]#
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'cursor_string': FieldInfo(annotation=Union[str, NoneType], required=False), 'next': FieldInfo(annotation=Union[partial[Coroutine[object, object, CursorModel]], NoneType], required=False, exclude=True), 'rooms': FieldInfo(annotation=list[MultiplayerRoom], required=True)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- cursor_string: str | None#
- next: partial[Coroutine[object, object, CursorModel]] | None#
Partial function to get the next page of results.
- class aiosu.models.multiplayer.MultiplayerScore#
- user_id: int#
- rank: str#
- accuracy: float#
- max_combo: int#
- passed: bool#
- statistics: LazerScoreStatistics#
- id: int | None#
- room_id: int | None#
- beatmap_id: int | None#
- playlist_item_id: int | None#
- position: int | None#
- total_score: int | None#
- scores_around: MultiplayerScoresAround | None#
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'accuracy': FieldInfo(annotation=float, required=True), 'beatmap_id': FieldInfo(annotation=Union[int, NoneType], required=False), 'id': FieldInfo(annotation=Union[int, NoneType], required=False), 'max_combo': FieldInfo(annotation=int, required=True), 'mods': FieldInfo(annotation=list[Union[Mods, LazerMod]], required=True), 'passed': FieldInfo(annotation=bool, required=True), 'playlist_item_id': FieldInfo(annotation=Union[int, NoneType], required=False), 'position': FieldInfo(annotation=Union[int, NoneType], required=False), 'rank': FieldInfo(annotation=str, required=True), 'room_id': FieldInfo(annotation=Union[int, NoneType], required=False), 'scores_around': FieldInfo(annotation=Union[MultiplayerScoresAround, NoneType], required=False), 'statistics': FieldInfo(annotation=LazerScoreStatistics, required=True), 'total_score': FieldInfo(annotation=Union[int, NoneType], required=False), 'user': FieldInfo(annotation=Union[User, NoneType], required=False), 'user_id': FieldInfo(annotation=int, required=True)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class aiosu.models.multiplayer.MultiplayerScoresAround#
- higher: MultiplayerScoresResponse#
- lower: MultiplayerScoresResponse#
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'higher': FieldInfo(annotation=MultiplayerScoresResponse, required=True), 'lower': FieldInfo(annotation=MultiplayerScoresResponse, required=True)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class aiosu.models.multiplayer.MultiplayerScoresResponse(*, cursor_string: str | None = None, next: partial[Coroutine[object, object, CursorModel]] | None = None, scores: list[MultiplayerScore], user_score: MultiplayerScore | None = None, total: int | None = None)#
- scores: list[MultiplayerScore]#
- user_score: MultiplayerScore | None#
- total: int | None#
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'cursor_string': FieldInfo(annotation=Union[str, NoneType], required=False), 'next': FieldInfo(annotation=Union[partial[Coroutine[object, object, CursorModel]], NoneType], required=False, exclude=True), 'scores': FieldInfo(annotation=list[MultiplayerScore], required=True), 'total': FieldInfo(annotation=Union[int, NoneType], required=False), 'user_score': FieldInfo(annotation=Union[MultiplayerScore, NoneType], required=False)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- cursor_string: str | None#
- next: partial[Coroutine[object, object, CursorModel]] | None#
Partial function to get the next page of results.
- aiosu.models.multiplayer.MultiplayerScoreSortType#
alias of
Literal
[‘score_asc’, ‘score_desc’]
- aiosu.models.multiplayer.MultiplayerEventType#
alias of
Literal
[‘match-created’, ‘match-disbanded’, ‘host-changed’, ‘player-joined’, ‘player-left’, ‘player-kicked’, ‘match-created-no-user’, ‘match-disbanded-no-user’, ‘host-changed-no-user’, ‘player-joined-no-user’, ‘player-left-no-user’, ‘player-kicked-no-user’, ‘other’]
- aiosu.models.multiplayer.MultiplayerRoomMode#
alias of
Literal
[‘owned’, ‘participated’, ‘ended’]
- aiosu.models.multiplayer.MultiplayerRoomCategory#
alias of
Literal
[‘normal’, ‘spotlight’, ‘featured_artist’]
- aiosu.models.multiplayer.MultiplayerRoomTypeGroup#
alias of
Literal
[‘playlists’, ‘realtime’]
- aiosu.models.multiplayer.MultiplayerQueueMode#
alias of
Literal
[‘host_only’, ‘all_players’, ‘all_players_round_robin’]
Featured Artists#
This module contains models for featured artists.
- class aiosu.models.artist.ArtistResponse(*, cursor_string: str | None = None, next: partial[Coroutine[object, object, CursorModel]] | None = None, artist_tracks: list[ArtistTrack], search: ArtistSearch | None = None)#
Artist response model.
- artist_tracks: list[ArtistTrack]#
- search: ArtistSearch | None#
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'artist_tracks': FieldInfo(annotation=list[ArtistTrack], required=True), 'cursor_string': FieldInfo(annotation=Union[str, NoneType], required=False), 'next': FieldInfo(annotation=Union[partial[Coroutine[object, object, CursorModel]], NoneType], required=False, exclude=True), 'search': FieldInfo(annotation=Union[ArtistSearch, NoneType], required=False)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- cursor_string: str | None#
- next: partial[Coroutine[object, object, CursorModel]] | None#
Partial function to get the next page of results.
- class aiosu.models.artist.ArtistTrack(*, id: int, artist_id: int, bpm: float, cover_url: str, exclusive: bool, genre: str, is_new: bool, length: str, title: str, artist: Artist, osz: str, preview: str, album: Album | None = None, album_id: int | None = None, updated_at: datetime | None = None, version: str | None = None)#
- id: int#
- artist_id: int#
- bpm: float#
- cover_url: str#
- exclusive: bool#
- genre: str#
- is_new: bool#
- length: str#
- title: str#
- artist: Artist#
- osz_url: str#
- preview_url: str#
- album: Album | None#
- album_id: int | None#
- updated_at: datetime | None#
- version: str | None#
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'album': FieldInfo(annotation=Union[Album, NoneType], required=False), 'album_id': FieldInfo(annotation=Union[int, NoneType], required=False), 'artist': FieldInfo(annotation=Artist, required=True), 'artist_id': FieldInfo(annotation=int, required=True), 'bpm': FieldInfo(annotation=float, required=True), 'cover_url': FieldInfo(annotation=str, required=True), 'exclusive': FieldInfo(annotation=bool, required=True), 'genre': FieldInfo(annotation=str, required=True), 'id': FieldInfo(annotation=int, required=True), 'is_new': FieldInfo(annotation=bool, required=True), 'length': FieldInfo(annotation=str, required=True), 'osz_url': FieldInfo(annotation=str, required=True, alias='osz', alias_priority=2), 'preview_url': FieldInfo(annotation=str, required=True, alias='preview', alias_priority=2), 'title': FieldInfo(annotation=str, required=True), 'updated_at': FieldInfo(annotation=Union[datetime, NoneType], required=False), 'version': FieldInfo(annotation=Union[str, NoneType], required=False)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- aiosu.models.artist.ArtistSortType#
alias of
Literal
[‘album_asc’, ‘album_desc’, ‘artist_asc’, ‘artist_desc’, ‘bpm_asc’, ‘bpm_desc’, ‘genre_asc’, ‘genre_desc’, ‘length_asc’, ‘length_desc’, ‘relevance_asc’, ‘relevance_desc’, ‘title_asc’, ‘title_desc’, ‘update_asc’, ‘update_desc’]
Backgrounds#
This module contains models for seasonal background objects.
- class aiosu.models.backgrounds.Background(*, url: str, user: User)#
- url: str#
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'url': FieldInfo(annotation=str, required=True), 'user': FieldInfo(annotation=User, required=True)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class aiosu.models.backgrounds.SeasonalBackgroundSet(*, ends_at: datetime, backgrounds: list[Background])#
- ends_at: datetime#
- backgrounds: list[Background]#
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'backgrounds': FieldInfo(annotation=list[Background], required=True), 'ends_at': FieldInfo(annotation=datetime, required=True)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
Changelogs#
This module contains models for changelog objects.
- class aiosu.models.changelog.Build(*, id: int, created_at: datetime, display_version: str, users: int, version: str, youtube_id: str | None = None, update_stream: UpdateStream | None = None, changelog_entries: list[ChangelogEntry] | None = None, versions: Version | None = None)#
- id: int#
- created_at: datetime#
- display_version: str#
- users: int#
- version: str#
- youtube_id: str | None#
- update_stream: UpdateStream | None#
- changelog_entries: list[ChangelogEntry] | None#
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'changelog_entries': FieldInfo(annotation=Union[list[ChangelogEntry], NoneType], required=False), 'created_at': FieldInfo(annotation=datetime, required=True), 'display_version': FieldInfo(annotation=str, required=True), 'id': FieldInfo(annotation=int, required=True), 'update_stream': FieldInfo(annotation=Union[UpdateStream, NoneType], required=False), 'users': FieldInfo(annotation=int, required=True), 'version': FieldInfo(annotation=str, required=True), 'versions': FieldInfo(annotation=Union[Version, NoneType], required=False), 'youtube_id': FieldInfo(annotation=Union[str, NoneType], required=False)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class aiosu.models.changelog.ChangelogEntry(*, type: Literal['add', 'fix'], category: str, major: bool, id: int | None = None, title: str | None = None, created_at: datetime | None = None, url: str | None = None, github_url: str | None = None, github_pull_request_id: int | None = None, repository: str | None = None, message: str | None = None, message_html: str | None = None, github_user: GithubUser | None = None)#
- type: ChangelogEntryType#
- category: str#
- major: bool#
- id: int | None#
- title: str | None#
- created_at: datetime | None#
- url: str | None#
- github_url: str | None#
- github_pull_request_id: int | None#
- repository: str | None#
- message: str | None#
- message_html: str | None#
- github_user: GithubUser | None#
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'category': FieldInfo(annotation=str, required=True), 'created_at': FieldInfo(annotation=Union[datetime, NoneType], required=False), 'github_pull_request_id': FieldInfo(annotation=Union[int, NoneType], required=False), 'github_url': FieldInfo(annotation=Union[str, NoneType], required=False), 'github_user': FieldInfo(annotation=Union[GithubUser, NoneType], required=False), 'id': FieldInfo(annotation=Union[int, NoneType], required=False), 'major': FieldInfo(annotation=bool, required=True), 'message': FieldInfo(annotation=Union[str, NoneType], required=False), 'message_html': FieldInfo(annotation=Union[str, NoneType], required=False), 'repository': FieldInfo(annotation=Union[str, NoneType], required=False), 'title': FieldInfo(annotation=Union[str, NoneType], required=False), 'type': FieldInfo(annotation=Literal['add', 'fix'], required=True), 'url': FieldInfo(annotation=Union[str, NoneType], required=False)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class aiosu.models.changelog.ChangelogListing(*, cursor_string: str | None = None, next: partial[Coroutine[object, object, CursorModel]] | None = None, builds: list[Build], search: ChangelogSearch, streams: list[UpdateStream])#
-
- search: ChangelogSearch#
- streams: list[UpdateStream]#
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'builds': FieldInfo(annotation=list[Build], required=True), 'cursor_string': FieldInfo(annotation=Union[str, NoneType], required=False), 'next': FieldInfo(annotation=Union[partial[Coroutine[object, object, CursorModel]], NoneType], required=False, exclude=True), 'search': FieldInfo(annotation=ChangelogSearch, required=True), 'streams': FieldInfo(annotation=list[UpdateStream], required=True)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- cursor_string: str | None#
- next: partial[Coroutine[object, object, CursorModel]] | None#
Partial function to get the next page of results.
- class aiosu.models.changelog.ChangelogSearch(*, limit: int, fro: str | None = None, to: str | None = None, max_id: int | None = None, stream: str | None = None)#
- limit: int#
- fro: str | None#
- to: str | None#
- max_id: int | None#
- stream: str | None#
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'fro': FieldInfo(annotation=Union[str, NoneType], required=False, alias='from', alias_priority=2), 'limit': FieldInfo(annotation=int, required=True), 'max_id': FieldInfo(annotation=Union[int, NoneType], required=False), 'stream': FieldInfo(annotation=Union[str, NoneType], required=False), 'to': FieldInfo(annotation=Union[str, NoneType], required=False)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class aiosu.models.changelog.GithubUser(*, display_name: str, github_url: str | None = None, id: int | None = None, osu_username: str | None = None, user_id: int | None = None, user_url: str | None = None)#
- display_name: str#
- github_url: str | None#
- id: int | None#
- osu_username: str | None#
- user_id: int | None#
- user_url: str | None#
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'display_name': FieldInfo(annotation=str, required=True), 'github_url': FieldInfo(annotation=Union[str, NoneType], required=False), 'id': FieldInfo(annotation=Union[int, NoneType], required=False), 'osu_username': FieldInfo(annotation=Union[str, NoneType], required=False), 'user_id': FieldInfo(annotation=Union[int, NoneType], required=False), 'user_url': FieldInfo(annotation=Union[str, NoneType], required=False)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class aiosu.models.changelog.UpdateStream#
- id: int#
- is_featured: bool#
- name: str#
- display_name: str | None#
- user_count: int | None#
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'display_name': FieldInfo(annotation=Union[str, NoneType], required=False), 'id': FieldInfo(annotation=int, required=True), 'is_featured': FieldInfo(annotation=bool, required=True), 'latest_build': FieldInfo(annotation=Union[Build, NoneType], required=False), 'name': FieldInfo(annotation=str, required=True), 'user_count': FieldInfo(annotation=Union[int, NoneType], required=False)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class aiosu.models.changelog.Version#
-
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'next': FieldInfo(annotation=Union[Build, NoneType], required=False), 'previous': FieldInfo(annotation=Union[Build, NoneType], required=False)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- aiosu.models.changelog.ChangelogMessageFormat#
alias of
Literal
[‘markdown’, ‘html’]
- aiosu.models.changelog.ChangelogEntryType#
alias of
Literal
[‘add’, ‘fix’]
Spotlights#
This module contains models for spotlight objects.
- class aiosu.models.spotlight.Spotlight(*, id: int, name: str, mode_specific: bool, type: Literal['bestof', 'monthly', 'spotlight', 'theme', 'special'], start_date: datetime, end_date: datetime, participant_count: int | None = None)#
- id: int#
- name: str#
- mode_specific: bool#
- type: SpotlightType#
- start_date: datetime#
- end_date: datetime#
- participant_count: int | None#
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'end_date': FieldInfo(annotation=datetime, required=True), 'id': FieldInfo(annotation=int, required=True), 'mode_specific': FieldInfo(annotation=bool, required=True), 'name': FieldInfo(annotation=str, required=True), 'participant_count': FieldInfo(annotation=Union[int, NoneType], required=False), 'start_date': FieldInfo(annotation=datetime, required=True), 'type': FieldInfo(annotation=Literal['bestof', 'monthly', 'spotlight', 'theme', 'special'], required=True)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- aiosu.models.spotlight.SpotlightType#
alias of
Literal
[‘bestof’, ‘monthly’, ‘spotlight’, ‘theme’, ‘special’]
News#
This module contains models for news post objects.