API Reference

This module implements a variety of classes used to hold the data parsed from Tibia.com.

Client

class tibiapy.Client(loop=None, session=None, *, proxy_url=None)[source]

An asynchronous client that fetches information from Tibia.com.

The client uses a aiohttp.ClientSession to request the information. A single session is shared across all operations.

If desired, a custom ClientSession instance may be passed, instead of creating a new one.

Added in version 2.0.0.

Changed in version 3.0.0: All methods return a TibiaResponse instance, containing additional information such as cache age.

loop

The event loop to use. The default one will be used if not defined.

Type:

asyncio.AbstractEventLoop

session

The client session that will be used for the requests. One will be created by default.

Type:

aiohttp.ClientSession

proxy_url

The URL of the SOCKS proxy to use for requests. Note that if a session is passed, the SOCKS proxy won’t be used and must be applied when creating the session.

Type:

str

async fetch_boosted_creature(*, test=False)[source]

Fetch today’s boosted creature.

Added in version 2.1.0.

Changed in version 4.0.0: The return type of the data returned was changed to CreatureEntry, previous type was removed.

Parameters:

test (bool) – Whether to request the test website instead.

Returns:

The boosted creature of the day.

Return type:

TibiaResponse[CreatureEntry]

Raises:
  • Forbidden – If a 403 Forbidden error was returned. This usually means that Tibia.com is rate-limiting the client because of too many requests.

  • NetworkError – If there’s any connection errors during the request.

async fetch_boosted_creature_and_boss(*, test=False)[source]

Fetch today’s boosted creature and boss.

Added in version 5.3.0.

Parameters:

test (bool) – Whether to request the test website instead.

Returns:

The boosted creature and boss of the day.

Return type:

TibiaResponse[BoostedCreatures]

Raises:
  • Forbidden – If a 403 Forbidden error was returned. This usually means that Tibia.com is rate-limiting the client because of too many requests.

  • NetworkError – If there’s any connection errors during the request.

async fetch_boosted_boss(*, test=False)[source]

Fetch today’s boosted boss.

Added in version 5.3.0.

Parameters:

test (bool) – Whether to request the test website instead.

Returns:

The boosted boss of the day.

Return type:

TibiaResponse[BossEntry]

Raises:
  • Forbidden – If a 403 Forbidden error was returned. This usually means that Tibia.com is rate-limiting the client because of too many requests.

  • NetworkError – If there’s any connection errors during the request.

async fetch_news_archive(from_date, to_date=None, categories=None, types=None, *, test=False)[source]

Fetch news from the archive meeting the search criteria.

Changed in version 5.0.0: The data attribute of the response contains an instance of NewsArchive instead.

Parameters:
  • from_date (date) – The beginning date to search dates in.

  • to_date (date) – The end date to search dates in.

  • categories (set[NewsCategory]) – The allowed categories to show. If left blank, all categories will be searched.

  • types (set[NewsType]) – The allowed news types to show. if unused, all types will be searched.

  • test (bool) – Whether to request the test website instead.

Returns:

The news meeting the search criteria.

Return type:

TibiaResponse[NewsArchive]

Raises:
  • ValueError – If begin_date is more recent than to_date.

  • Forbidden – If a 403 Forbidden error was returned. This usually means that Tibia.com is rate-limiting the client because of too many requests.

  • NetworkError – If there’s any connection errors during the request.

async fetch_news_archive_by_days(days=30, categories=None, types=None, *, test=False)[source]

Fetch all the published news in the last specified days.

This is a shortcut for fetch_news_archive(), to handle dates more easily.

Changed in version 5.0.0: The data attribute of the response contains an instance of NewsArchive instead.

Parameters:
  • days (int) – The number of days to search, by default 30.

  • categories (set[NewsCategory]) – The allowed categories to show. If left blank, all categories will be searched.

  • types (set[NewsType]) – The allowed news types to show. if unused, all types will be searched.

  • test (bool) – Whether to request the test website instead.

Returns:

The news posted in the last specified days.

Return type:

TibiaResponse[NewsArchive]

Raises:
  • ValueError – If days is lesser than zero.

  • Forbidden – If a 403 Forbidden error was returned. This usually means that Tibia.com is rate-limiting the client because of too many requests.

  • NetworkError – If there’s any connection errors during the request.

async fetch_news(news_id, *, test=False)[source]

Fetch a news entry by its id from Tibia.com.

Parameters:
  • news_id (int) – The ID of the news entry.

  • test (bool) – Whether to request the test website instead.

Returns:

The news entry if found, None otherwise.

Return type:

TibiaResponse[News]

Raises:
  • Forbidden – If a 403 Forbidden error was returned. This usually means that Tibia.com is rate-limiting the client because of too many requests.

  • NetworkError – If there’s any connection errors during the request.

async fetch_event_schedule(month=None, year=None, *, test=False)[source]

Fetch the event calendar. By default, it gets the events for the current month.

Added in version 3.0.0.

Parameters:
  • month (int) – The month of the events to display.

  • year (int) – The year of the events to display.

  • test (bool) – Whether to request the test website instead.

Returns:

The event calendar.

Return type:

TibiaResponse[EventSchedule]

Raises:
  • Forbidden – If a 403 Forbidden error was returned. This usually means that Tibia.com is rate-limiting the client because of too many requests.

  • NetworkError – If there’s any connection errors during the request.

  • ValueError – If only one of year or month are defined.

async fetch_creatures(*, test=False)[source]

Fetch the creatures from the library section.

Added in version 4.0.0.

Parameters:

test (bool) – Whether to request the test website instead.

Returns:

The creature’s section in Tibia.com

Return type:

TibiaResponse[CreaturesSection]

Raises:
  • Forbidden – If a 403 Forbidden error was returned. This usually means that Tibia.com is rate-limiting the client because of too many requests.

  • NetworkError – If there’s any connection errors during the request.

async fetch_creature(identifier, *, test=False)[source]

Fetch a creature’s information from the Tibia.com library.

Added in version 4.0.0.

Parameters:
  • identifier (str) – The internal name of the race.

  • test (bool) – Whether to request the test website instead.

Returns:

The creature’s section in Tibia.com

Return type:

TibiaResponse[Creature]

Raises:
  • Forbidden – If a 403 Forbidden error was returned. This usually means that Tibia.com is rate-limiting the client because of too many requests.

  • NetworkError – If there’s any connection errors during the request.

async fetch_boostable_bosses(*, test=False)[source]

Fetch the boostable bosses from the library section.

Added in version 4.0.0.

Parameters:

test (bool) – Whether to request the test website instead.

Returns:

The creature’s section in Tibia.com

Return type:

TibiaResponse of ,BoostableBosses

Raises:
  • Forbidden – If a 403 Forbidden error was returned. This usually means that Tibia.com is rate-limiting the client because of too many requests.

  • NetworkError – If there’s any connection errors during the request.

async fetch_spells(*, vocation=None, group=None, spell_type=None, is_premium=None, sort=None, test=False)[source]

Fetch the spells section.

Parameters:
Returns:

The spells section with the results.

Return type:

TibiaResponse[SpellsSection]

Raises:
  • Forbidden – If a 403 Forbidden error was returned. This usually means that Tibia.com is rate-limiting the client because of too many requests.

  • NetworkError – If there’s any connection errors during the request.

async fetch_spell(identifier, *, test=False)[source]

Fetch a spell by its identifier.

Parameters:
  • identifier (str) – The spell’s identifier. This is usually the name of the spell in lowercase and with no spaces.

  • test (bool) – Whether to request the test website instead.

Returns:

The spell if found, None otherwise.

Return type:

TibiaResponse[Optional[Spell]]

Raises:
  • Forbidden – If a 403 Forbidden error was returned. This usually means that Tibia.com is rate-limiting the client because of too many requests.

  • NetworkError – If there’s any connection errors during the request.

async fetch_character(name, *, test=False)[source]

Fetch a character by its name from Tibia.com.

Parameters:
  • name (str) – The name of the character.

  • test (bool) – Whether to request the test website instead.

Returns:

A response containing the character, if found.

Return type:

TibiaResponse[Optional[Character]]

Raises:
  • Forbidden – If a 403 Forbidden error was returned. This usually means that Tibia.com is rate-limiting the client because of too many requests.

  • NetworkError – If there’s any connection errors during the request.

async fetch_world_overview(*, test=False)[source]

Fetch the world overview information from Tibia.com.

Parameters:

test (bool) – Whether to request the test website instead.

Returns:

A response containing the world overview information.

Return type:

TibiaResponse[WorldOverview]

Raises:
  • Forbidden – If a 403 Forbidden error was returned. This usually means that Tibia.com is rate-limiting the client because of too many requests.

  • NetworkError – If there’s any connection errors during the request.

async fetch_world(name, *, test=False)[source]

Fetch a world from Tibia.com.

Parameters:
  • name (str) – The name of the world.

  • test (bool) – Whether to request the test website instead.

Returns:

A response containing the world’s information if found, None otherwise.

Return type:

TibiaResponse[Optional[World]]

Raises:
  • Forbidden – If a 403 Forbidden error was returned. This usually means that Tibia.com is rate-limiting the client because of too many requests.

  • NetworkError – If there’s any connection errors during the request.

async fetch_highscores_page(world=None, category=HighscoresCategory.EXPERIENCE, vocation=HighscoresProfession.ALL, page=1, battleye_type=None, pvp_types=None, *, test=False)[source]

Fetch a single highscores page from Tibia.com.

Notes

It is not possible to use BattlEye or PvPType filters when requesting a specific world.

Parameters:
  • world (str) – The world to search the highscores in.

  • category (HighscoresCategory) – The highscores category to search, by default Experience.

  • vocation (HighscoresProfession) – The vocation filter to use. No filter used by default.

  • page (int) – The page to fetch, by default the first page is fetched.

  • battleye_type (Optional[HighscoresBattlEyeType]) – The type of BattlEye protection to display results from.

  • pvp_types (set[PvpTypeFilter]) – The list of PvP types to filter the results for.

  • test (bool) – Whether to request the test website instead.

Returns:

The highscores information or None if not found.

Return type:

TibiaResponse[Optional[Highscores]]

Raises:
  • Forbidden – If a 403 Forbidden error was returned. This usually means that Tibia.com is rate-limiting the client because of too many requests.

  • NetworkError – If there’s any connection errors during the request.

  • ValueError – If an invalid filter combination is passed or an invalid page is provided.

async fetch_leaderboard(world, rotation=None, page=1, *, test=False)[source]

Fetch the leaderboards for a specific world and rotation.

Added in version 5.0.0.

Parameters:
  • world (str) – The name of the world.

  • rotation (int) – The ID of the rotation. By default, it will get the current rotation.

  • page (int) – The page to get.

  • test (bool) – Whether to request the test website instead.

Returns:

The leaderboards of the world if found.

Return type:

TibiaResponse[Optional[Leaderboard]]

Raises:
  • Forbidden – If a 403 Forbidden error was returned. This usually means that Tibia.com is rate-limiting the client because of too many requests.

  • NetworkError – If there’s any connection errors during the request.

async fetch_kill_statistics(world, *, test=False)[source]

Fetch the kill statistics of a world from Tibia.com.

Parameters:
  • world (str) – The name of the world.

  • test (bool) – Whether to request the test website instead.

Returns:

The kill statistics of the world if found.

Return type:

TibiaResponse[Optional[KillStatistics]]

Raises:
  • Forbidden – If a 403 Forbidden error was returned. This usually means that Tibia.com is rate-limiting the client because of too many requests.

  • NetworkError – If there’s any connection errors during the request.

async fetch_houses_section(world, town, house_type=HouseType.HOUSE, status=None, order=None, *, test=False)[source]

Fetch the house list of a world and type.

Changed in version 5.0.0: The data attribute of the response contains an instance of HousesSection instead.

Parameters:
  • world (str) – The name of the world.

  • town (str) – The name of the town.

  • house_type (HouseType) – The type of building. House by default.

  • status (Optional[HouseStatus]) – The house status to filter results. By default, no filters will be applied.

  • order (Optional[HouseOrder]) – The ordering to use for the results. By default, they are sorted by name.

  • test (bool) – Whether to request the test website instead.

Returns:

A response containing the lists of houses meeting the criteria if found.

Return type:

TibiaResponse[HousesSection]

Raises:
  • Forbidden – If a 403 Forbidden error was returned. This usually means that Tibia.com is rate-limiting the client because of too many requests.

  • NetworkError – If there’s any connection errors during the request.

async fetch_house(house_id, world, *, test=False)[source]

Fetch a house in a specific world by its id.

Parameters:
  • house_id (int) – The house’s internal id.

  • world (str) – The name of the world to look for.

  • test (bool) – Whether to request the test website instead.

Returns:

The house if found, None otherwise.

Return type:

TibiaResponse[Optional[House]]

Raises:
  • Forbidden – If a 403 Forbidden error was returned. This usually means that Tibia.com is rate-limiting the client because of too many requests.

  • NetworkError – If there’s any connection errors during the request.

async fetch_world_guilds(world, *, test=False)[source]

Fetch the list of guilds in a world from Tibia.com.

If a world that does not exist is passed, the world attribute of the result will be None. If the world attribute is set, but the list is empty, it just means the world has no guilds.

Changed in version 5.0.0: The data attribute of the response contains an instance of GuildsSection instead.

Parameters:
  • world (str) – The name of the world.

  • test (bool) – Whether to request the test website instead.

Returns:

A response containing the guilds section for the specified world.

Return type:

TibiaResponse[GuildsSection]

Raises:
  • Forbidden – If a 403 Forbidden error was returned. This usually means that Tibia.com is rate-limiting the client because of too many requests.

  • NetworkError – If there’s any connection errors during the request.

async fetch_guild(name, *, test=False)[source]

Fetch a guild by its name from Tibia.com.

Parameters:
  • name (str) – The name of the guild. The case must match exactly.

  • test (bool) – Whether to request the test website instead.

Returns:

A response containing the found guild, if any.

Return type:

TibiaResponse[Optional[Guild]]

Raises:
  • Forbidden – If a 403 Forbidden error was returned. This usually means that Tibia.com is rate-limiting the client because of too many requests.

  • NetworkError – If there’s any connection errors during the request.

async fetch_guild_wars(name, *, test=False)[source]

Fetch a guild’s wars by its name from Tibia.com.

Added in version 3.0.0.

Parameters:
  • name (str) – The name of the guild. The case must match exactly.

  • test (bool) – Whether to request the test website instead.

Returns:

A response containing the found guild’s wars.

If the guild doesn’t exist, the displayed data will show a guild with no wars instead of indicating the guild doesn’t exist.

Return type:

TibiaResponse[Optional[GuildWars]]

Raises:
  • Forbidden – If a 403 Forbidden error was returned. This usually means that Tibia.com is rate-limiting the client because of too many requests.

  • NetworkError – If there’s any connection errors during the request.

async fetch_fansites_section(*, test=False)[source]

Fetch the fansites section from Tibia.com.

Added in version 6.2.0.

Parameters:

test (bool) – Whether to request the test website instead.

Returns:

A response containing the fansites section.

Return type:

TibiaResponse[FansitesSection]

Raises:
  • Forbidden – If a 403 Forbidden error was returned. This usually means that Tibia.com is rate-limiting the client because of too many requests.

  • NetworkError – If there’s any connection errors during the request.

async fetch_forum_section(section_id, *, test=False)[source]

Fetch a forum’s section by its ID.

Parameters:
  • section_id (int) – The ID of the section.

  • test (bool) – Whether to request the test website instead.

Returns:

The forum section with the provided ID.

Return type:

TibiaResponse[Optional[ForumSection]]

Raises:
  • Forbidden – If a 403 Forbidden error was returned. This usually means that Tibia.com is rate-limiting the client because of too many requests.

  • NetworkError – If there’s any connection errors during the request.

async fetch_forum_world_boards(*, test=False)[source]

Fetch the forum’s world boards.

Added in version 3.0.0.

Parameters:

test (bool) – Whether to request the test website instead.

Returns:

The forum boards in the world section.

Return type:

TibiaResponse[Optional[ForumSection]]

Raises:
  • Forbidden – If a 403 Forbidden error was returned. This usually means that Tibia.com is rate-limiting the client because of too many requests.

  • NetworkError – If there’s any connection errors during the request.

async fetch_forum_trade_boards(*, test=False)[source]

Fetch the forum’s trade boards.

Added in version 3.0.0.

Parameters:

test (bool) – Whether to request the test website instead.

Returns:

The forum boards in the trade section.

Return type:

TibiaResponse[Optional[ForumSection]]

Raises:
  • Forbidden – If a 403 Forbidden error was returned. This usually means that Tibia.com is rate-limiting the client because of too many requests.

  • NetworkError – If there’s any connection errors during the request.

async fetch_forum_community_boards(*, test=False)[source]

Fetch the forum’s community boards.

Added in version 3.0.0.

Parameters:

test (bool) – Whether to request the test website instead.

Returns:

The forum boards in the community section.

Return type:

TibiaResponse[Optional[ForumSection]]

Raises:
  • Forbidden – If a 403 Forbidden error was returned. This usually means that Tibia.com is rate-limiting the client because of too many requests.

  • NetworkError – If there’s any connection errors during the request.

async fetch_forum_support_boards(*, test=False)[source]

Fetch the forum’s community boards.

Added in version 3.0.0.

Parameters:

test (bool) – Whether to request the test website instead.

Returns:

The forum boards in the community section.

Return type:

TibiaResponse[Optional[ForumSection]]

Raises:
  • Forbidden – If a 403 Forbidden error was returned. This usually means that Tibia.com is rate-limiting the client because of too many requests.

  • NetworkError – If there’s any connection errors during the request.

async fetch_forum_board(board_id, page=1, age=None, *, test=False)[source]

Fetch a forum board with a given id.

Added in version 3.0.0.

Parameters:
  • board_id (int) – The id of the board.

  • page (int) – The page number to show.

  • age (int) –

    The maximum age in days of the threads to display.

    To show threads of all ages, use -1.

  • test (bool) – Whether to request the test website instead.

Returns:

A response containing the forum, if found.

Return type:

TibiaResponse[ForumBoard]

Raises:
  • Forbidden – If a 403 Forbidden error was returned. This usually means that Tibia.com is rate-limiting the client because of too many requests.

  • NetworkError – If there’s any connection errors during the request.

async fetch_forum_thread(thread_id, page=1, *, test=False)[source]

Fetch a forum thread with a given id.

Added in version 3.0.0.

Parameters:
  • thread_id (int) – The id of the thread.

  • page (int) – The desired page to display, by default 1.

  • test (bool) – Whether to request the test website instead.

Returns:

A response containing the forum, if found.

Return type:

TibiaResponse[Optional[ForumThread]]

Raises:
  • Forbidden – If a 403 Forbidden error was returned. This usually means that Tibia.com is rate-limiting the client because of too many requests.

  • NetworkError – If there’s any connection errors during the request.

async fetch_forum_post(post_id, *, test=False)[source]

Fetch a forum post with a given id.

The thread that contains the post will be returned, containing the desired post in ForumThread.anchored_post.

The displayed page will be the page where the post is located.

Added in version 3.1.0.

Parameters:
  • post_id (int) – The id of the post.

  • test (bool) – Whether to request the test website instead.

Returns:

A response containing the forum, if found.

Return type:

TibiaResponse[Optional[ForumThread]]

Raises:
  • Forbidden – If a 403 Forbidden error was returned. This usually means that Tibia.com is rate-limiting the client because of too many requests.

  • NetworkError – If there’s any connection errors during the request.

async fetch_forum_announcement(announcement_id, *, test=False)[source]

Fetch a forum announcement.

Added in version 3.0.0.

Parameters:
  • announcement_id (int) – The id of the desired announcement.

  • test (bool) – Whether to request the test website instead.

Returns:

The forum announcement, if found.

Return type:

TibiaResponse[Optional[ForumAnnouncement]]

Raises:
  • Forbidden – If a 403 Forbidden error was returned. This usually means that Tibia.com is rate-limiting the client because of too many requests.

  • NetworkError – If there’s any connection errors during the request.

async fetch_cm_post_archive(start_date, end_date, page=1, *, test=False)[source]

Fetch the CM post archive.

Added in version 3.0.0.

Parameters:
  • start_date (datetime) – The start date to display.

  • end_date (datetime) – The end date to display.

  • page (int) – The desired page to display.

  • test (bool) – Whether to request the test website instead.

Returns:

The CM Post Archive.

Return type:

TibiaResponse[CMPostArchive]

Raises:
  • Forbidden – If a 403 Forbidden error was returned. This usually means that Tibia.com is rate-limiting the client because of too many requests.

  • NetworkError – If there’s any connection errors during the request.

  • ValueError – If the start_date is more recent than the end date or page number is not 1 or greater.

async fetch_current_auctions(page=1, filters=None, *, test=False)[source]

Fetch the current auctions in the bazaar.

Added in version 3.3.0.

Parameters:
  • page (int) – The desired page to display.

  • filters (Optional[AuctionFilters]) – The filtering criteria to use.

  • test (bool) – Whether to fetch from the test website or not.

Returns:

The current auctions.

Return type:

TibiaResponse[CharacterBazaar]

Raises:
  • Forbidden – If a 403 Forbidden error was returned. This usually means that Tibia.com is rate-limiting the client because of too many requests.

  • NetworkError – If there’s any connection errors during the request.

  • ValueError – If the page number is not 1 or greater.

async fetch_auction_history(page=1, filters=None, *, test=False)[source]

Fetch the auction history of the bazaar.

Added in version 3.3.0.

Parameters:
  • page (int) – The page to display.

  • filters (Optional[AuctionFilters]) – The filtering criteria to use.

  • test (bool) – Whether to request the test website instead.

Returns:

The character bazaar containing the auction history.

Return type:

TibiaResponse[CharacterBazaar]

Raises:
  • Forbidden – If a 403 Forbidden error was returned. This usually means that Tibia.com is rate-limiting the client because of too many requests.

  • NetworkError – If there’s any connection errors during the request.

  • ValueError – If the page number is not 1 or greater.

async fetch_auction(auction_id, *, fetch_items=False, fetch_mounts=False, fetch_outfits=False, fetch_familiars=False, skip_details=False, test=False)[source]

Fetch an auction by its ID.

Added in version 3.3.0.

Parameters:
  • auction_id (int) – The ID of the auction.

  • fetch_items (bool) – Whether to fetch all the character’s items. By default, only the first page is fetched.

  • fetch_mounts (bool) – Whether to fetch all the character’s mounts. By default, only the first page is fetched.

  • fetch_outfits (bool) – Whether to fetch all the character’s outfits. By default, only the first page is fetched.

  • fetch_familiars (bool) – Whether to fetch all the character’s outfits. By default, only the first page is fetched.

  • skip_details (bool) –

    Whether to skip parsing the entire auction and only parse the information shown in lists. False by default.

    This allows fetching basic information like name, level, vocation, world, bid and status, shaving off some parsing time.

  • test (bool) – Whether to request the test website instead.

Returns:

The auction matching the ID if found.

Return type:

TibiaResponse[Optional[Auction]]

Raises:
  • Forbidden – If a 403 Forbidden error was returned. This usually means that Tibia.com is rate-limiting the client because of too many requests.

  • NetworkError – If there’s any connection errors during the request.

  • ValueError – If the auction id is not 1 or greater.

pydantic model tibiapy.models.TibiaResponse[source]

Represents a response from Tibia.com.

Show JSON schema
{
   "title": "TibiaResponse",
   "description": "Represents a response from Tibia.com.",
   "type": "object",
   "properties": {
      "timestamp": {
         "description": "The date and time when the page was fetched, in UTC.",
         "format": "date-time",
         "title": "Timestamp",
         "type": "string"
      },
      "cached": {
         "description": "Whether the response is cached or it is a fresh response.",
         "title": "Cached",
         "type": "boolean"
      },
      "age": {
         "description": "The age of the cache in seconds.",
         "title": "Age",
         "type": "integer"
      },
      "fetchingTime": {
         "description": "The time in seconds it took for Tibia.com to respond.",
         "title": "Fetchingtime",
         "type": "number"
      },
      "parsingTime": {
         "description": "The time in seconds it took for the response to be parsed into data.",
         "title": "Parsingtime",
         "type": "number"
      },
      "data": {
         "description": "The data contained in the response.",
         "title": "Data"
      }
   },
   "required": [
      "timestamp",
      "cached",
      "age",
      "fetchingTime",
      "parsingTime",
      "data"
   ]
}

Config:
  • populate_by_name: bool = True

  • alias_generator: function = <function to_camel at 0x73beb93f7e20>

  • use_attribute_docstrings: bool = True

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
  • age (int)

  • cached (bool)

  • data (tibiapy.models.tibia_response.T)

  • fetching_time (float)

  • parsing_time (float)

  • timestamp (datetime.datetime)

field age: int [Required]

The age of the cache in seconds.

field cached: bool [Required]

Whether the response is cached or it is a fresh response.

field data: TypeVar(T) [Required]

The data contained in the response.

field fetching_time: float [Required] (alias 'fetchingTime')

The time in seconds it took for Tibia.com to respond.

field parsing_time: float [Required] (alias 'parsingTime')

The time in seconds it took for the response to be parsed into data.

field timestamp: datetime [Required]

The date and time when the page was fetched, in UTC.

classmethod from_raw(raw_response, data, parsing_time=None)[source]

Build an instance from a raw response.

Return type:

Self

property seconds_left: int

The time left in seconds for this response’s cache to expire.

Type:

int

property time_left: timedelta

The time left for the cache of this response to expire.

Type:

datetime.timedelta

Enumerations

Enumerations are provided for various values in order to avoid depending on strings.

Many of these enumerations correspond to available options in forms in Tibia.com

class tibiapy.enums.AuctionBattlEyeFilter(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

The possible BattlEye filters that can be used for auctions.

INITIALLY_PROTECTED = 1

Worlds protected from the beginning, represented by a green symbol.

PROTECTED = 2

Worlds protected after the world was created, represented by a yellow symbol.

NOT_PROTECTED = 3

Worlds without any BattlEye protection.

YELLOW = 2

Alias for protected worlds.

Added in version 4.0.0.

GREEN = 1

Alias for initially protected worlds.

Added in version 4.0.0.

class tibiapy.enums.AuctionOrderBy(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

The possible values to order the auctions by.

BID = 100

The currently displayed bid for the auction.

END_DATE = 101

The end date of the auction.

LEVEL = 102

The experience level of the auctioned character.

START_DATE = 103

The start date of the auction.

AXE_FIGHTING = 10
CLUB_FIGHTING = 9
DISTANCE_FIGHTING = 7
FISHING = 13
FIST_FIGHTING = 11
MAGIC_LEVEL = 1
SHIELDING = 6
SWORD_FIGHTING = 8
class tibiapy.enums.AuctionOrderDirection(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

The possible ordering directions for auctions.

The field or value used for the ordering is defined by AuctionOrderBy.

HIGHEST_LATEST = 0

Order by the highest or latest value.

LOWEST_EARLIEST = 1

Order by the lowest or earliest value.

class tibiapy.enums.AuctionSearchType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

The possible search types.

ITEM_DEFAULT = 0

Searches everything that includes the words on the search string.

ITEM_WILDCARD = 1

Searches everything that includes the search string

CHARACTER_NAME = 2

Searches a character’s name.

class tibiapy.enums.AuctionSkillFilter(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

The different skill filters for auctions.

AXE_FIGHTING = 10
CLUB_FIGHTING = 9
DISTANCE_FIGHTING = 7
FISHING = 13
FIST_FIGHTING = 11
MAGIC_LEVEL = 1
SHIELDING = 6
SWORD_FIGHTING = 8
class tibiapy.enums.AuctionStatus(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

The possible values an auction might have.

IN_PROGRESS = 'in progress'

The auction is currently active.

Notes

This status doesn’t exist in Tibia.com explicitly. It is given to all ongoing auctions.

CURRENTLY_PROCESSED = 'currently processed'

The auction ended with a winner, but payment hasn’t been received yet.

PENDING_TRANSFER = 'will be transferred at the next server save'

The auction was finished and was paid, but the character hasn’t been transferred to the new owner yet.

CANCELLED = 'cancelled'

The auction was cancelled as no payment was received in time.

FINISHED = 'finished'

The auction either finished with no bids or the character was transferred to the new owner already.

class tibiapy.enums.AuctionVocationFilter(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

The possible vocation filters for auctions.

NONE = 1
DRUID = 2
KNIGHT = 3
PALADIN = 4
SORCERER = 5
class tibiapy.enums.AvailableForumSection(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

The available forum sections and their URL query parameter values.

WORLD_BOARDS = 'worldboards'
TRADE_BOARDS = 'tradeboards'
COMMUNITY_BOARDS = 'communityboards'
SUPPORT_BOARDS = 'supportboards'
GUILD_BOARDS = 'guildboards'
class tibiapy.enums.BattlEyeType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

The possible BattlEye statuses a world can have.

Added in version 4.0.0.

UNPROTECTED = 0

Worlds without any BattlEye protection.

PROTECTED = 1

Worlds protected after the world was created, represented by a yellow symbol.

INITIALLY_PROTECTED = 2

Worlds protected from the beginning, represented by a green symbol.

YELLOW = 1

Alias for protected worlds.

GREEN = 2

Alias for initially protected worlds.

class tibiapy.enums.BazaarType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

The possible bazaar types.

CURRENT = 'Current Auctions'
HISTORY = 'Auction History'
property subtopic: str

The subtopic argument for this Bazaar type.

class tibiapy.enums.BidType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

The possible bid types for an auction.

MINIMUM = 'Minimum Bid'

The minimum bid set by the auction author, meaning the auction hasn’t received any bids or it finished without bids.

CURRENT = 'Current Bid'

The current maximum bid, meaning the auction has received at least one bid.

WINNING = 'Winning Bid'

The bid that won the auction.

class tibiapy.enums.HighscoresBattlEyeType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

The possible BattlEye filters that can be used for highscores.

ANY_WORLD = -1

Show all worlds.

INITIALLY_PROTECTED = 2

Worlds protected from the beginning, represented by a green symbol.

PROTECTED = 1

Worlds protected after the world was created, represented by a yellow symbol.

UNPROTECTED = 0

Worlds without any BattlEye protection.

YELLOW = 1

Alias for protected worlds.

Added in version 4.0.0.

GREEN = 2

Alias for initially protected worlds.

Added in version 4.0.0.

class tibiapy.enums.HighscoresCategory(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

The different highscores categories.

ACHIEVEMENTS = 1
AXE_FIGHTING = 2
BOSS_POINTS = 15
CHARM_POINTS = 3
CLUB_FIGHTING = 4
DISTANCE_FIGHTING = 5
DROME_SCORE = 14
EXPERIENCE = 6
FISHING = 7
FIST_FIGHTING = 8
GOSHNARS_TAINT = 9
LOYALTY_POINTS = 10
MAGIC_LEVEL = 11
SHIELDING = 12
SWORD_FIGHTING = 13
class tibiapy.enums.HighscoresProfession(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

The vocation filters available for Highscores.

The numeric values are what the highscores form accepts.

ALL = 0
NONE = 1
KNIGHTS = 2
PALADINS = 3
SORCERERS = 4
DRUIDS = 5
classmethod from_name(name, all_fallback=True)[source]

Get a vocation filter from a vocation’s name.

Parameters:
  • name (str) – The name of the vocation.

  • all_fallback (bool) – Whether to return ALL if no match is found. Otherwise, None will be returned.

Returns:

The matching vocation filter.

Return type:

HighscoresProfession, optional

class tibiapy.enums.HouseOrder(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

The possible ordering methods for house lists in Tibia.com.

NAME = 'name'
SIZE = 'size'
RENT = 'rent'
BID = 'bid'
AUCTION_END = 'end'
class tibiapy.enums.HouseStatus(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Renting statuses of a house.

RENTED = 'rented'
AUCTIONED = 'auctioned'
class tibiapy.enums.HouseType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

The types of house available.

HOUSE = 'house'
GUILDHALL = 'guildhall'
property plural: str

The plural for the house type.

Type:

str

class tibiapy.enums.NewsCategory(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

The different news categories.

CIPSOFT = 'cipsoft'
COMMUNITY = 'community'
DEVELOPMENT = 'development'
SUPPORT = 'support'
TECHNICAL_ISSUES = 'technical'
property filter_name: str

The name of the filter parameter for this value.

property big_icon_url: str

The URL to the big icon representing this category.

property small_icon_url: str

The URL to the small icon representing this category.

class tibiapy.enums.NewsType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

The different types of new entries.

NEWS_TICKER = 'News Ticker'
FEATURED_ARTICLE = 'Featured Article'
NEWS = 'News'
property filter_name: str

The filter parameter name for this value.

property filter_value: str

The filter parameter value for this value.

class tibiapy.enums.PvpType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

The possible PvP types a World can have.

OPEN_PVP = 'Open PvP'
OPTIONAL_PVP = 'Optional PvP'
RETRO_OPEN_PVP = 'Retro Open PvP'
RETRO_HARDCORE_PVP = 'Retro Hardcore PvP'
HARDCORE_PVP = 'Hardcore PvP'
class tibiapy.enums.PvpTypeFilter(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

The possible PVP filters that can be used for auctions.

OPEN_PVP = 0
OPTIONAL_PVP = 1
HARDCORE_PVP = 2
RETRO_OPEN_PVP = 3
RETRO_HARDCORE_PVP = 4
class tibiapy.enums.Sex(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Possible character sexes.

MALE = 'male'
FEMALE = 'female'
class tibiapy.enums.SpellGroup(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

The possible cooldown groups.

Note that secondary groups are not enumerated.

ATTACK = 'Attack'
HEALING = 'Healing'
SUPPORT = 'Support'
class tibiapy.enums.SpellSorting(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

The different sorting options for the spells section.

NAME = 'name'
GROUP = 'group'
TYPE = 'type'
EXP_LEVEL = 'level'
MANA = 'mana'
PRICE = 'price'
PREMIUM = 'premium'
class tibiapy.enums.SpellType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

The possible spell types.

INSTANT = 'Instant'
RUNE = 'Rune'
class tibiapy.enums.SpellVocationFilter(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

The possible vocation types to filter out spells.

DRUID = 'Druid'
KNIGHT = 'Knight'
PALADIN = 'Paladin'
SORCERER = 'Sorcerer'
class tibiapy.enums.ThreadStatus(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

The possible status a thread can have.

Threads can have a combination of multiple status. The numeric values are arbitrary.

NONE = 0
HOT = 1

Thread has more than 16 replies.

NEW = 2

Thread has new posts since last visit.

CLOSED = 4

Thread is closed.

STICKY = 8

Thread is stickied.

get_icon_name()[source]

Generate an icon name, following the same ordering used in Tibia.com.

Returns:

The name of the icon used in Tibia.com

Return type:

str

classmethod from_icon(icon)[source]

Get the flag combination, based from the icon’s name present in the thread status.

Parameters:

icon (str) – The icon’s filename.

Returns:

The combination of thread status founds.

Return type:

ThreadStatus

class tibiapy.enums.TransferType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

The possible special transfer restrictions a world may have.

REGULAR = 'regular'

No special transfer restrictions

BLOCKED = 'blocked'

Can’t transfer to this world, but can transfer out of this world.

LOCKED = 'locked'

Can transfer to this world, but can’t transfer out of this world.

class tibiapy.enums.Vocation(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

The possible vocation types.

NONE = 'None'
DRUID = 'Druid'
KNIGHT = 'Knight'
PALADIN = 'Paladin'
SORCERER = 'Sorcerer'
ELDER_DRUID = 'Elder Druid'
ELITE_KNIGHT = 'Elite Knight'
ROYAL_PALADIN = 'Royal Paladin'
MASTER_SORCERER = 'Master Sorcerer'
property base: Self

The base vocation of this vocation if promoted. If not promoted, the same value is returned.

class tibiapy.enums.WorldLocation(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

The possible physical locations for servers.

EUROPE = 'Europe'
NORTH_AMERICA = 'North America'
OCEANIA = 'Oceania'
SOUTH_AMERICA = 'South America'

Models

These are the classes that defined the models used by Tibia.py.

While it is possible to create instances of these models, their purpose is to be used as data containers.

Characters

The Character section consists of the Character class and its auxiliary classes used to hold its data.

pydantic model tibiapy.models.Character[source]

A full character from Tibia.com, obtained from its character page.

Show JSON schema
{
   "title": "Character",
   "description": "A full character from Tibia.com, obtained from its character page.",
   "type": "object",
   "properties": {
      "name": {
         "description": "The name of the character.",
         "title": "Name",
         "type": "string"
      },
      "isTraded": {
         "description": "If the character was traded in the last 6 months.",
         "title": "Istraded",
         "type": "boolean"
      },
      "deletionDate": {
         "anyOf": [
            {
               "format": "date-time",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The date when the character will be deleted if it is scheduled for deletion. Will be :obj:`None` otherwise.",
         "title": "Deletiondate"
      },
      "formerNames": {
         "description": "Previous names of the character in the last 6 months..",
         "items": {
            "type": "string"
         },
         "title": "Formernames",
         "type": "array"
      },
      "title": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The character's selected title, if any.",
         "title": "Title"
      },
      "unlockedTitles": {
         "default": 0,
         "description": "The number of titles the character has unlocked.",
         "title": "Unlockedtitles",
         "type": "integer"
      },
      "sex": {
         "description": "The character's sex.",
         "enum": [
            "male",
            "female"
         ],
         "title": "Sex",
         "type": "string"
      },
      "vocation": {
         "description": "The character's vocation.",
         "enum": [
            "None",
            "Druid",
            "Knight",
            "Paladin",
            "Sorcerer",
            "Elder Druid",
            "Elite Knight",
            "Royal Paladin",
            "Master Sorcerer"
         ],
         "title": "Vocation",
         "type": "string"
      },
      "level": {
         "default": 2,
         "description": "The character's level.",
         "title": "Level",
         "type": "integer"
      },
      "achievementPoints": {
         "description": "The total of achievement points the character has.",
         "title": "Achievementpoints",
         "type": "integer"
      },
      "world": {
         "description": "The character's current world.",
         "title": "World",
         "type": "string"
      },
      "formerWorld": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The previous world the character was in, in the last 6 months.",
         "title": "Formerworld"
      },
      "residence": {
         "description": "The current hometown of the character.",
         "title": "Residence",
         "type": "string"
      },
      "marriedTo": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The name of the character's spouse. It will be :obj:`None` if not married.",
         "title": "Marriedto"
      },
      "houses": {
         "description": "The houses currently owned by the character.",
         "items": {
            "$ref": "#/$defs/CharacterHouse"
         },
         "title": "Houses",
         "type": "array"
      },
      "guildMembership": {
         "anyOf": [
            {
               "$ref": "#/$defs/GuildMembership"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The guild the character is a member of. It will be :obj:`None` if the character is not in a guild."
      },
      "lastLogin": {
         "anyOf": [
            {
               "format": "date-time",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The last time the character logged in. It will be :obj:`None` if the character has never logged in.",
         "title": "Lastlogin"
      },
      "position": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The position of the character (e.g. CipSoft Member), if any.",
         "title": "Position"
      },
      "comment": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The displayed comment.",
         "title": "Comment"
      },
      "isPremium": {
         "description": "Whether the character's account is Premium or Free.",
         "title": "Ispremium",
         "type": "boolean"
      },
      "accountBadges": {
         "description": "The displayed account badges.",
         "items": {
            "$ref": "#/$defs/AccountBadge"
         },
         "title": "Accountbadges",
         "type": "array"
      },
      "achievements": {
         "description": "The achievements chosen to be displayed.",
         "items": {
            "$ref": "#/$defs/Achievement"
         },
         "title": "Achievements",
         "type": "array"
      },
      "deaths": {
         "description": "The character's recent deaths.",
         "items": {
            "$ref": "#/$defs/Death"
         },
         "title": "Deaths",
         "type": "array"
      },
      "deathsTruncated": {
         "description": "Whether the character's deaths are truncated or not.\n\nIn some cases, there are more deaths in the last 30 days than what can be displayed.",
         "title": "Deathstruncated",
         "type": "boolean"
      },
      "accountInformation": {
         "anyOf": [
            {
               "$ref": "#/$defs/AccountInformation"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The character's account information. If the character is hidden, this will be :obj:`None`."
      },
      "otherCharacters": {
         "description": "Other characters in the same account.\n\nIt will be empty if the character is hidden, otherwise, it will contain at least the character itself.",
         "items": {
            "$ref": "#/$defs/OtherCharacter"
         },
         "title": "Othercharacters",
         "type": "array"
      }
   },
   "$defs": {
      "AccountBadge": {
         "description": "A displayed account badge in the character's information.",
         "properties": {
            "name": {
               "description": "The name of the badge.",
               "title": "Name",
               "type": "string"
            },
            "iconUrl": {
               "description": "The URL to the badge's icon.",
               "title": "Iconurl",
               "type": "string"
            },
            "description": {
               "description": "The description of the badge.",
               "title": "Description",
               "type": "string"
            }
         },
         "required": [
            "name",
            "iconUrl",
            "description"
         ],
         "title": "AccountBadge",
         "type": "object"
      },
      "AccountInformation": {
         "description": "Contains the information of a character's account.\n\nThis is only visible if the character is not marked as hidden.",
         "properties": {
            "created": {
               "description": "The date when the account was created.",
               "format": "date-time",
               "title": "Created",
               "type": "string"
            },
            "position": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The special position of this account, if any.",
               "title": "Position"
            },
            "loyaltyTitle": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The loyalty title of the account, if any",
               "title": "Loyaltytitle"
            }
         },
         "required": [
            "created"
         ],
         "title": "AccountInformation",
         "type": "object"
      },
      "Achievement": {
         "description": "Represents an achievement listed on a character's page.",
         "properties": {
            "name": {
               "description": "The name of the achievement.",
               "title": "Name",
               "type": "string"
            },
            "grade": {
               "description": "The grade of the achievement, also known as stars.",
               "title": "Grade",
               "type": "integer"
            },
            "isSecret": {
               "description": "Whether the achievement is secret or not.",
               "title": "Issecret",
               "type": "boolean"
            }
         },
         "required": [
            "name",
            "grade",
            "isSecret"
         ],
         "title": "Achievement",
         "type": "object"
      },
      "CharacterHouse": {
         "description": "A house owned by a character.",
         "properties": {
            "name": {
               "description": "The name of the house.",
               "title": "Name",
               "type": "string"
            },
            "id": {
               "description": "The internal ID of the house. This is used on the website to identify houses.",
               "title": "Id",
               "type": "integer"
            },
            "world": {
               "description": "The name of the world the house belongs to.",
               "title": "World",
               "type": "string"
            },
            "town": {
               "description": "The town where the city is located in.",
               "title": "Town",
               "type": "string"
            },
            "paidUntil": {
               "description": "The date the last paid rent is due.",
               "format": "date",
               "title": "Paiduntil",
               "type": "string"
            }
         },
         "required": [
            "name",
            "id",
            "world",
            "town",
            "paidUntil"
         ],
         "title": "CharacterHouse",
         "type": "object"
      },
      "Death": {
         "description": "A character's death.",
         "properties": {
            "level": {
               "description": "The level at which the death occurred.",
               "title": "Level",
               "type": "integer"
            },
            "killers": {
               "description": "A list of all the killers involved.",
               "items": {
                  "$ref": "#/$defs/DeathParticipant"
               },
               "title": "Killers",
               "type": "array"
            },
            "assists": {
               "description": "A list of characters that were involved, without dealing damage.",
               "items": {
                  "$ref": "#/$defs/DeathParticipant"
               },
               "title": "Assists",
               "type": "array"
            },
            "time": {
               "description": "The time at which the death occurred.",
               "format": "date-time",
               "title": "Time",
               "type": "string"
            }
         },
         "required": [
            "level",
            "killers",
            "assists",
            "time"
         ],
         "title": "Death",
         "type": "object"
      },
      "DeathParticipant": {
         "description": "A creature or player that participated in a death, either as a killer o as an assistant.\n\nA participant can be:\n\na) A creature.\nb) A character.\nc) A creature summoned by a character.",
         "properties": {
            "name": {
               "description": "The name of the killer. In the case of summons, the name belongs to the owner.",
               "title": "Name",
               "type": "string"
            },
            "isPlayer": {
               "description": "Whether the killer is a player or not.",
               "title": "Isplayer",
               "type": "boolean"
            },
            "summon": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The name of the summoned creature, if applicable.",
               "title": "Summon"
            },
            "isTraded": {
               "default": false,
               "description": "If the killer was traded after this death happened.",
               "title": "Istraded",
               "type": "boolean"
            }
         },
         "required": [
            "name",
            "isPlayer"
         ],
         "title": "DeathParticipant",
         "type": "object"
      },
      "GuildMembership": {
         "description": "The guild information of a character.",
         "properties": {
            "name": {
               "description": "The name of the guild.",
               "title": "Name",
               "type": "string"
            },
            "rank": {
               "description": "The name of the rank the member has.",
               "title": "Rank",
               "type": "string"
            },
            "title": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The title of the member in the guild. This is only available for characters in the forums section.",
               "title": "Title"
            }
         },
         "required": [
            "name",
            "rank"
         ],
         "title": "GuildMembership",
         "type": "object"
      },
      "OtherCharacter": {
         "description": "A character listed in the characters section of a character's page.\n\nThese are only shown if the character is not hidden, and only characters that are not hidden are shown here.",
         "properties": {
            "name": {
               "description": "The name of the character.",
               "title": "Name",
               "type": "string"
            },
            "world": {
               "description": "The name of the world.",
               "title": "World",
               "type": "string"
            },
            "isOnline": {
               "description": "Whether the character is online or not.",
               "title": "Isonline",
               "type": "boolean"
            },
            "isDeleted": {
               "description": "Whether the character is scheduled for deletion or not.",
               "title": "Isdeleted",
               "type": "boolean"
            },
            "isTraded": {
               "description": "Whether the character has been traded recently or not.",
               "title": "Istraded",
               "type": "boolean"
            },
            "isMain": {
               "description": "Whether this is the main character or not.",
               "title": "Ismain",
               "type": "boolean"
            },
            "position": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The character's official position, if any.",
               "title": "Position"
            }
         },
         "required": [
            "name",
            "world",
            "isOnline",
            "isDeleted",
            "isTraded",
            "isMain"
         ],
         "title": "OtherCharacter",
         "type": "object"
      }
   },
   "required": [
      "name",
      "isTraded",
      "formerNames",
      "sex",
      "vocation",
      "achievementPoints",
      "world",
      "residence",
      "houses",
      "isPremium",
      "accountBadges",
      "achievements",
      "deaths",
      "deathsTruncated",
      "otherCharacters"
   ]
}

Config:
  • populate_by_name: bool = True

  • alias_generator: function = <function to_camel at 0x73beb93f7e20>

  • use_attribute_docstrings: bool = True

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
  • account_badges (list[tibiapy.models.character.AccountBadge])

  • account_information (tibiapy.models.character.AccountInformation | None)

  • achievement_points (int)

  • achievements (list[tibiapy.models.character.Achievement])

  • comment (str | None)

  • deaths (list[tibiapy.models.character.Death])

  • deaths_truncated (bool)

  • deletion_date (datetime.datetime | None)

  • former_names (list[str])

  • former_world (str | None)

  • guild_membership (tibiapy.models.character.GuildMembership | None)

  • houses (list[tibiapy.models.character.CharacterHouse])

  • is_premium (bool)

  • is_traded (bool)

  • last_login (datetime.datetime | None)

  • level (int)

  • married_to (str | None)

  • name (str)

  • other_characters (list[tibiapy.models.character.OtherCharacter])

  • position (str | None)

  • residence (str)

  • sex (tibiapy.enums.Sex)

  • title (str | None)

  • unlocked_titles (int)

  • vocation (tibiapy.enums.Vocation)

  • world (str)

field account_badges: list[AccountBadge] [Required] (alias 'accountBadges')

The displayed account badges.

field account_information: Optional[AccountInformation] = None (alias 'accountInformation')

The character’s account information. If the character is hidden, this will be None.

field achievement_points: int [Required] (alias 'achievementPoints')

The total of achievement points the character has.

field achievements: list[Achievement] [Required]

The achievements chosen to be displayed.

field comment: Optional[str] = None

The displayed comment.

field deaths: list[Death] [Required]

The character’s recent deaths.

field deaths_truncated: bool [Required] (alias 'deathsTruncated')

Whether the character’s deaths are truncated or not.

In some cases, there are more deaths in the last 30 days than what can be displayed.

field deletion_date: Optional[datetime.datetime] = None (alias 'deletionDate')

The date when the character will be deleted if it is scheduled for deletion. Will be None otherwise.

field former_names: list[str] [Required] (alias 'formerNames')

Previous names of the character in the last 6 months..

field former_world: Optional[str] = None (alias 'formerWorld')

The previous world the character was in, in the last 6 months.

field guild_membership: Optional[GuildMembership] = None (alias 'guildMembership')

The guild the character is a member of. It will be None if the character is not in a guild.

field houses: list[CharacterHouse] [Required]

The houses currently owned by the character.

field is_premium: bool [Required] (alias 'isPremium')

Whether the character’s account is Premium or Free.

field is_traded: bool [Required] (alias 'isTraded')

If the character was traded in the last 6 months.

field last_login: Optional[datetime.datetime] = None (alias 'lastLogin')

The last time the character logged in. It will be None if the character has never logged in.

field level: int = 2

The character’s level.

field married_to: Optional[str] = None (alias 'marriedTo')

The name of the character’s spouse. It will be None if not married.

field name: str [Required]

The name of the character.

field other_characters: list[OtherCharacter] [Required] (alias 'otherCharacters')

Other characters in the same account.

It will be empty if the character is hidden, otherwise, it will contain at least the character itself.

field position: Optional[str] = None

The position of the character (e.g. CipSoft Member), if any.

field residence: str [Required]

The current hometown of the character.

field sex: Sex [Required]

The character’s sex.

field title: Optional[str] = None

The character’s selected title, if any.

field unlocked_titles: int = 0 (alias 'unlockedTitles')

The number of titles the character has unlocked.

field vocation: Vocation [Required]

The character’s vocation.

field world: str [Required]

The character’s current world.

property guild_name: str | None

The name of the guild the character belongs to, or None.

property guild_rank: str | None

The character’s rank in the guild they belong to, or None.

property guild_url: str | None

The character’s rank in the guild they belong to, or None.

property is_hidden: bool

Whether this is a hidden character or not.

property is_scheduled_for_deletion: bool

Whether the character is scheduled for deletion or not.

property married_to_url: str | None

The URL to the husband/spouse information page on Tibia.com, if applicable.

property url: str

The URL of the character’s information page on Tibia.com.

pydantic model tibiapy.models.AccountBadge[source]

A displayed account badge in the character’s information.

Show JSON schema
{
   "title": "AccountBadge",
   "description": "A displayed account badge in the character's information.",
   "type": "object",
   "properties": {
      "name": {
         "description": "The name of the badge.",
         "title": "Name",
         "type": "string"
      },
      "iconUrl": {
         "description": "The URL to the badge's icon.",
         "title": "Iconurl",
         "type": "string"
      },
      "description": {
         "description": "The description of the badge.",
         "title": "Description",
         "type": "string"
      }
   },
   "required": [
      "name",
      "iconUrl",
      "description"
   ]
}

Config:
  • populate_by_name: bool = True

  • alias_generator: function = <function to_camel at 0x73beb93f7e20>

  • use_attribute_docstrings: bool = True

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
  • description (str)

  • icon_url (str)

  • name (str)

field description: str [Required]

The description of the badge.

field icon_url: str [Required] (alias 'iconUrl')

The URL to the badge’s icon.

field name: str [Required]

The name of the badge.

pydantic model tibiapy.models.AccountInformation[source]

Contains the information of a character’s account.

This is only visible if the character is not marked as hidden.

Show JSON schema
{
   "title": "AccountInformation",
   "description": "Contains the information of a character's account.\n\nThis is only visible if the character is not marked as hidden.",
   "type": "object",
   "properties": {
      "created": {
         "description": "The date when the account was created.",
         "format": "date-time",
         "title": "Created",
         "type": "string"
      },
      "position": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The special position of this account, if any.",
         "title": "Position"
      },
      "loyaltyTitle": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The loyalty title of the account, if any",
         "title": "Loyaltytitle"
      }
   },
   "required": [
      "created"
   ]
}

Config:
  • populate_by_name: bool = True

  • alias_generator: function = <function to_camel at 0x73beb93f7e20>

  • use_attribute_docstrings: bool = True

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
  • created (datetime.datetime)

  • loyalty_title (str | None)

  • position (str | None)

field created: datetime.datetime [Required]

The date when the account was created.

field loyalty_title: Optional[str] = None (alias 'loyaltyTitle')

The loyalty title of the account, if any

field position: Optional[str] = None

The special position of this account, if any.

pydantic model tibiapy.models.Achievement[source]

Represents an achievement listed on a character’s page.

Show JSON schema
{
   "title": "Achievement",
   "description": "Represents an achievement listed on a character's page.",
   "type": "object",
   "properties": {
      "name": {
         "description": "The name of the achievement.",
         "title": "Name",
         "type": "string"
      },
      "grade": {
         "description": "The grade of the achievement, also known as stars.",
         "title": "Grade",
         "type": "integer"
      },
      "isSecret": {
         "description": "Whether the achievement is secret or not.",
         "title": "Issecret",
         "type": "boolean"
      }
   },
   "required": [
      "name",
      "grade",
      "isSecret"
   ]
}

Config:
  • populate_by_name: bool = True

  • alias_generator: function = <function to_camel at 0x73beb93f7e20>

  • use_attribute_docstrings: bool = True

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
  • grade (int)

  • is_secret (bool)

  • name (str)

field grade: int [Required]

The grade of the achievement, also known as stars.

field is_secret: bool [Required] (alias 'isSecret')

Whether the achievement is secret or not.

field name: str [Required]

The name of the achievement.

pydantic model tibiapy.models.CharacterHouse[source]

A house owned by a character.

Show JSON schema
{
   "title": "CharacterHouse",
   "description": "A house owned by a character.",
   "type": "object",
   "properties": {
      "name": {
         "description": "The name of the house.",
         "title": "Name",
         "type": "string"
      },
      "id": {
         "description": "The internal ID of the house. This is used on the website to identify houses.",
         "title": "Id",
         "type": "integer"
      },
      "world": {
         "description": "The name of the world the house belongs to.",
         "title": "World",
         "type": "string"
      },
      "town": {
         "description": "The town where the city is located in.",
         "title": "Town",
         "type": "string"
      },
      "paidUntil": {
         "description": "The date the last paid rent is due.",
         "format": "date",
         "title": "Paiduntil",
         "type": "string"
      }
   },
   "required": [
      "name",
      "id",
      "world",
      "town",
      "paidUntil"
   ]
}

Config:
  • populate_by_name: bool = True

  • alias_generator: function = <function to_camel at 0x73beb93f7e20>

  • use_attribute_docstrings: bool = True

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
  • id (int)

  • name (str)

  • paid_until (datetime.date)

  • town (str)

  • world (str)

field id: int [Required]

The internal ID of the house. This is used on the website to identify houses.

field name: str [Required]

The name of the house.

field paid_until: datetime.date [Required] (alias 'paidUntil')

The date the last paid rent is due.

field town: str [Required]

The town where the city is located in.

field world: str [Required]

The name of the world the house belongs to.

property url: str

The URL to the Tibia.com page of the house.

pydantic model tibiapy.models.Death[source]

A character’s death.

Show JSON schema
{
   "title": "Death",
   "description": "A character's death.",
   "type": "object",
   "properties": {
      "level": {
         "description": "The level at which the death occurred.",
         "title": "Level",
         "type": "integer"
      },
      "killers": {
         "description": "A list of all the killers involved.",
         "items": {
            "$ref": "#/$defs/DeathParticipant"
         },
         "title": "Killers",
         "type": "array"
      },
      "assists": {
         "description": "A list of characters that were involved, without dealing damage.",
         "items": {
            "$ref": "#/$defs/DeathParticipant"
         },
         "title": "Assists",
         "type": "array"
      },
      "time": {
         "description": "The time at which the death occurred.",
         "format": "date-time",
         "title": "Time",
         "type": "string"
      }
   },
   "$defs": {
      "DeathParticipant": {
         "description": "A creature or player that participated in a death, either as a killer o as an assistant.\n\nA participant can be:\n\na) A creature.\nb) A character.\nc) A creature summoned by a character.",
         "properties": {
            "name": {
               "description": "The name of the killer. In the case of summons, the name belongs to the owner.",
               "title": "Name",
               "type": "string"
            },
            "isPlayer": {
               "description": "Whether the killer is a player or not.",
               "title": "Isplayer",
               "type": "boolean"
            },
            "summon": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The name of the summoned creature, if applicable.",
               "title": "Summon"
            },
            "isTraded": {
               "default": false,
               "description": "If the killer was traded after this death happened.",
               "title": "Istraded",
               "type": "boolean"
            }
         },
         "required": [
            "name",
            "isPlayer"
         ],
         "title": "DeathParticipant",
         "type": "object"
      }
   },
   "required": [
      "level",
      "killers",
      "assists",
      "time"
   ]
}

Config:
  • populate_by_name: bool = True

  • alias_generator: function = <function to_camel at 0x73beb93f7e20>

  • use_attribute_docstrings: bool = True

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
  • assists (list[tibiapy.models.character.DeathParticipant])

  • killers (list[tibiapy.models.character.DeathParticipant])

  • level (int)

  • time (datetime.datetime)

field assists: list[DeathParticipant] [Required]

A list of characters that were involved, without dealing damage.

field killers: list[DeathParticipant] [Required]

A list of all the killers involved.

field level: int [Required]

The level at which the death occurred.

field time: datetime.datetime [Required]

The time at which the death occurred.

property is_by_player: bool

Whether the kill involves other characters.

property killer: DeathParticipant

The first killer in the list.

This is usually the killer that gave the killing blow.

pydantic model tibiapy.models.GuildMembership[source]

The guild information of a character.

Show JSON schema
{
   "title": "GuildMembership",
   "description": "The guild information of a character.",
   "type": "object",
   "properties": {
      "name": {
         "description": "The name of the guild.",
         "title": "Name",
         "type": "string"
      },
      "rank": {
         "description": "The name of the rank the member has.",
         "title": "Rank",
         "type": "string"
      },
      "title": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The title of the member in the guild. This is only available for characters in the forums section.",
         "title": "Title"
      }
   },
   "required": [
      "name",
      "rank"
   ]
}

Config:
  • populate_by_name: bool = True

  • alias_generator: function = <function to_camel at 0x73beb93f7e20>

  • use_attribute_docstrings: bool = True

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
  • name (str)

  • rank (str)

  • title (str | None)

field name: str [Required]

The name of the guild.

field rank: str [Required]

The name of the rank the member has.

field title: Optional[str] = None

The title of the member in the guild. This is only available for characters in the forums section.

property url: str

The URL to the guild’s information page on Tibia.com.

property url_wars: str

The URL to the guild’s wars page on Tibia.com.

Added in version 3.0.0.

pydantic model tibiapy.models.DeathParticipant[source]

A creature or player that participated in a death, either as a killer o as an assistant.

A participant can be:

  1. A creature.

  2. A character.

  3. A creature summoned by a character.

Show JSON schema
{
   "title": "DeathParticipant",
   "description": "A creature or player that participated in a death, either as a killer o as an assistant.\n\nA participant can be:\n\na) A creature.\nb) A character.\nc) A creature summoned by a character.",
   "type": "object",
   "properties": {
      "name": {
         "description": "The name of the killer. In the case of summons, the name belongs to the owner.",
         "title": "Name",
         "type": "string"
      },
      "isPlayer": {
         "description": "Whether the killer is a player or not.",
         "title": "Isplayer",
         "type": "boolean"
      },
      "summon": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The name of the summoned creature, if applicable.",
         "title": "Summon"
      },
      "isTraded": {
         "default": false,
         "description": "If the killer was traded after this death happened.",
         "title": "Istraded",
         "type": "boolean"
      }
   },
   "required": [
      "name",
      "isPlayer"
   ]
}

Config:
  • populate_by_name: bool = True

  • alias_generator: function = <function to_camel at 0x73beb93f7e20>

  • use_attribute_docstrings: bool = True

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
  • is_player (bool)

  • is_traded (bool)

  • name (str)

  • summon (str | None)

field is_player: bool [Required] (alias 'isPlayer')

Whether the killer is a player or not.

field is_traded: bool = False (alias 'isTraded')

If the killer was traded after this death happened.

field name: str [Required]

The name of the killer. In the case of summons, the name belongs to the owner.

field summon: Optional[str] = None

The name of the summoned creature, if applicable.

property url: str | None

The URL of the character’s information page on Tibia.com, if applicable.

pydantic model tibiapy.models.OtherCharacter[source]

A character listed in the characters section of a character’s page.

These are only shown if the character is not hidden, and only characters that are not hidden are shown here.

Show JSON schema
{
   "title": "OtherCharacter",
   "description": "A character listed in the characters section of a character's page.\n\nThese are only shown if the character is not hidden, and only characters that are not hidden are shown here.",
   "type": "object",
   "properties": {
      "name": {
         "description": "The name of the character.",
         "title": "Name",
         "type": "string"
      },
      "world": {
         "description": "The name of the world.",
         "title": "World",
         "type": "string"
      },
      "isOnline": {
         "description": "Whether the character is online or not.",
         "title": "Isonline",
         "type": "boolean"
      },
      "isDeleted": {
         "description": "Whether the character is scheduled for deletion or not.",
         "title": "Isdeleted",
         "type": "boolean"
      },
      "isTraded": {
         "description": "Whether the character has been traded recently or not.",
         "title": "Istraded",
         "type": "boolean"
      },
      "isMain": {
         "description": "Whether this is the main character or not.",
         "title": "Ismain",
         "type": "boolean"
      },
      "position": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The character's official position, if any.",
         "title": "Position"
      }
   },
   "required": [
      "name",
      "world",
      "isOnline",
      "isDeleted",
      "isTraded",
      "isMain"
   ]
}

Config:
  • populate_by_name: bool = True

  • alias_generator: function = <function to_camel at 0x73beb93f7e20>

  • use_attribute_docstrings: bool = True

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
  • is_deleted (bool)

  • is_main (bool)

  • is_online (bool)

  • is_traded (bool)

  • name (str)

  • position (str | None)

  • world (str)

field is_deleted: bool [Required] (alias 'isDeleted')

Whether the character is scheduled for deletion or not.

field is_main: bool [Required] (alias 'isMain')

Whether this is the main character or not.

field is_online: bool [Required] (alias 'isOnline')

Whether the character is online or not.

field is_traded: bool [Required] (alias 'isTraded')

Whether the character has been traded recently or not.

field name: str [Required]

The name of the character.

field position: Optional[str] = None

The character’s official position, if any.

field world: str [Required]

The name of the world.

property url: str

The URL of the character’s information page on Tibia.com.

Worlds

Models related to Tibia.com’s World section. The WorldOverview class contains the list of all worlds, while the World class contains the details of a single world.

pydantic model tibiapy.models.WorldOverview[source]

Container class for the World Overview section.

Show JSON schema
{
   "title": "WorldOverview",
   "description": "Container class for the World Overview section.",
   "type": "object",
   "properties": {
      "recordCount": {
         "description": "The overall player online record.",
         "title": "Recordcount",
         "type": "integer"
      },
      "recordDate": {
         "description": "The date when the record was achieved.",
         "format": "date-time",
         "title": "Recorddate",
         "type": "string"
      },
      "worlds": {
         "default": [],
         "description": "List of worlds, with limited info.",
         "items": {
            "$ref": "#/$defs/WorldEntry"
         },
         "title": "Worlds",
         "type": "array"
      }
   },
   "$defs": {
      "WorldEntry": {
         "description": "Represents a game server listed in the World Overview section.",
         "properties": {
            "name": {
               "description": "The name of the world.",
               "title": "Name",
               "type": "string"
            },
            "isOnline": {
               "description": "Whether the world is online or not.",
               "title": "Isonline",
               "type": "boolean"
            },
            "onlineCount": {
               "description": "The number of currently online players in the world.",
               "title": "Onlinecount",
               "type": "integer"
            },
            "location": {
               "description": "The physical location of the game servers.",
               "enum": [
                  "Europe",
                  "North America",
                  "Oceania",
                  "South America"
               ],
               "title": "Location",
               "type": "string"
            },
            "pvpType": {
               "description": "The type of PvP in the world.",
               "enum": [
                  "Open PvP",
                  "Optional PvP",
                  "Retro Open PvP",
                  "Retro Hardcore PvP",
                  "Hardcore PvP"
               ],
               "title": "Pvptype",
               "type": "string"
            },
            "transferType": {
               "description": "The type of transfer restrictions this world has.",
               "enum": [
                  "regular",
                  "blocked",
                  "locked"
               ],
               "title": "Transfertype",
               "type": "string"
            },
            "isPremiumOnly": {
               "description": "Whether only premium account players are allowed to play in this server.",
               "title": "Ispremiumonly",
               "type": "boolean"
            },
            "battleyeSince": {
               "anyOf": [
                  {
                     "format": "date",
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The date when BattlEye was added to this world.",
               "title": "Battleyesince"
            },
            "battleyeType": {
               "description": "The type of BattlEye protection this world has.",
               "enum": [
                  "UNPROTECTED",
                  "PROTECTED",
                  "INITIALLY_PROTECTED"
               ],
               "title": "Battleyetype",
               "type": "string"
            },
            "isExperimental": {
               "description": "Whether the world is experimental or not.",
               "title": "Isexperimental",
               "type": "boolean"
            }
         },
         "required": [
            "name",
            "isOnline",
            "onlineCount",
            "location",
            "pvpType",
            "transferType",
            "isPremiumOnly",
            "battleyeType",
            "isExperimental"
         ],
         "title": "WorldEntry",
         "type": "object"
      }
   },
   "required": [
      "recordCount",
      "recordDate"
   ]
}

Config:
  • populate_by_name: bool = True

  • alias_generator: function = <function to_camel at 0x73beb93f7e20>

  • use_attribute_docstrings: bool = True

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
  • record_count (int)

  • record_date (datetime.datetime)

  • worlds (list[tibiapy.models.world.WorldEntry])

field record_count: int [Required] (alias 'recordCount')

The overall player online record.

field record_date: datetime [Required] (alias 'recordDate')

The date when the record was achieved.

field worlds: list[WorldEntry] = []

List of worlds, with limited info.

property total_online: int

Total players online across all worlds.

pydantic model tibiapy.models.WorldEntry[source]

Represents a game server listed in the World Overview section.

Show JSON schema
{
   "title": "WorldEntry",
   "description": "Represents a game server listed in the World Overview section.",
   "type": "object",
   "properties": {
      "name": {
         "description": "The name of the world.",
         "title": "Name",
         "type": "string"
      },
      "isOnline": {
         "description": "Whether the world is online or not.",
         "title": "Isonline",
         "type": "boolean"
      },
      "onlineCount": {
         "description": "The number of currently online players in the world.",
         "title": "Onlinecount",
         "type": "integer"
      },
      "location": {
         "description": "The physical location of the game servers.",
         "enum": [
            "Europe",
            "North America",
            "Oceania",
            "South America"
         ],
         "title": "Location",
         "type": "string"
      },
      "pvpType": {
         "description": "The type of PvP in the world.",
         "enum": [
            "Open PvP",
            "Optional PvP",
            "Retro Open PvP",
            "Retro Hardcore PvP",
            "Hardcore PvP"
         ],
         "title": "Pvptype",
         "type": "string"
      },
      "transferType": {
         "description": "The type of transfer restrictions this world has.",
         "enum": [
            "regular",
            "blocked",
            "locked"
         ],
         "title": "Transfertype",
         "type": "string"
      },
      "isPremiumOnly": {
         "description": "Whether only premium account players are allowed to play in this server.",
         "title": "Ispremiumonly",
         "type": "boolean"
      },
      "battleyeSince": {
         "anyOf": [
            {
               "format": "date",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The date when BattlEye was added to this world.",
         "title": "Battleyesince"
      },
      "battleyeType": {
         "description": "The type of BattlEye protection this world has.",
         "enum": [
            "UNPROTECTED",
            "PROTECTED",
            "INITIALLY_PROTECTED"
         ],
         "title": "Battleyetype",
         "type": "string"
      },
      "isExperimental": {
         "description": "Whether the world is experimental or not.",
         "title": "Isexperimental",
         "type": "boolean"
      }
   },
   "required": [
      "name",
      "isOnline",
      "onlineCount",
      "location",
      "pvpType",
      "transferType",
      "isPremiumOnly",
      "battleyeType",
      "isExperimental"
   ]
}

Config:
  • populate_by_name: bool = True

  • alias_generator: function = <function to_camel at 0x73beb93f7e20>

  • use_attribute_docstrings: bool = True

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
  • battleye_since (datetime.date | None)

  • battleye_type (tibiapy.enums.BattlEyeType)

  • is_experimental (bool)

  • is_online (bool)

  • is_premium_only (bool)

  • location (tibiapy.enums.WorldLocation)

  • name (str)

  • online_count (int)

  • pvp_type (tibiapy.enums.PvpType)

  • transfer_type (tibiapy.enums.TransferType)

field battleye_since: Optional[datetime.date] = None (alias 'battleyeSince')

The date when BattlEye was added to this world.

field battleye_type: BattlEyeType [Required] (alias 'battleyeType')

The type of BattlEye protection this world has.

field is_experimental: bool [Required] (alias 'isExperimental')

Whether the world is experimental or not.

field is_online: bool [Required] (alias 'isOnline')

Whether the world is online or not.

field is_premium_only: bool [Required] (alias 'isPremiumOnly')

Whether only premium account players are allowed to play in this server.

field location: WorldLocation [Required]

The physical location of the game servers.

field name: str [Required]

The name of the world.

field online_count: int [Required] (alias 'onlineCount')

The number of currently online players in the world.

field pvp_type: PvpType [Required] (alias 'pvpType')

The type of PvP in the world.

field transfer_type: TransferType [Required] (alias 'transferType')

The type of transfer restrictions this world has.

property is_battleye_protected: bool

Whether the server is currently protected with BattlEye or not.

Changed in version 4.0.0: Now a calculated property instead of a field.

property url: str

URL to the world’s information page on Tibia.com.

pydantic model tibiapy.models.World[source]

Represents a Tibia game server.

Show JSON schema
{
   "title": "World",
   "description": "Represents a Tibia game server.",
   "type": "object",
   "properties": {
      "name": {
         "description": "The name of the world.",
         "title": "Name",
         "type": "string"
      },
      "isOnline": {
         "description": "Whether the world is online or not.",
         "title": "Isonline",
         "type": "boolean"
      },
      "onlineCount": {
         "description": "The number of currently online players in the world.",
         "title": "Onlinecount",
         "type": "integer"
      },
      "location": {
         "description": "The physical location of the game servers.",
         "enum": [
            "Europe",
            "North America",
            "Oceania",
            "South America"
         ],
         "title": "Location",
         "type": "string"
      },
      "pvpType": {
         "description": "The type of PvP in the world.",
         "enum": [
            "Open PvP",
            "Optional PvP",
            "Retro Open PvP",
            "Retro Hardcore PvP",
            "Hardcore PvP"
         ],
         "title": "Pvptype",
         "type": "string"
      },
      "transferType": {
         "description": "The type of transfer restrictions this world has.",
         "enum": [
            "regular",
            "blocked",
            "locked"
         ],
         "title": "Transfertype",
         "type": "string"
      },
      "isPremiumOnly": {
         "description": "Whether only premium account players are allowed to play in this server.",
         "title": "Ispremiumonly",
         "type": "boolean"
      },
      "battleyeSince": {
         "anyOf": [
            {
               "format": "date",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The date when BattlEye was added to this world.",
         "title": "Battleyesince"
      },
      "battleyeType": {
         "description": "The type of BattlEye protection this world has.",
         "enum": [
            "UNPROTECTED",
            "PROTECTED",
            "INITIALLY_PROTECTED"
         ],
         "title": "Battleyetype",
         "type": "string"
      },
      "isExperimental": {
         "description": "Whether the world is experimental or not.",
         "title": "Isexperimental",
         "type": "boolean"
      },
      "recordCount": {
         "description": "The server's online players record. Will be 0 if the world has never been online.",
         "title": "Recordcount",
         "type": "integer"
      },
      "recordDate": {
         "anyOf": [
            {
               "format": "date-time",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "description": "The date when the online record was achieved. Will be None if the world has never been online.",
         "title": "Recorddate"
      },
      "creationDate": {
         "description": "The month and year the world was created. In YYYY-MM format.",
         "title": "Creationdate",
         "type": "string"
      },
      "worldQuestTitles": {
         "description": "List of world quest titles the server has achieved.",
         "items": {
            "type": "string"
         },
         "title": "Worldquesttitles",
         "type": "array"
      },
      "onlinePlayers": {
         "description": "A list of characters currently online in the server.",
         "items": {
            "$ref": "#/$defs/OnlineCharacter"
         },
         "title": "Onlineplayers",
         "type": "array"
      }
   },
   "$defs": {
      "OnlineCharacter": {
         "description": "An online character in the world's page.",
         "properties": {
            "name": {
               "description": "The name of the character.",
               "title": "Name",
               "type": "string"
            },
            "vocation": {
               "description": "The vocation of the character.",
               "enum": [
                  "None",
                  "Druid",
                  "Knight",
                  "Paladin",
                  "Sorcerer",
                  "Elder Druid",
                  "Elite Knight",
                  "Royal Paladin",
                  "Master Sorcerer"
               ],
               "title": "Vocation",
               "type": "string"
            },
            "level": {
               "description": "The level of the character.",
               "title": "Level",
               "type": "integer"
            }
         },
         "required": [
            "name",
            "vocation",
            "level"
         ],
         "title": "OnlineCharacter",
         "type": "object"
      }
   },
   "required": [
      "name",
      "isOnline",
      "onlineCount",
      "location",
      "pvpType",
      "transferType",
      "isPremiumOnly",
      "battleyeType",
      "isExperimental",
      "recordCount",
      "recordDate",
      "creationDate",
      "worldQuestTitles",
      "onlinePlayers"
   ]
}

Config:
  • populate_by_name: bool = True

  • alias_generator: function = <function to_camel at 0x73beb93f7e20>

  • use_attribute_docstrings: bool = True

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
  • battleye_since (datetime.date | None)

  • battleye_type (tibiapy.enums.BattlEyeType)

  • creation_date (str)

  • is_experimental (bool)

  • is_online (bool)

  • is_premium_only (bool)

  • location (tibiapy.enums.WorldLocation)

  • name (str)

  • online_count (int)

  • online_players (list[tibiapy.models.character.OnlineCharacter])

  • pvp_type (tibiapy.enums.PvpType)

  • record_count (int)

  • record_date (datetime.datetime | None)

  • transfer_type (tibiapy.enums.TransferType)

  • world_quest_titles (list[str])

field battleye_since: Optional[datetime.date] = None (alias 'battleyeSince')

The date when BattlEye was added to this world.

field battleye_type: BattlEyeType [Required] (alias 'battleyeType')

The type of BattlEye protection this world has.

field creation_date: str [Required] (alias 'creationDate')

The month and year the world was created. In YYYY-MM format.

field is_experimental: bool [Required] (alias 'isExperimental')

Whether the world is experimental or not.

field is_online: bool [Required] (alias 'isOnline')

Whether the world is online or not.

field is_premium_only: bool [Required] (alias 'isPremiumOnly')

Whether only premium account players are allowed to play in this server.

field location: WorldLocation [Required]

The physical location of the game servers.

field name: str [Required]

The name of the world.

field online_count: int [Required] (alias 'onlineCount')

The number of currently online players in the world.

field online_players: list[OnlineCharacter] [Required] (alias 'onlinePlayers')

A list of characters currently online in the server.

field pvp_type: PvpType [Required] (alias 'pvpType')

The type of PvP in the world.

field record_count: int [Required] (alias 'recordCount')

The server’s online players record. Will be 0 if the world has never been online.

field record_date: Optional[datetime] [Required] (alias 'recordDate')

The date when the online record was achieved. Will be None if the world has never been online.

field transfer_type: TransferType [Required] (alias 'transferType')

The type of transfer restrictions this world has.

field world_quest_titles: list[str] [Required] (alias 'worldQuestTitles')

List of world quest titles the server has achieved.

property creation_month: int

Returns the month when the world was created.

property creation_year: int

Returns the year when the world was created.

property is_battleye_protected: bool

Whether the server is currently protected with BattlEye or not.

Changed in version 4.0.0: Now a calculated property instead of a field.

property url: str

URL to the world’s information page on Tibia.com.

pydantic model tibiapy.models.OnlineCharacter[source]

An online character in the world’s page.

Show JSON schema
{
   "title": "OnlineCharacter",
   "description": "An online character in the world's page.",
   "type": "object",
   "properties": {
      "name": {
         "description": "The name of the character.",
         "title": "Name",
         "type": "string"
      },
      "vocation": {
         "description": "The vocation of the character.",
         "enum": [
            "None",
            "Druid",
            "Knight",
            "Paladin",
            "Sorcerer",
            "Elder Druid",
            "Elite Knight",
            "Royal Paladin",
            "Master Sorcerer"
         ],
         "title": "Vocation",
         "type": "string"
      },
      "level": {
         "description": "The level of the character.",
         "title": "Level",
         "type": "integer"
      }
   },
   "required": [
      "name",
      "vocation",
      "level"
   ]
}

Config:
  • populate_by_name: bool = True

  • alias_generator: function = <function to_camel at 0x73beb93f7e20>

  • use_attribute_docstrings: bool = True

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
  • level (int)

  • name (str)

  • vocation (tibiapy.enums.Vocation)

field level: int [Required]

The level of the character.

field name: str [Required]

The name of the character.

field vocation: Vocation [Required]

The vocation of the character.

property url: str

The URL of the character’s information page on Tibia.com.

Guilds

Models related to Tibia.com’s Guilds section. The main model is Guild, while GuildEntry is the previewed information in the guild list of the GuildsSection.

pydantic model tibiapy.models.GuildsSection[source]

The guilds section in Tibia.com.

Show JSON schema
{
   "title": "GuildsSection",
   "description": "The guilds section in Tibia.com.",
   "type": "object",
   "properties": {
      "world": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The name of the world. If :obj:`None`, the section belongs to a world that doesn't exist.",
         "title": "World"
      },
      "entries": {
         "default": [],
         "description": "The list of guilds in the world.",
         "items": {
            "$ref": "#/$defs/GuildEntry"
         },
         "title": "Entries",
         "type": "array"
      },
      "availableWorlds": {
         "description": "The list of worlds available for selection.",
         "items": {
            "type": "string"
         },
         "title": "Availableworlds",
         "type": "array"
      }
   },
   "$defs": {
      "GuildEntry": {
         "description": "Represents a Tibia guild in the guild list of a world.",
         "properties": {
            "name": {
               "description": "The name of the guild.",
               "title": "Name",
               "type": "string"
            },
            "logoUrl": {
               "description": "The URL to the guild's logo.",
               "title": "Logourl",
               "type": "string"
            },
            "description": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The description of the guild.",
               "title": "Description"
            },
            "world": {
               "description": "The world this guild belongs to.",
               "title": "World",
               "type": "string"
            },
            "active": {
               "description": "Whether the guild is active or still in formation.",
               "title": "Active",
               "type": "boolean"
            }
         },
         "required": [
            "name",
            "logoUrl",
            "world",
            "active"
         ],
         "title": "GuildEntry",
         "type": "object"
      }
   },
   "required": [
      "availableWorlds"
   ]
}

Config:
  • populate_by_name: bool = True

  • alias_generator: function = <function to_camel at 0x73beb93f7e20>

  • use_attribute_docstrings: bool = True

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
  • available_worlds (list[str])

  • entries (list[tibiapy.models.guild.GuildEntry])

  • world (str | None)

field available_worlds: list[str] [Required] (alias 'availableWorlds')

The list of worlds available for selection.

field entries: list[GuildEntry] = []

The list of guilds in the world.

field world: Optional[str] = None

The name of the world. If None, the section belongs to a world that doesn’t exist.

property active_guilds: list[GuildEntry]

Get a list of the guilds that are active.

property in_formation_guilds: list[GuildEntry]

Get a list of the guilds that are in course of formation.

property url: str

Get the URL to this guild section.

pydantic model tibiapy.models.Guild[source]

A Tibia guild, viewed from its guild’s page.

Show JSON schema
{
   "title": "Guild",
   "description": "A Tibia guild, viewed from its guild's page.",
   "type": "object",
   "properties": {
      "name": {
         "description": "The name of the guild.",
         "title": "Name",
         "type": "string"
      },
      "logoUrl": {
         "description": "The URL to the guild's logo.",
         "title": "Logourl",
         "type": "string"
      },
      "description": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The description of the guild.",
         "title": "Description"
      },
      "world": {
         "description": "The world this guild belongs to.",
         "title": "World",
         "type": "string"
      },
      "founded": {
         "description": "The day the guild was founded.",
         "format": "date",
         "title": "Founded",
         "type": "string"
      },
      "active": {
         "description": "Whether the guild is active or still in formation.",
         "title": "Active",
         "type": "boolean"
      },
      "guildhall": {
         "anyOf": [
            {
               "$ref": "#/$defs/GuildHouse"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The guild's guildhall if any."
      },
      "openApplications": {
         "default": false,
         "description": "Whether applications are open or not.",
         "title": "Openapplications",
         "type": "boolean"
      },
      "activeWar": {
         "description": "Whether the guild is currently in an active war or not.",
         "title": "Activewar",
         "type": "boolean"
      },
      "disbandDate": {
         "anyOf": [
            {
               "format": "date",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The date when the guild will be disbanded if the condition hasn't been meet.",
         "title": "Disbanddate"
      },
      "disbandCondition": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The reason why the guild will get disbanded.",
         "title": "Disbandcondition"
      },
      "homepage": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The guild's homepage, if any.",
         "title": "Homepage"
      },
      "members": {
         "description": "List of guild members.",
         "items": {
            "$ref": "#/$defs/GuildMember"
         },
         "title": "Members",
         "type": "array"
      },
      "invites": {
         "description": "List of invited characters.",
         "items": {
            "$ref": "#/$defs/GuildInvite"
         },
         "title": "Invites",
         "type": "array"
      }
   },
   "$defs": {
      "GuildHouse": {
         "description": "A guildhall owned by a guild.\n\nBy limitation of Tibia.com, the ID of the guildhall is not available.",
         "properties": {
            "name": {
               "description": "The name of the house.",
               "title": "Name",
               "type": "string"
            },
            "paidUntil": {
               "description": "The date the last paid rent is due.",
               "format": "date",
               "title": "Paiduntil",
               "type": "string"
            }
         },
         "required": [
            "name",
            "paidUntil"
         ],
         "title": "GuildHouse",
         "type": "object"
      },
      "GuildInvite": {
         "description": "Represents an invited character.",
         "properties": {
            "name": {
               "description": "The name of the character.",
               "title": "Name",
               "type": "string"
            },
            "invitedOn": {
               "description": "The day when the character was invited.",
               "format": "date",
               "title": "Invitedon",
               "type": "string"
            }
         },
         "required": [
            "name",
            "invitedOn"
         ],
         "title": "GuildInvite",
         "type": "object"
      },
      "GuildMember": {
         "description": "Represents a guild member.",
         "properties": {
            "name": {
               "description": "The name of the character.",
               "title": "Name",
               "type": "string"
            },
            "rank": {
               "description": "The rank the member belongs to",
               "title": "Rank",
               "type": "string"
            },
            "title": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The member's title.",
               "title": "Title"
            },
            "level": {
               "description": "The member's level.",
               "title": "Level",
               "type": "integer"
            },
            "vocation": {
               "description": "The member's vocation.",
               "enum": [
                  "None",
                  "Druid",
                  "Knight",
                  "Paladin",
                  "Sorcerer",
                  "Elder Druid",
                  "Elite Knight",
                  "Royal Paladin",
                  "Master Sorcerer"
               ],
               "title": "Vocation",
               "type": "string"
            },
            "joinedOn": {
               "description": "The day the member joined the guild.",
               "format": "date",
               "title": "Joinedon",
               "type": "string"
            },
            "isOnline": {
               "description": "Whether the member is online or not.",
               "title": "Isonline",
               "type": "boolean"
            }
         },
         "required": [
            "name",
            "rank",
            "level",
            "vocation",
            "joinedOn",
            "isOnline"
         ],
         "title": "GuildMember",
         "type": "object"
      }
   },
   "required": [
      "name",
      "logoUrl",
      "world",
      "founded",
      "active",
      "activeWar",
      "members",
      "invites"
   ]
}

Config:
  • populate_by_name: bool = True

  • alias_generator: function = <function to_camel at 0x73beb93f7e20>

  • use_attribute_docstrings: bool = True

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
  • active (bool)

  • active_war (bool)

  • description (str | None)

  • disband_condition (str | None)

  • disband_date (datetime.date | None)

  • founded (datetime.date)

  • guildhall (tibiapy.models.guild.GuildHouse | None)

  • homepage (str | None)

  • invites (list[tibiapy.models.guild.GuildInvite])

  • logo_url (str)

  • members (list[tibiapy.models.guild.GuildMember])

  • name (str)

  • open_applications (bool)

  • world (str)

field active: bool [Required]

Whether the guild is active or still in formation.

field active_war: bool [Required] (alias 'activeWar')

Whether the guild is currently in an active war or not.

field description: Optional[str] = None

The description of the guild.

field disband_condition: Optional[str] = None (alias 'disbandCondition')

The reason why the guild will get disbanded.

field disband_date: Optional[date] = None (alias 'disbandDate')

The date when the guild will be disbanded if the condition hasn’t been meet.

field founded: date [Required]

The day the guild was founded.

field guildhall: Optional[GuildHouse] = None

The guild’s guildhall if any.

field homepage: Optional[str] = None

The guild’s homepage, if any.

field invites: list[GuildInvite] [Required]

List of invited characters.

field logo_url: str [Required] (alias 'logoUrl')

The URL to the guild’s logo.

field members: list[GuildMember] [Required]

List of guild members.

field name: str [Required]

The name of the guild.

field open_applications: bool = False (alias 'openApplications')

Whether applications are open or not.

field world: str [Required]

The world this guild belongs to.

property leader: GuildMember

Get the leader of the guild.

property member_count: int

The number of members in the guild.

property members_by_rank: dict[str, list[GuildMember]]

Get a mapping of members, grouped by their guild rank.

property online_count: int

The number of online members in the guild.

property online_members: list[GuildMember]

List of currently online members.

property ranks: list[str]

Ranks in their hierarchical order.

property url: str

The URL to the guild’s information page on Tibia.com.

property url_wars: str

The URL to the guild’s wars page on Tibia.com.

Added in version 3.0.0.

property vice_leaders: list[GuildMember]

The vice leader of the guilds.

pydantic model tibiapy.models.GuildEntry[source]

Represents a Tibia guild in the guild list of a world.

Show JSON schema
{
   "title": "GuildEntry",
   "description": "Represents a Tibia guild in the guild list of a world.",
   "type": "object",
   "properties": {
      "name": {
         "description": "The name of the guild.",
         "title": "Name",
         "type": "string"
      },
      "logoUrl": {
         "description": "The URL to the guild's logo.",
         "title": "Logourl",
         "type": "string"
      },
      "description": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The description of the guild.",
         "title": "Description"
      },
      "world": {
         "description": "The world this guild belongs to.",
         "title": "World",
         "type": "string"
      },
      "active": {
         "description": "Whether the guild is active or still in formation.",
         "title": "Active",
         "type": "boolean"
      }
   },
   "required": [
      "name",
      "logoUrl",
      "world",
      "active"
   ]
}

Config:
  • populate_by_name: bool = True

  • alias_generator: function = <function to_camel at 0x73beb93f7e20>

  • use_attribute_docstrings: bool = True

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
  • active (bool)

  • description (str | None)

  • logo_url (str)

  • name (str)

  • world (str)

field active: bool [Required]

Whether the guild is active or still in formation.

field description: Optional[str] = None

The description of the guild.

field logo_url: str [Required] (alias 'logoUrl')

The URL to the guild’s logo.

field name: str [Required]

The name of the guild.

field world: str [Required]

The world this guild belongs to.

property url: str

The URL to the guild’s information page on Tibia.com.

property url_wars: str

The URL to the guild’s wars page on Tibia.com.

Added in version 3.0.0.

pydantic model tibiapy.models.GuildInvite[source]

Represents an invited character.

Show JSON schema
{
   "title": "GuildInvite",
   "description": "Represents an invited character.",
   "type": "object",
   "properties": {
      "name": {
         "description": "The name of the character.",
         "title": "Name",
         "type": "string"
      },
      "invitedOn": {
         "description": "The day when the character was invited.",
         "format": "date",
         "title": "Invitedon",
         "type": "string"
      }
   },
   "required": [
      "name",
      "invitedOn"
   ]
}

Config:
  • populate_by_name: bool = True

  • alias_generator: function = <function to_camel at 0x73beb93f7e20>

  • use_attribute_docstrings: bool = True

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
  • invited_on (datetime.date)

  • name (str)

field invited_on: date [Required] (alias 'invitedOn')

The day when the character was invited.

field name: str [Required]

The name of the character.

property url: str

The URL of the character’s information page on Tibia.com.

pydantic model tibiapy.models.GuildHouse[source]

A guildhall owned by a guild.

By limitation of Tibia.com, the ID of the guildhall is not available.

Show JSON schema
{
   "title": "GuildHouse",
   "description": "A guildhall owned by a guild.\n\nBy limitation of Tibia.com, the ID of the guildhall is not available.",
   "type": "object",
   "properties": {
      "name": {
         "description": "The name of the house.",
         "title": "Name",
         "type": "string"
      },
      "paidUntil": {
         "description": "The date the last paid rent is due.",
         "format": "date",
         "title": "Paiduntil",
         "type": "string"
      }
   },
   "required": [
      "name",
      "paidUntil"
   ]
}

Config:
  • populate_by_name: bool = True

  • alias_generator: function = <function to_camel at 0x73beb93f7e20>

  • use_attribute_docstrings: bool = True

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
  • name (str)

  • paid_until (datetime.date)

field name: str [Required]

The name of the house.

field paid_until: date [Required] (alias 'paidUntil')

The date the last paid rent is due.

pydantic model tibiapy.models.GuildMember[source]

Represents a guild member.

Show JSON schema
{
   "title": "GuildMember",
   "description": "Represents a guild member.",
   "type": "object",
   "properties": {
      "name": {
         "description": "The name of the character.",
         "title": "Name",
         "type": "string"
      },
      "rank": {
         "description": "The rank the member belongs to",
         "title": "Rank",
         "type": "string"
      },
      "title": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The member's title.",
         "title": "Title"
      },
      "level": {
         "description": "The member's level.",
         "title": "Level",
         "type": "integer"
      },
      "vocation": {
         "description": "The member's vocation.",
         "enum": [
            "None",
            "Druid",
            "Knight",
            "Paladin",
            "Sorcerer",
            "Elder Druid",
            "Elite Knight",
            "Royal Paladin",
            "Master Sorcerer"
         ],
         "title": "Vocation",
         "type": "string"
      },
      "joinedOn": {
         "description": "The day the member joined the guild.",
         "format": "date",
         "title": "Joinedon",
         "type": "string"
      },
      "isOnline": {
         "description": "Whether the member is online or not.",
         "title": "Isonline",
         "type": "boolean"
      }
   },
   "required": [
      "name",
      "rank",
      "level",
      "vocation",
      "joinedOn",
      "isOnline"
   ]
}

Config:
  • populate_by_name: bool = True

  • alias_generator: function = <function to_camel at 0x73beb93f7e20>

  • use_attribute_docstrings: bool = True

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
  • is_online (bool)

  • joined_on (datetime.date)

  • level (int)

  • name (str)

  • rank (str)

  • title (str | None)

  • vocation (tibiapy.enums.Vocation)

field is_online: bool [Required] (alias 'isOnline')

Whether the member is online or not.

field joined_on: date [Required] (alias 'joinedOn')

The day the member joined the guild.

field level: int [Required]

The member’s level.

field name: str [Required]

The name of the character.

field rank: str [Required]

The rank the member belongs to

field title: Optional[str] = None

The member’s title.

field vocation: Vocation [Required]

The member’s vocation.

property url: str

The URL of the character’s information page on Tibia.com.

pydantic model tibiapy.models.GuildWars[source]

Represents a guild’s wars.

Show JSON schema
{
   "title": "GuildWars",
   "description": "Represents a guild's wars.",
   "type": "object",
   "properties": {
      "name": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The name of the guild.",
         "title": "Name"
      },
      "isCurrent": {
         "anyOf": [
            {
               "$ref": "#/$defs/GuildWarEntry"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The current war the guild is involved in."
      },
      "history": {
         "description": "The previous wars the guild has been involved in.",
         "items": {
            "$ref": "#/$defs/GuildWarEntry"
         },
         "title": "History",
         "type": "array"
      }
   },
   "$defs": {
      "GuildWarEntry": {
         "description": "Represents a guild war entry.",
         "properties": {
            "guildName": {
               "description": "The name of the guild.",
               "title": "Guildname",
               "type": "string"
            },
            "guildScore": {
               "description": "The number of kills the guild has scored.",
               "title": "Guildscore",
               "type": "integer"
            },
            "guildFee": {
               "description": "The number of gold coins the guild will pay if they lose the war.",
               "title": "Guildfee",
               "type": "integer"
            },
            "opponentName": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The name of the opposing guild. If the guild no longer exist, this will be :obj:`None`.",
               "title": "Opponentname"
            },
            "opponentScore": {
               "description": "The number of kills the opposing guild has scored.",
               "title": "Opponentscore",
               "type": "integer"
            },
            "opponentFee": {
               "description": "The number of gold coins the opposing guild will pay if they lose the war.",
               "title": "Opponentfee",
               "type": "integer"
            },
            "startDate": {
               "anyOf": [
                  {
                     "format": "date",
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The date when the war started.\n\nWhen a war is in progress, the start date is not visible.",
               "title": "Startdate"
            },
            "scoreLimit": {
               "description": "The number of kills needed to win the war.",
               "title": "Scorelimit",
               "type": "integer"
            },
            "duration": {
               "anyOf": [
                  {
                     "format": "duration",
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The set duration of the war.\n\nWhen a war is in progress, the duration is not visible.",
               "title": "Duration"
            },
            "endDate": {
               "anyOf": [
                  {
                     "format": "date",
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The deadline for the war to finish if the score is not reached for wars in progress, or the date when the\nwar ended.",
               "title": "Enddate"
            },
            "winner": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The name of the guild that won.\n\nNote that if the winning guild is disbanded, this may be :obj:`None`.",
               "title": "Winner"
            },
            "surrender": {
               "description": "Whether the losing guild surrendered or not.",
               "title": "Surrender",
               "type": "boolean"
            }
         },
         "required": [
            "guildName",
            "guildScore",
            "guildFee",
            "opponentScore",
            "opponentFee",
            "scoreLimit",
            "surrender"
         ],
         "title": "GuildWarEntry",
         "type": "object"
      }
   },
   "required": [
      "history"
   ]
}

Config:
  • populate_by_name: bool = True

  • alias_generator: function = <function to_camel at 0x73beb93f7e20>

  • use_attribute_docstrings: bool = True

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
  • history (list[tibiapy.models.guild.GuildWarEntry])

  • is_current (tibiapy.models.guild.GuildWarEntry | None)

  • name (str | None)

field history: list[GuildWarEntry] [Required]

The previous wars the guild has been involved in.

field is_current: Optional[GuildWarEntry] = None (alias 'isCurrent')

The current war the guild is involved in.

field name: Optional[str] = None

The name of the guild.

property url: str

The URL of this guild’s war page on Tibia.com.

pydantic model tibiapy.models.GuildWarEntry[source]

Represents a guild war entry.

Show JSON schema
{
   "title": "GuildWarEntry",
   "description": "Represents a guild war entry.",
   "type": "object",
   "properties": {
      "guildName": {
         "description": "The name of the guild.",
         "title": "Guildname",
         "type": "string"
      },
      "guildScore": {
         "description": "The number of kills the guild has scored.",
         "title": "Guildscore",
         "type": "integer"
      },
      "guildFee": {
         "description": "The number of gold coins the guild will pay if they lose the war.",
         "title": "Guildfee",
         "type": "integer"
      },
      "opponentName": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The name of the opposing guild. If the guild no longer exist, this will be :obj:`None`.",
         "title": "Opponentname"
      },
      "opponentScore": {
         "description": "The number of kills the opposing guild has scored.",
         "title": "Opponentscore",
         "type": "integer"
      },
      "opponentFee": {
         "description": "The number of gold coins the opposing guild will pay if they lose the war.",
         "title": "Opponentfee",
         "type": "integer"
      },
      "startDate": {
         "anyOf": [
            {
               "format": "date",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The date when the war started.\n\nWhen a war is in progress, the start date is not visible.",
         "title": "Startdate"
      },
      "scoreLimit": {
         "description": "The number of kills needed to win the war.",
         "title": "Scorelimit",
         "type": "integer"
      },
      "duration": {
         "anyOf": [
            {
               "format": "duration",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The set duration of the war.\n\nWhen a war is in progress, the duration is not visible.",
         "title": "Duration"
      },
      "endDate": {
         "anyOf": [
            {
               "format": "date",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The deadline for the war to finish if the score is not reached for wars in progress, or the date when the\nwar ended.",
         "title": "Enddate"
      },
      "winner": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The name of the guild that won.\n\nNote that if the winning guild is disbanded, this may be :obj:`None`.",
         "title": "Winner"
      },
      "surrender": {
         "description": "Whether the losing guild surrendered or not.",
         "title": "Surrender",
         "type": "boolean"
      }
   },
   "required": [
      "guildName",
      "guildScore",
      "guildFee",
      "opponentScore",
      "opponentFee",
      "scoreLimit",
      "surrender"
   ]
}

Config:
  • populate_by_name: bool = True

  • alias_generator: function = <function to_camel at 0x73beb93f7e20>

  • use_attribute_docstrings: bool = True

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
  • duration (datetime.timedelta | None)

  • end_date (datetime.date | None)

  • guild_fee (int)

  • guild_name (str)

  • guild_score (int)

  • opponent_fee (int)

  • opponent_name (str | None)

  • opponent_score (int)

  • score_limit (int)

  • start_date (datetime.date | None)

  • surrender (bool)

  • winner (str | None)

field duration: Optional[timedelta] = None

The set duration of the war.

When a war is in progress, the duration is not visible.

field end_date: Optional[date] = None (alias 'endDate')

The deadline for the war to finish if the score is not reached for wars in progress, or the date when the war ended.

The deadline for the war to finish if the score is not reached for wars in progress, or the date when the war ended.

field guild_fee: int [Required] (alias 'guildFee')

The number of gold coins the guild will pay if they lose the war.

field guild_name: str [Required] (alias 'guildName')

The name of the guild.

field guild_score: int [Required] (alias 'guildScore')

The number of kills the guild has scored.

field opponent_fee: int [Required] (alias 'opponentFee')

The number of gold coins the opposing guild will pay if they lose the war.

field opponent_name: Optional[str] = None (alias 'opponentName')

The name of the opposing guild. If the guild no longer exist, this will be None.

field opponent_score: int [Required] (alias 'opponentScore')

The number of kills the opposing guild has scored.

field score_limit: int [Required] (alias 'scoreLimit')

The number of kills needed to win the war.

field start_date: Optional[date] = None (alias 'startDate')

The date when the war started.

When a war is in progress, the start date is not visible.

field surrender: bool [Required]

Whether the losing guild surrendered or not.

field winner: Optional[str] = None

The name of the guild that won.

Note that if the winning guild is disbanded, this may be None.

property guild_url: str

The URL to the guild’s information page on Tibia.com.

property opponent_guild_url: str | None

The URL to the opposing guild’s information page on Tibia.com.

Highscores

Models related to Tibia.com’s Highscores section.

pydantic model tibiapy.models.Highscores[source]

Represents the highscores of a world.

Show JSON schema
{
   "title": "Highscores",
   "description": "Represents the highscores of a world.",
   "type": "object",
   "properties": {
      "currentPage": {
         "default": 1,
         "description": "The currently viewed page.",
         "title": "Currentpage",
         "type": "integer"
      },
      "totalPages": {
         "default": 1,
         "description": "The total number of pages.",
         "title": "Totalpages",
         "type": "integer"
      },
      "resultsCount": {
         "default": 0,
         "description": "The total number of entries across all pages.",
         "title": "Resultscount",
         "type": "integer"
      },
      "entries": {
         "default": [],
         "description": "The entries in this page.",
         "items": {
            "$ref": "#/$defs/HighscoresEntry"
         },
         "title": "Entries",
         "type": "array"
      },
      "world": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The world the highscores belong to. If this is :obj:`None`, the highscores shown are for all worlds.",
         "title": "World"
      },
      "category": {
         "description": "The selected category to displays the highscores of.",
         "enum": [
            "ACHIEVEMENTS",
            "AXE_FIGHTING",
            "BOSS_POINTS",
            "CHARM_POINTS",
            "CLUB_FIGHTING",
            "DISTANCE_FIGHTING",
            "DROME_SCORE",
            "EXPERIENCE",
            "FISHING",
            "FIST_FIGHTING",
            "GOSHNARS_TAINT",
            "LOYALTY_POINTS",
            "MAGIC_LEVEL",
            "SHIELDING",
            "SWORD_FIGHTING"
         ],
         "title": "Category",
         "type": "string"
      },
      "vocation": {
         "description": "The selected vocation to filter out values.",
         "enum": [
            "ALL",
            "NONE",
            "KNIGHTS",
            "PALADINS",
            "SORCERERS",
            "DRUIDS"
         ],
         "title": "Vocation",
         "type": "string"
      },
      "battleyeFilter": {
         "anyOf": [
            {
               "enum": [
                  "ANY_WORLD",
                  "INITIALLY_PROTECTED",
                  "PROTECTED",
                  "UNPROTECTED"
               ],
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "description": "The selected BattlEye filter. If :obj:`None`, all worlds will be displayed.\n\nOnly applies for global highscores. Only characters from worlds matching BattlEye protection will be shown.",
         "title": "Battleyefilter"
      },
      "pvpTypesFilter": {
         "description": "The selected PvP types filter. If :obj:`None`, all world will be displayed.\n\nOnly applies for global highscores. Only characters from worlds with the matching PvP type will be shown.",
         "items": {
            "enum": [
               "OPEN_PVP",
               "OPTIONAL_PVP",
               "HARDCORE_PVP",
               "RETRO_OPEN_PVP",
               "RETRO_HARDCORE_PVP"
            ],
            "type": "string"
         },
         "title": "Pvptypesfilter",
         "type": "array",
         "uniqueItems": true
      },
      "lastUpdated": {
         "description": "The time when the shown highscores were last updated. The resolution is 1 minute.",
         "format": "date-time",
         "title": "Lastupdated",
         "type": "string"
      },
      "availableWorlds": {
         "description": "The worlds available for selection.",
         "items": {
            "type": "string"
         },
         "title": "Availableworlds",
         "type": "array"
      }
   },
   "$defs": {
      "HighscoresEntry": {
         "description": "Represents an entry for the highscores.",
         "properties": {
            "name": {
               "description": "The name of the character.",
               "title": "Name",
               "type": "string"
            },
            "rank": {
               "description": "The character's rank in the respective highscores.",
               "title": "Rank",
               "type": "integer"
            },
            "vocation": {
               "description": "The character's vocation.",
               "enum": [
                  "None",
                  "Druid",
                  "Knight",
                  "Paladin",
                  "Sorcerer",
                  "Elder Druid",
                  "Elite Knight",
                  "Royal Paladin",
                  "Master Sorcerer"
               ],
               "title": "Vocation",
               "type": "string"
            },
            "world": {
               "description": "The character's world.",
               "title": "World",
               "type": "string"
            },
            "level": {
               "description": "The character's level.",
               "title": "Level",
               "type": "integer"
            },
            "value": {
               "description": "The character's value for the highscores.",
               "title": "Value",
               "type": "integer"
            }
         },
         "required": [
            "name",
            "rank",
            "vocation",
            "world",
            "level",
            "value"
         ],
         "title": "HighscoresEntry",
         "type": "object"
      }
   },
   "required": [
      "category",
      "vocation",
      "battleyeFilter",
      "pvpTypesFilter",
      "lastUpdated",
      "availableWorlds"
   ]
}

Config:
  • populate_by_name: bool = True

  • alias_generator: function = <function to_camel at 0x73beb93f7e20>

  • use_attribute_docstrings: bool = True

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
  • available_worlds (list[str])

  • battleye_filter (tibiapy.enums.HighscoresBattlEyeType | None)

  • category (tibiapy.enums.HighscoresCategory)

  • current_page (int)

  • entries (list[tibiapy.models.pagination.T])

  • last_updated (datetime.datetime)

  • pvp_types_filter (set[tibiapy.enums.PvpTypeFilter])

  • results_count (int)

  • total_pages (int)

  • vocation (tibiapy.enums.HighscoresProfession)

  • world (str | None)

field available_worlds: list[str] [Required] (alias 'availableWorlds')

The worlds available for selection.

field battleye_filter: Optional[HighscoresBattlEyeType] [Required] (alias 'battleyeFilter')

The selected BattlEye filter. If None, all worlds will be displayed.

Only applies for global highscores. Only characters from worlds matching BattlEye protection will be shown.

field category: HighscoresCategory [Required]

The selected category to displays the highscores of.

field current_page: int = 1 (alias 'currentPage')

The currently viewed page.

field entries: list[T] = []

The entries in this page.

field last_updated: datetime [Required] (alias 'lastUpdated')

The time when the shown highscores were last updated. The resolution is 1 minute.

field pvp_types_filter: set[PvpTypeFilter] [Required] (alias 'pvpTypesFilter')

The selected PvP types filter. If None, all world will be displayed.

Only applies for global highscores. Only characters from worlds with the matching PvP type will be shown.

field results_count: int = 0 (alias 'resultsCount')

The total number of entries across all pages.

field total_pages: int = 1 (alias 'totalPages')

The total number of pages.

field vocation: HighscoresProfession [Required]

The selected vocation to filter out values.

field world: Optional[str] = None

The world the highscores belong to. If this is None, the highscores shown are for all worlds.

get_page_url(page)[source]

Get the URL to a specific page for the current highscores.

Parameters:

page (int) – The page to get the URL for.

Returns:

The URL to the page of the current highscores.

Return type:

str

Raises:

ValueError – The provided page is less or equals than zero.

property from_rank: int

The starting rank of the provided entries.

property next_page_url: str | None

The URL to the next page of the results, if available.

property previous_page_url: str | None

The URL to the previous page of the results, if available.

property to_rank: int

The last rank of the provided entries.

property url: str

The URL to the highscores page on Tibia.com containing the results.

pydantic model tibiapy.models.HighscoresEntry[source]

Represents an entry for the highscores.

Show JSON schema
{
   "title": "HighscoresEntry",
   "description": "Represents an entry for the highscores.",
   "type": "object",
   "properties": {
      "name": {
         "description": "The name of the character.",
         "title": "Name",
         "type": "string"
      },
      "rank": {
         "description": "The character's rank in the respective highscores.",
         "title": "Rank",
         "type": "integer"
      },
      "vocation": {
         "description": "The character's vocation.",
         "enum": [
            "None",
            "Druid",
            "Knight",
            "Paladin",
            "Sorcerer",
            "Elder Druid",
            "Elite Knight",
            "Royal Paladin",
            "Master Sorcerer"
         ],
         "title": "Vocation",
         "type": "string"
      },
      "world": {
         "description": "The character's world.",
         "title": "World",
         "type": "string"
      },
      "level": {
         "description": "The character's level.",
         "title": "Level",
         "type": "integer"
      },
      "value": {
         "description": "The character's value for the highscores.",
         "title": "Value",
         "type": "integer"
      }
   },
   "required": [
      "name",
      "rank",
      "vocation",
      "world",
      "level",
      "value"
   ]
}

Config:
  • populate_by_name: bool = True

  • alias_generator: function = <function to_camel at 0x73beb93f7e20>

  • use_attribute_docstrings: bool = True

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
  • level (int)

  • name (str)

  • rank (int)

  • value (int)

  • vocation (tibiapy.enums.Vocation)

  • world (str)

field level: int [Required]

The character’s level.

field name: str [Required]

The name of the character.

field rank: int [Required]

The character’s rank in the respective highscores.

field value: int [Required]

The character’s value for the highscores.

field vocation: Vocation [Required]

The character’s vocation.

field world: str [Required]

The character’s world.

property url: str

The URL of the character’s information page on Tibia.com.

pydantic model tibiapy.models.LoyaltyHighscoresEntry[source]

Represents an entry for the highscores loyalty points category.

This is a subclass of HighscoresEntry, adding an extra field for title.

Show JSON schema
{
   "title": "LoyaltyHighscoresEntry",
   "description": "Represents an entry for the highscores loyalty points category.\n\nThis is a subclass of :class:`HighscoresEntry`, adding an extra field for title.",
   "type": "object",
   "properties": {
      "name": {
         "description": "The name of the character.",
         "title": "Name",
         "type": "string"
      },
      "rank": {
         "description": "The character's rank in the respective highscores.",
         "title": "Rank",
         "type": "integer"
      },
      "vocation": {
         "description": "The character's vocation.",
         "enum": [
            "None",
            "Druid",
            "Knight",
            "Paladin",
            "Sorcerer",
            "Elder Druid",
            "Elite Knight",
            "Royal Paladin",
            "Master Sorcerer"
         ],
         "title": "Vocation",
         "type": "string"
      },
      "world": {
         "description": "The character's world.",
         "title": "World",
         "type": "string"
      },
      "level": {
         "description": "The character's level.",
         "title": "Level",
         "type": "integer"
      },
      "value": {
         "description": "The character's value for the highscores.",
         "title": "Value",
         "type": "integer"
      },
      "title": {
         "description": "The character's loyalty title.",
         "title": "Title",
         "type": "string"
      }
   },
   "required": [
      "name",
      "rank",
      "vocation",
      "world",
      "level",
      "value",
      "title"
   ]
}

Config:
  • populate_by_name: bool = True

  • alias_generator: function = <function to_camel at 0x73beb93f7e20>

  • use_attribute_docstrings: bool = True

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
  • level ()

  • name ()

  • rank ()

  • title (str)

  • value ()

  • vocation ()

  • world ()

field level: int [Required]

The character’s level.

field name: str [Required]

The name of the character.

field rank: int [Required]

The character’s rank in the respective highscores.

field title: str [Required]

The character’s loyalty title.

field value: int [Required]

The character’s value for the highscores.

field vocation: Vocation [Required]

The character’s vocation.

field world: str [Required]

The character’s world.

property url: str

The URL of the character’s information page on Tibia.com.

Houses

Models related to Tibia.com’s Houses section.

pydantic model tibiapy.models.HousesSection[source]

Represents the house section.

Show JSON schema
{
   "title": "HousesSection",
   "description": "Represents the house section.",
   "type": "object",
   "properties": {
      "world": {
         "description": "The selected world to show houses for.",
         "title": "World",
         "type": "string"
      },
      "town": {
         "description": "The town to show houses for.",
         "title": "Town",
         "type": "string"
      },
      "status": {
         "anyOf": [
            {
               "enum": [
                  "rented",
                  "auctioned"
               ],
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The status to show. If :obj:`None`, any status is shown.",
         "title": "Status"
      },
      "houseType": {
         "description": "The type of houses to show.",
         "enum": [
            "house",
            "guildhall"
         ],
         "title": "Housetype",
         "type": "string"
      },
      "order": {
         "description": "The ordering to use for the results.",
         "enum": [
            "name",
            "size",
            "rent",
            "bid",
            "end"
         ],
         "title": "Order",
         "type": "string"
      },
      "entries": {
         "description": "The houses matching the filters.",
         "items": {
            "$ref": "#/$defs/HouseEntry"
         },
         "title": "Entries",
         "type": "array"
      },
      "availableWorlds": {
         "description": "The list of available worlds to choose from.",
         "items": {
            "type": "string"
         },
         "title": "Availableworlds",
         "type": "array"
      },
      "availableTowns": {
         "description": "The list of available towns to choose from.",
         "items": {
            "type": "string"
         },
         "title": "Availabletowns",
         "type": "array"
      }
   },
   "$defs": {
      "HouseEntry": {
         "description": "Represents a house from the house list in Tibia.com.",
         "properties": {
            "name": {
               "description": "The name of the house.",
               "title": "Name",
               "type": "string"
            },
            "id": {
               "description": "The internal ID of the house. This is used on the website to identify houses.",
               "title": "Id",
               "type": "integer"
            },
            "world": {
               "description": "The name of the world the house belongs to.",
               "title": "World",
               "type": "string"
            },
            "status": {
               "description": "The current status of the house.",
               "enum": [
                  "rented",
                  "auctioned"
               ],
               "title": "Status",
               "type": "string"
            },
            "type": {
               "description": "The type of house.",
               "enum": [
                  "house",
                  "guildhall"
               ],
               "title": "Type",
               "type": "string"
            },
            "town": {
               "description": "The town where the house is located.",
               "title": "Town",
               "type": "string"
            },
            "size": {
               "description": "The size of the house in SQM.",
               "title": "Size",
               "type": "integer"
            },
            "rent": {
               "description": "The monthly cost of the house, in gold coins.",
               "title": "Rent",
               "type": "integer"
            },
            "timeLeft": {
               "anyOf": [
                  {
                     "format": "duration",
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The number of days or hours left until the bid ends, if it has started.\nThis is not an exact measure, it is rounded to hours or days.",
               "title": "Timeleft"
            },
            "highestBid": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The highest bid so far, if the auction has started.",
               "title": "Highestbid"
            }
         },
         "required": [
            "name",
            "id",
            "world",
            "status",
            "type",
            "town",
            "size",
            "rent"
         ],
         "title": "HouseEntry",
         "type": "object"
      }
   },
   "required": [
      "world",
      "town",
      "houseType",
      "order",
      "entries",
      "availableWorlds",
      "availableTowns"
   ]
}

Config:
  • populate_by_name: bool = True

  • alias_generator: function = <function to_camel at 0x73beb93f7e20>

  • use_attribute_docstrings: bool = True

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
  • available_towns (list[str])

  • available_worlds (list[str])

  • entries (list[tibiapy.models.house.HouseEntry])

  • house_type (tibiapy.enums.HouseType)

  • order (tibiapy.enums.HouseOrder)

  • status (tibiapy.enums.HouseStatus | None)

  • town (str)

  • world (str)

field available_towns: list[str] [Required] (alias 'availableTowns')

The list of available towns to choose from.

field available_worlds: list[str] [Required] (alias 'availableWorlds')

The list of available worlds to choose from.

field entries: list[HouseEntry] [Required]

The houses matching the filters.

field house_type: HouseType [Required] (alias 'houseType')

The type of houses to show.

field order: HouseOrder [Required]

The ordering to use for the results.

field status: Optional[HouseStatus] = None

The status to show. If None, any status is shown.

field town: str [Required]

The town to show houses for.

field world: str [Required]

The selected world to show houses for.

property url: str

Get the URL to the houses section with the current parameters.

pydantic model tibiapy.models.House[source]

Represents a house in a specific world.

Show JSON schema
{
   "title": "House",
   "description": "Represents a house in a specific world.",
   "type": "object",
   "properties": {
      "name": {
         "description": "The name of the house.",
         "title": "Name",
         "type": "string"
      },
      "id": {
         "description": "The internal ID of the house. This is used on the website to identify houses.",
         "title": "Id",
         "type": "integer"
      },
      "world": {
         "description": "The name of the world the house belongs to.",
         "title": "World",
         "type": "string"
      },
      "status": {
         "description": "The current status of the house.",
         "enum": [
            "rented",
            "auctioned"
         ],
         "title": "Status",
         "type": "string"
      },
      "type": {
         "description": "The type of the house.",
         "enum": [
            "house",
            "guildhall"
         ],
         "title": "Type",
         "type": "string"
      },
      "imageUrl": {
         "description": "The URL to the house's minimap image.",
         "title": "Imageurl",
         "type": "string"
      },
      "beds": {
         "description": "The number of beds the house has.",
         "title": "Beds",
         "type": "integer"
      },
      "size": {
         "description": "The number of SQM the house has.",
         "title": "Size",
         "type": "integer"
      },
      "rent": {
         "description": "The monthly cost paid for the house, in gold coins.",
         "title": "Rent",
         "type": "integer"
      },
      "owner": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The current owner of the house, if any.",
         "title": "Owner"
      },
      "ownerSex": {
         "anyOf": [
            {
               "enum": [
                  "male",
                  "female"
               ],
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The sex of the owner of the house, if applicable.",
         "title": "Ownersex"
      },
      "paidUntil": {
         "anyOf": [
            {
               "format": "date-time",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The date the last paid rent is due.",
         "title": "Paiduntil"
      },
      "transferDate": {
         "anyOf": [
            {
               "format": "date-time",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The date when the owner will move out of the house, if applicable.",
         "title": "Transferdate"
      },
      "transferRecipient": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The character who will receive the house when the owner moves, if applicable.",
         "title": "Transferrecipient"
      },
      "transferPrice": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The price that will be paid from the transferee to the owner for the house transfer.",
         "title": "Transferprice"
      },
      "transferAccepted": {
         "anyOf": [
            {
               "type": "boolean"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Whether the house transfer has already been accepted or not.",
         "title": "Transferaccepted"
      },
      "highestBid": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The currently highest bid on the house if it is being auctioned.",
         "title": "Highestbid"
      },
      "highestBidder": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The character that holds the highest bid.",
         "title": "Highestbidder"
      },
      "auctionEnd": {
         "anyOf": [
            {
               "format": "date-time",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The date when the auction will end.",
         "title": "Auctionend"
      }
   },
   "required": [
      "name",
      "id",
      "world",
      "status",
      "type",
      "imageUrl",
      "beds",
      "size",
      "rent"
   ]
}

Config:
  • populate_by_name: bool = True

  • alias_generator: function = <function to_camel at 0x73beb93f7e20>

  • use_attribute_docstrings: bool = True

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
  • auction_end (datetime.datetime | None)

  • beds (int)

  • highest_bid (int | None)

  • highest_bidder (str | None)

  • id (int)

  • image_url (str)

  • name (str)

  • owner (str | None)

  • owner_sex (tibiapy.enums.Sex | None)

  • paid_until (datetime.datetime | None)

  • rent (int)

  • size (int)

  • status (tibiapy.enums.HouseStatus)

  • transfer_accepted (bool | None)

  • transfer_date (datetime.datetime | None)

  • transfer_price (int | None)

  • transfer_recipient (str | None)

  • type (tibiapy.enums.HouseType)

  • world (str)

field auction_end: Optional[datetime] = None (alias 'auctionEnd')

The date when the auction will end.

field beds: int [Required]

The number of beds the house has.

field highest_bid: Optional[int] = None (alias 'highestBid')

The currently highest bid on the house if it is being auctioned.

field highest_bidder: Optional[str] = None (alias 'highestBidder')

The character that holds the highest bid.

field id: int [Required]

The internal ID of the house. This is used on the website to identify houses.

field image_url: str [Required] (alias 'imageUrl')

The URL to the house’s minimap image.

field name: str [Required]

The name of the house.

field owner: Optional[str] = None

The current owner of the house, if any.

field owner_sex: Optional[Sex] = None (alias 'ownerSex')

The sex of the owner of the house, if applicable.

field paid_until: Optional[datetime] = None (alias 'paidUntil')

The date the last paid rent is due.

field rent: int [Required]

The monthly cost paid for the house, in gold coins.

field size: int [Required]

The number of SQM the house has.

field status: HouseStatus [Required]

The current status of the house.

field transfer_accepted: Optional[bool] = None (alias 'transferAccepted')

Whether the house transfer has already been accepted or not.

field transfer_date: Optional[datetime] = None (alias 'transferDate')

The date when the owner will move out of the house, if applicable.

field transfer_price: Optional[int] = None (alias 'transferPrice')

The price that will be paid from the transferee to the owner for the house transfer.

field transfer_recipient: Optional[str] = None (alias 'transferRecipient')

The character who will receive the house when the owner moves, if applicable.

field type: HouseType [Required]

The type of the house.

field world: str [Required]

The name of the world the house belongs to.

property highest_bidder_url: str | None

The URL to the Tibia.com page of the character with the highest bid, if applicable.

property owner_url: str | None

The URL to the Tibia.com page of the house’s owner, if applicable.

property transferee_url: str | None

The URL to the Tibia.com page of the character receiving the house, if applicable.

property url: str

The URL to the Tibia.com page of the house.

pydantic model tibiapy.models.HouseEntry[source]

Represents a house from the house list in Tibia.com.

Show JSON schema
{
   "title": "HouseEntry",
   "description": "Represents a house from the house list in Tibia.com.",
   "type": "object",
   "properties": {
      "name": {
         "description": "The name of the house.",
         "title": "Name",
         "type": "string"
      },
      "id": {
         "description": "The internal ID of the house. This is used on the website to identify houses.",
         "title": "Id",
         "type": "integer"
      },
      "world": {
         "description": "The name of the world the house belongs to.",
         "title": "World",
         "type": "string"
      },
      "status": {
         "description": "The current status of the house.",
         "enum": [
            "rented",
            "auctioned"
         ],
         "title": "Status",
         "type": "string"
      },
      "type": {
         "description": "The type of house.",
         "enum": [
            "house",
            "guildhall"
         ],
         "title": "Type",
         "type": "string"
      },
      "town": {
         "description": "The town where the house is located.",
         "title": "Town",
         "type": "string"
      },
      "size": {
         "description": "The size of the house in SQM.",
         "title": "Size",
         "type": "integer"
      },
      "rent": {
         "description": "The monthly cost of the house, in gold coins.",
         "title": "Rent",
         "type": "integer"
      },
      "timeLeft": {
         "anyOf": [
            {
               "format": "duration",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The number of days or hours left until the bid ends, if it has started.\nThis is not an exact measure, it is rounded to hours or days.",
         "title": "Timeleft"
      },
      "highestBid": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The highest bid so far, if the auction has started.",
         "title": "Highestbid"
      }
   },
   "required": [
      "name",
      "id",
      "world",
      "status",
      "type",
      "town",
      "size",
      "rent"
   ]
}

Config:
  • populate_by_name: bool = True

  • alias_generator: function = <function to_camel at 0x73beb93f7e20>

  • use_attribute_docstrings: bool = True

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
  • highest_bid (int | None)

  • id (int)

  • name (str)

  • rent (int)

  • size (int)

  • status (tibiapy.enums.HouseStatus)

  • time_left (datetime.timedelta | None)

  • town (str)

  • type (tibiapy.enums.HouseType)

  • world (str)

field highest_bid: Optional[int] = None (alias 'highestBid')

The highest bid so far, if the auction has started.

field id: int [Required]

The internal ID of the house. This is used on the website to identify houses.

field name: str [Required]

The name of the house.

field rent: int [Required]

The monthly cost of the house, in gold coins.

field size: int [Required]

The size of the house in SQM.

field status: HouseStatus [Required]

The current status of the house.

field time_left: Optional[timedelta] = None (alias 'timeLeft')

The number of days or hours left until the bid ends, if it has started. This is not an exact measure, it is rounded to hours or days.

The number of days or hours left until the bid ends, if it has started. This is not an exact measure, it is rounded to hours or days.

field town: str [Required]

The town where the house is located.

field type: HouseType [Required]

The type of house.

field world: str [Required]

The name of the world the house belongs to.

property url: str

The URL to the Tibia.com page of the house.

Leaderboard

Models related to Tibia.com’s Leaderboard section.

pydantic model tibiapy.models.Leaderboard[source]

Represents the Tibiadrome leaderboards.

Show JSON schema
{
   "title": "Leaderboard",
   "description": "Represents the Tibiadrome leaderboards.",
   "type": "object",
   "properties": {
      "currentPage": {
         "default": 1,
         "description": "The currently viewed page.",
         "title": "Currentpage",
         "type": "integer"
      },
      "totalPages": {
         "default": 1,
         "description": "The total number of pages.",
         "title": "Totalpages",
         "type": "integer"
      },
      "resultsCount": {
         "default": 0,
         "description": "The total number of entries across all pages.",
         "title": "Resultscount",
         "type": "integer"
      },
      "entries": {
         "default": [],
         "description": "The entries in this page.",
         "items": {
            "$ref": "#/$defs/LeaderboardEntry"
         },
         "title": "Entries",
         "type": "array"
      },
      "world": {
         "description": "The world this leaderboards are for.",
         "title": "World",
         "type": "string"
      },
      "availableWorlds": {
         "description": "The worlds available for selection.",
         "items": {
            "type": "string"
         },
         "title": "Availableworlds",
         "type": "array"
      },
      "rotation": {
         "$ref": "#/$defs/LeaderboardRotation",
         "description": "The rotation this leaderboards' entries are for."
      },
      "availableRotations": {
         "description": "The available rotations for selection.",
         "items": {
            "$ref": "#/$defs/LeaderboardRotation"
         },
         "title": "Availablerotations",
         "type": "array"
      },
      "lastUpdated": {
         "anyOf": [
            {
               "format": "date-time",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The time when the shown leaderboards were last updated. The resolution is 1 minute.\n\nOnly available for the latest resolution.",
         "title": "Lastupdated"
      }
   },
   "$defs": {
      "LeaderboardEntry": {
         "description": "Represents a character in the Tibiadrome leaderboards.",
         "properties": {
            "name": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The name of the character in the leaderboard. If ``None``, the character has been deleted.",
               "title": "Name"
            },
            "rank": {
               "description": "The rank of this entry.",
               "title": "Rank",
               "type": "integer"
            },
            "dromeLevel": {
               "description": "The Tibia Drome level of this entry.",
               "title": "Dromelevel",
               "type": "integer"
            }
         },
         "required": [
            "rank",
            "dromeLevel"
         ],
         "title": "LeaderboardEntry",
         "type": "object"
      },
      "LeaderboardRotation": {
         "description": "A Tibiadrome leaderboards rotation.",
         "properties": {
            "rotationId": {
               "description": "The internal ID of the rotation.",
               "title": "Rotationid",
               "type": "integer"
            },
            "isCurrent": {
               "description": "Whether this is the currently running rotation or not.",
               "title": "Iscurrent",
               "type": "boolean"
            },
            "endDate": {
               "description": "The date and time when this rotation ends.",
               "format": "date-time",
               "title": "Enddate",
               "type": "string"
            }
         },
         "required": [
            "rotationId",
            "isCurrent",
            "endDate"
         ],
         "title": "LeaderboardRotation",
         "type": "object"
      }
   },
   "required": [
      "world",
      "availableWorlds",
      "rotation",
      "availableRotations"
   ]
}

Config:
  • populate_by_name: bool = True

  • alias_generator: function = <function to_camel at 0x73beb93f7e20>

  • use_attribute_docstrings: bool = True

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
  • available_rotations (list[tibiapy.models.leaderboard.LeaderboardRotation])

  • available_worlds (list[str])

  • current_page (int)

  • entries (list[tibiapy.models.pagination.T])

  • last_updated (datetime.datetime | None)

  • results_count (int)

  • rotation (tibiapy.models.leaderboard.LeaderboardRotation)

  • total_pages (int)

  • world (str)

field available_rotations: list[LeaderboardRotation] [Required] (alias 'availableRotations')

The available rotations for selection.

field available_worlds: list[str] [Required] (alias 'availableWorlds')

The worlds available for selection.

field current_page: int = 1 (alias 'currentPage')

The currently viewed page.

field entries: list[T] = []

The entries in this page.

field last_updated: Optional[datetime] = None (alias 'lastUpdated')

The time when the shown leaderboards were last updated. The resolution is 1 minute.

Only available for the latest resolution.

field results_count: int = 0 (alias 'resultsCount')

The total number of entries across all pages.

field rotation: LeaderboardRotation [Required]

The rotation this leaderboards’ entries are for.

field total_pages: int = 1 (alias 'totalPages')

The total number of pages.

field world: str [Required]

The world this leaderboards are for.

get_page_url(page)[source]

Get the URL of the leaderboard at a specific page, with the current date parameters.

Parameters:

page (int) – The desired page.

Returns:

The URL to the desired page.

Return type:

str

Raises:

ValueError – If the specified page is zer or less.

property next_page_url: str | None

The URL to the next page of the results, if available.

property previous_page_url: str | None

The URL to the previous page of the results, if available.

property url: str

The URL to the current leaderboard.

pydantic model tibiapy.models.LeaderboardRotation[source]

A Tibiadrome leaderboards rotation.

Show JSON schema
{
   "title": "LeaderboardRotation",
   "description": "A Tibiadrome leaderboards rotation.",
   "type": "object",
   "properties": {
      "rotationId": {
         "description": "The internal ID of the rotation.",
         "title": "Rotationid",
         "type": "integer"
      },
      "isCurrent": {
         "description": "Whether this is the currently running rotation or not.",
         "title": "Iscurrent",
         "type": "boolean"
      },
      "endDate": {
         "description": "The date and time when this rotation ends.",
         "format": "date-time",
         "title": "Enddate",
         "type": "string"
      }
   },
   "required": [
      "rotationId",
      "isCurrent",
      "endDate"
   ]
}

Config:
  • populate_by_name: bool = True

  • alias_generator: function = <function to_camel at 0x73beb93f7e20>

  • use_attribute_docstrings: bool = True

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
  • end_date (datetime.datetime)

  • is_current (bool)

  • rotation_id (int)

field end_date: datetime [Required] (alias 'endDate')

The date and time when this rotation ends.

field is_current: bool [Required] (alias 'isCurrent')

Whether this is the currently running rotation or not.

field rotation_id: int [Required] (alias 'rotationId')

The internal ID of the rotation.

pydantic model tibiapy.models.LeaderboardEntry[source]

Represents a character in the Tibiadrome leaderboards.

Show JSON schema
{
   "title": "LeaderboardEntry",
   "description": "Represents a character in the Tibiadrome leaderboards.",
   "type": "object",
   "properties": {
      "name": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The name of the character in the leaderboard. If ``None``, the character has been deleted.",
         "title": "Name"
      },
      "rank": {
         "description": "The rank of this entry.",
         "title": "Rank",
         "type": "integer"
      },
      "dromeLevel": {
         "description": "The Tibia Drome level of this entry.",
         "title": "Dromelevel",
         "type": "integer"
      }
   },
   "required": [
      "rank",
      "dromeLevel"
   ]
}

Config:
  • populate_by_name: bool = True

  • alias_generator: function = <function to_camel at 0x73beb93f7e20>

  • use_attribute_docstrings: bool = True

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
  • drome_level (int)

  • name (str | None)

  • rank (int)

field drome_level: int [Required] (alias 'dromeLevel')

The Tibia Drome level of this entry.

field name: Optional[str] = None

The name of the character in the leaderboard. If None, the character has been deleted.

field rank: int [Required]

The rank of this entry.

property url: str | None

The URL of the character, if available.

Forums

Models related to Tibia.com’s Forum section.

pydantic model tibiapy.models.CMPostArchive[source]

Represents the CM Post Archive.

The CM Post Archive is a collection of posts made in the forum by community managers.

Show JSON schema
{
   "title": "CMPostArchive",
   "description": "Represents the CM Post Archive.\n\nThe CM Post Archive is a collection of posts made in the forum by community managers.",
   "type": "object",
   "properties": {
      "currentPage": {
         "default": 1,
         "description": "The currently viewed page.",
         "title": "Currentpage",
         "type": "integer"
      },
      "totalPages": {
         "default": 1,
         "description": "The total number of pages.",
         "title": "Totalpages",
         "type": "integer"
      },
      "resultsCount": {
         "default": 0,
         "description": "The total number of entries across all pages.",
         "title": "Resultscount",
         "type": "integer"
      },
      "entries": {
         "default": [],
         "description": "The list of posts for the selected range.",
         "items": {
            "$ref": "#/$defs/CMPost"
         },
         "title": "Entries",
         "type": "array"
      },
      "fromDate": {
         "description": "The start date of the displayed posts.",
         "format": "date",
         "title": "Fromdate",
         "type": "string"
      },
      "toDate": {
         "description": "The end date of the displayed posts.",
         "format": "date",
         "title": "Todate",
         "type": "string"
      }
   },
   "$defs": {
      "CMPost": {
         "description": "Represents a CM Post entry.",
         "properties": {
            "postId": {
               "description": "The ID of the post.",
               "title": "Postid",
               "type": "integer"
            },
            "postedOn": {
               "description": "The date when the post was made.",
               "format": "date-time",
               "title": "Postedon",
               "type": "string"
            },
            "board": {
               "description": "The name of the board where the post was made.",
               "title": "Board",
               "type": "string"
            },
            "threadTitle": {
               "description": "The title of the thread where the post is.",
               "title": "Threadtitle",
               "type": "string"
            }
         },
         "required": [
            "postId",
            "postedOn",
            "board",
            "threadTitle"
         ],
         "title": "CMPost",
         "type": "object"
      }
   },
   "required": [
      "fromDate",
      "toDate"
   ]
}

Config:
  • populate_by_name: bool = True

  • alias_generator: function = <function to_camel at 0x73beb93f7e20>

  • use_attribute_docstrings: bool = True

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
  • current_page (int)

  • entries (list[tibiapy.models.forum.CMPost])

  • from_date (datetime.date)

  • results_count (int)

  • to_date (datetime.date)

  • total_pages (int)

field current_page: int = 1 (alias 'currentPage')

The currently viewed page.

field entries: list[CMPost] = []

The list of posts for the selected range.

field from_date: date [Required] (alias 'fromDate')

The start date of the displayed posts.

field results_count: int = 0 (alias 'resultsCount')

The total number of entries across all pages.

field to_date: date [Required] (alias 'toDate')

The end date of the displayed posts.

field total_pages: int = 1 (alias 'totalPages')

The total number of pages.

get_page_url(page)[source]

Get the URL of the CM Post Archive at a specific page, with the current date parameters.

Parameters:

page (int) – The desired page.

Returns:

The URL to the desired page.

Return type:

str

property next_page_url: str | None

The URL to the next page of the results, if available.

property previous_page_url: str | None

The URL to the previous page of the results, if available.

property url: str

The URL of the CM Post Archive with the current parameters.

pydantic model tibiapy.models.ForumSection[source]

A forum section, containing a list of boards.

Show JSON schema
{
   "title": "ForumSection",
   "description": "A forum section, containing a list of boards.",
   "type": "object",
   "properties": {
      "sectionId": {
         "description": "The internal ID of the section.",
         "title": "Sectionid",
         "type": "integer"
      },
      "entries": {
         "description": "The boards in the forum section.",
         "items": {
            "$ref": "#/$defs/BoardEntry"
         },
         "title": "Entries",
         "type": "array"
      }
   },
   "$defs": {
      "BoardEntry": {
         "description": "Represents a board in the list of boards.\n\nThis is the board information available when viewing a section (e.g. World, Trade, Community)",
         "properties": {
            "boardId": {
               "description": "The board's internal id.",
               "title": "Boardid",
               "type": "integer"
            },
            "name": {
               "description": "The name of the board.",
               "title": "Name",
               "type": "string"
            },
            "description": {
               "description": "The description of the board.",
               "title": "Description",
               "type": "string"
            },
            "posts": {
               "description": "The number of posts in this board.",
               "title": "Posts",
               "type": "integer"
            },
            "threads": {
               "description": "The number of threads in this board.",
               "title": "Threads",
               "type": "integer"
            },
            "lastPost": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/LastPost"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The information of the last post made in this board."
            }
         },
         "required": [
            "boardId",
            "name",
            "description",
            "posts",
            "threads"
         ],
         "title": "BoardEntry",
         "type": "object"
      },
      "LastPost": {
         "description": "Represents a forum thread.",
         "properties": {
            "postId": {
               "description": "The internal id of the post.",
               "title": "Postid",
               "type": "integer"
            },
            "author": {
               "description": "The name of the character that made the last post.",
               "title": "Author",
               "type": "string"
            },
            "postedOn": {
               "description": "The date when the last post was made.",
               "format": "date-time",
               "title": "Postedon",
               "type": "string"
            },
            "isAuthorDeleted": {
               "description": "Whether the last post's author is a character that is already deleted.",
               "title": "Isauthordeleted",
               "type": "boolean"
            },
            "isAuthorTraded": {
               "description": "Whether the last post's author was recently traded.",
               "title": "Isauthortraded",
               "type": "boolean"
            }
         },
         "required": [
            "postId",
            "author",
            "postedOn",
            "isAuthorDeleted",
            "isAuthorTraded"
         ],
         "title": "LastPost",
         "type": "object"
      }
   },
   "required": [
      "sectionId",
      "entries"
   ]
}

Config:
  • populate_by_name: bool = True

  • alias_generator: function = <function to_camel at 0x73beb93f7e20>

  • use_attribute_docstrings: bool = True

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
  • entries (list[tibiapy.models.forum.BoardEntry])

  • section_id (int)

field entries: list[BoardEntry] [Required]

The boards in the forum section.

field section_id: int [Required] (alias 'sectionId')

The internal ID of the section.

property url: str

The URL to this forum section.

pydantic model tibiapy.models.ForumAnnouncement[source]

Represents a forum announcement.

These are a special kind of thread that are shown at the top of boards. They cannot be replied to, and they show no view counts.

Show JSON schema
{
   "title": "ForumAnnouncement",
   "description": "Represents a forum announcement.\n\nThese are a special kind of thread that are shown at the top of boards.\nThey cannot be replied to, and they show no view counts.",
   "type": "object",
   "properties": {
      "announcementId": {
         "description": "The id of the announcement.",
         "title": "Announcementid",
         "type": "integer"
      },
      "board": {
         "description": "The board this thread belongs to.",
         "title": "Board",
         "type": "string"
      },
      "section": {
         "description": "The board section this thread belongs to.",
         "title": "Section",
         "type": "string"
      },
      "boardId": {
         "description": "The internal id of the board the post is in.",
         "title": "Boardid",
         "type": "integer"
      },
      "sectionId": {
         "description": "The internal id of the section the post is in.",
         "title": "Sectionid",
         "type": "integer"
      },
      "author": {
         "$ref": "#/$defs/ForumAuthor",
         "description": "The author of the announcement."
      },
      "title": {
         "description": "The title of the announcement.",
         "title": "Title",
         "type": "string"
      },
      "content": {
         "description": "The HTML content of the announcement.",
         "title": "Content",
         "type": "string"
      },
      "startDate": {
         "description": "The starting date of the announcement.",
         "format": "date-time",
         "title": "Startdate",
         "type": "string"
      },
      "endDate": {
         "description": "The end date of the announcement.",
         "format": "date-time",
         "title": "Enddate",
         "type": "string"
      }
   },
   "$defs": {
      "ForumAuthor": {
         "description": "Represents a post's author.",
         "properties": {
            "name": {
               "description": "The name of the character, author of the post.",
               "title": "Name",
               "type": "string"
            },
            "level": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The level of the character.",
               "title": "Level"
            },
            "world": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The world the character belongs to.",
               "title": "World"
            },
            "position": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The character's position, if any.",
               "title": "Position"
            },
            "title": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The character's selected title, if any.",
               "title": "Title"
            },
            "vocation": {
               "anyOf": [
                  {
                     "enum": [
                        "None",
                        "Druid",
                        "Knight",
                        "Paladin",
                        "Sorcerer",
                        "Elder Druid",
                        "Elite Knight",
                        "Royal Paladin",
                        "Master Sorcerer"
                     ],
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The vocation of the character.",
               "title": "Vocation"
            },
            "guild": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/GuildMembership"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The guild the author belongs to, if any."
            },
            "posts": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The number of posts this character has made.",
               "title": "Posts"
            },
            "isAuthorDeleted": {
               "default": false,
               "description": "Whether the author is deleted or not.",
               "title": "Isauthordeleted",
               "type": "boolean"
            },
            "isAuthorTraded": {
               "default": false,
               "description": "Whether the author is traded or not.",
               "title": "Isauthortraded",
               "type": "boolean"
            }
         },
         "required": [
            "name"
         ],
         "title": "ForumAuthor",
         "type": "object"
      },
      "GuildMembership": {
         "description": "The guild information of a character.",
         "properties": {
            "name": {
               "description": "The name of the guild.",
               "title": "Name",
               "type": "string"
            },
            "rank": {
               "description": "The name of the rank the member has.",
               "title": "Rank",
               "type": "string"
            },
            "title": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The title of the member in the guild. This is only available for characters in the forums section.",
               "title": "Title"
            }
         },
         "required": [
            "name",
            "rank"
         ],
         "title": "GuildMembership",
         "type": "object"
      }
   },
   "required": [
      "announcementId",
      "board",
      "section",
      "boardId",
      "sectionId",
      "author",
      "title",
      "content",
      "startDate",
      "endDate"
   ]
}

Config:
  • populate_by_name: bool = True

  • alias_generator: function = <function to_camel at 0x73beb93f7e20>

  • use_attribute_docstrings: bool = True

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
  • announcement_id (int)

  • author (tibiapy.models.forum.ForumAuthor)

  • board (str)

  • board_id (int)

  • content (str)

  • end_date (datetime.datetime)

  • section (str)

  • section_id (int)

  • start_date (datetime.datetime)

  • title (str)

field announcement_id: int [Required] (alias 'announcementId')

The id of the announcement.

field author: ForumAuthor [Required]

The author of the announcement.

field board: str [Required]

The board this thread belongs to.

field board_id: int [Required] (alias 'boardId')

The internal id of the board the post is in.

field content: str [Required]

The HTML content of the announcement.

field end_date: datetime [Required] (alias 'endDate')

The end date of the announcement.

field section: str [Required]

The board section this thread belongs to.

field section_id: int [Required] (alias 'sectionId')

The internal id of the section the post is in.

field start_date: datetime [Required] (alias 'startDate')

The starting date of the announcement.

field title: str [Required]

The title of the announcement.

property url: str

Get the URL to this announcement.

pydantic model tibiapy.models.ForumBoard[source]

Represents a forum’s board.

Show JSON schema
{
   "title": "ForumBoard",
   "description": "Represents a forum's board.",
   "type": "object",
   "properties": {
      "boardId": {
         "description": "The ID of the board.",
         "title": "Boardid",
         "type": "integer"
      },
      "currentPage": {
         "default": 1,
         "description": "The currently viewed page.",
         "title": "Currentpage",
         "type": "integer"
      },
      "totalPages": {
         "default": 1,
         "description": "The total number of pages.",
         "title": "Totalpages",
         "type": "integer"
      },
      "resultsCount": {
         "default": 0,
         "description": "The total number of entries across all pages.",
         "title": "Resultscount",
         "type": "integer"
      },
      "entries": {
         "description": "The list of threads currently visible.",
         "items": {
            "$ref": "#/$defs/ThreadEntry"
         },
         "title": "Entries",
         "type": "array"
      },
      "name": {
         "description": "The name of the board.",
         "title": "Name",
         "type": "string"
      },
      "section": {
         "description": "The section of the board.",
         "title": "Section",
         "type": "string"
      },
      "sectionId": {
         "description": "The internal ID of the section the board belongs to.",
         "title": "Sectionid",
         "type": "integer"
      },
      "age": {
         "description": "The maximum age of the displayed threads, in days.\n\n-1 means all threads will be shown.",
         "title": "Age",
         "type": "integer"
      },
      "announcements": {
         "description": "The list of announcements currently visible.",
         "items": {
            "$ref": "#/$defs/AnnouncementEntry"
         },
         "title": "Announcements",
         "type": "array"
      }
   },
   "$defs": {
      "AnnouncementEntry": {
         "description": "Represents an announcement in the forum boards.",
         "properties": {
            "announcementId": {
               "description": "The internal id of the announcement.",
               "title": "Announcementid",
               "type": "integer"
            },
            "title": {
               "description": "The title of the announcement.",
               "title": "Title",
               "type": "string"
            },
            "announcementAuthor": {
               "description": "The character that made the announcement.",
               "title": "Announcementauthor",
               "type": "string"
            }
         },
         "required": [
            "announcementId",
            "title",
            "announcementAuthor"
         ],
         "title": "AnnouncementEntry",
         "type": "object"
      },
      "ForumEmoticon": {
         "description": "Represents a forum's emoticon.",
         "properties": {
            "name": {
               "description": "The emoticon's name.",
               "title": "Name",
               "type": "string"
            },
            "url": {
               "description": "The URL to the emoticon's image.",
               "title": "Url",
               "type": "string"
            }
         },
         "required": [
            "name",
            "url"
         ],
         "title": "ForumEmoticon",
         "type": "object"
      },
      "LastPost": {
         "description": "Represents a forum thread.",
         "properties": {
            "postId": {
               "description": "The internal id of the post.",
               "title": "Postid",
               "type": "integer"
            },
            "author": {
               "description": "The name of the character that made the last post.",
               "title": "Author",
               "type": "string"
            },
            "postedOn": {
               "description": "The date when the last post was made.",
               "format": "date-time",
               "title": "Postedon",
               "type": "string"
            },
            "isAuthorDeleted": {
               "description": "Whether the last post's author is a character that is already deleted.",
               "title": "Isauthordeleted",
               "type": "boolean"
            },
            "isAuthorTraded": {
               "description": "Whether the last post's author was recently traded.",
               "title": "Isauthortraded",
               "type": "boolean"
            }
         },
         "required": [
            "postId",
            "author",
            "postedOn",
            "isAuthorDeleted",
            "isAuthorTraded"
         ],
         "title": "LastPost",
         "type": "object"
      },
      "ThreadEntry": {
         "description": "Represents a thread in a forum board.",
         "properties": {
            "threadId": {
               "description": "The internal id of the thread.",
               "title": "Threadid",
               "type": "integer"
            },
            "title": {
               "description": "The title of the thread.",
               "title": "Title",
               "type": "string"
            },
            "threadStarter": {
               "description": "The character that started the thread.",
               "title": "Threadstarter",
               "type": "string"
            },
            "threadStarterTraded": {
               "description": "Whether the thread starter was recently traded or not.",
               "title": "Threadstartertraded",
               "type": "boolean"
            },
            "threadStarterDeleted": {
               "description": "Whether the thread starter was recently deleted or not.",
               "title": "Threadstarterdeleted",
               "type": "boolean"
            },
            "replies": {
               "description": "The number of replies.",
               "title": "Replies",
               "type": "integer"
            },
            "views": {
               "description": "The number of views.",
               "title": "Views",
               "type": "integer"
            },
            "lastPost": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/LastPost"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The information of the last post made in this board."
            },
            "status": {
               "$ref": "#/$defs/ThreadStatus",
               "description": "The status of the thread."
            },
            "statusIcon": {
               "description": "The URL of the icon displayed as status.",
               "title": "Statusicon",
               "type": "string"
            },
            "emoticon": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/ForumEmoticon"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The emoticon used for the thread."
            },
            "totalPages": {
               "description": "The number of pages the thread has.",
               "title": "Totalpages",
               "type": "integer"
            },
            "goldenFrame": {
               "default": false,
               "description": "Whether the thread has a gold frame or not.\n\nIn the Proposals board, the gold frame indicates that a staff member has replied in the thread.",
               "title": "Goldenframe",
               "type": "boolean"
            }
         },
         "required": [
            "threadId",
            "title",
            "threadStarter",
            "threadStarterTraded",
            "threadStarterDeleted",
            "replies",
            "views",
            "status",
            "statusIcon",
            "totalPages"
         ],
         "title": "ThreadEntry",
         "type": "object"
      },
      "ThreadStatus": {
         "description": "The possible status a thread can have.\n\nThreads can have a combination of multiple status. The numeric values are arbitrary.",
         "enum": [
            0,
            1,
            2,
            4,
            8
         ],
         "title": "ThreadStatus",
         "type": "integer"
      }
   },
   "required": [
      "boardId",
      "entries",
      "name",
      "section",
      "sectionId",
      "age",
      "announcements"
   ]
}

Config:
  • populate_by_name: bool = True

  • alias_generator: function = <function to_camel at 0x73beb93f7e20>

  • use_attribute_docstrings: bool = True

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
  • age (int)

  • announcements (list[tibiapy.models.forum.AnnouncementEntry])

  • board_id (int)

  • current_page (int)

  • entries (list[tibiapy.models.forum.ThreadEntry])

  • name (str)

  • results_count (int)

  • section (str)

  • section_id (int)

  • total_pages (int)

field age: int [Required]

The maximum age of the displayed threads, in days.

-1 means all threads will be shown.

field announcements: list[AnnouncementEntry] [Required]

The list of announcements currently visible.

field board_id: int [Required] (alias 'boardId')

The ID of the board.

field current_page: int = 1 (alias 'currentPage')

The currently viewed page.

field entries: list[ThreadEntry] [Required]

The list of threads currently visible.

field name: str [Required]

The name of the board.

field results_count: int = 0 (alias 'resultsCount')

The total number of entries across all pages.

field section: str [Required]

The section of the board.

field section_id: int [Required] (alias 'sectionId')

The internal ID of the section the board belongs to.

field total_pages: int = 1 (alias 'totalPages')

The total number of pages.

get_page_url(page)[source]

Get the URL to a given page of the board.

Parameters:

page (int) – The desired page.

Returns:

The URL to the desired page.

Return type:

str

property next_page_url: str | None

The URL to the next page of the results, if available.

property previous_page_url: str | None

The URL to the previous page of the results, if available.

property url: str

The URL of this board.

pydantic model tibiapy.models.ForumPost[source]

Represents a forum post.

Show JSON schema
{
   "title": "ForumPost",
   "description": "Represents a forum post.",
   "type": "object",
   "properties": {
      "postId": {
         "description": "The id of the post.",
         "title": "Postid",
         "type": "integer"
      },
      "author": {
         "$ref": "#/$defs/ForumAuthor",
         "description": "The author of the post."
      },
      "emoticon": {
         "anyOf": [
            {
               "$ref": "#/$defs/ForumEmoticon"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The emoticon selected for the post."
      },
      "title": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The title of the post.",
         "title": "Title"
      },
      "content": {
         "description": "The content of the post.",
         "title": "Content",
         "type": "string"
      },
      "signature": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The signature of the post.",
         "title": "Signature"
      },
      "postedDate": {
         "description": "The date when the post was made.",
         "format": "date-time",
         "title": "Posteddate",
         "type": "string"
      },
      "editedDate": {
         "anyOf": [
            {
               "format": "date-time",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The date when the post was last edited, if applicable.",
         "title": "Editeddate"
      },
      "editedBy": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The character that edited the post.\n\nThis is usually the same author, but in some occasions staff members edit the posts of others.",
         "title": "Editedby"
      },
      "goldenFrame": {
         "default": false,
         "title": "Goldenframe",
         "type": "boolean"
      }
   },
   "$defs": {
      "ForumAuthor": {
         "description": "Represents a post's author.",
         "properties": {
            "name": {
               "description": "The name of the character, author of the post.",
               "title": "Name",
               "type": "string"
            },
            "level": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The level of the character.",
               "title": "Level"
            },
            "world": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The world the character belongs to.",
               "title": "World"
            },
            "position": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The character's position, if any.",
               "title": "Position"
            },
            "title": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The character's selected title, if any.",
               "title": "Title"
            },
            "vocation": {
               "anyOf": [
                  {
                     "enum": [
                        "None",
                        "Druid",
                        "Knight",
                        "Paladin",
                        "Sorcerer",
                        "Elder Druid",
                        "Elite Knight",
                        "Royal Paladin",
                        "Master Sorcerer"
                     ],
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The vocation of the character.",
               "title": "Vocation"
            },
            "guild": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/GuildMembership"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The guild the author belongs to, if any."
            },
            "posts": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The number of posts this character has made.",
               "title": "Posts"
            },
            "isAuthorDeleted": {
               "default": false,
               "description": "Whether the author is deleted or not.",
               "title": "Isauthordeleted",
               "type": "boolean"
            },
            "isAuthorTraded": {
               "default": false,
               "description": "Whether the author is traded or not.",
               "title": "Isauthortraded",
               "type": "boolean"
            }
         },
         "required": [
            "name"
         ],
         "title": "ForumAuthor",
         "type": "object"
      },
      "ForumEmoticon": {
         "description": "Represents a forum's emoticon.",
         "properties": {
            "name": {
               "description": "The emoticon's name.",
               "title": "Name",
               "type": "string"
            },
            "url": {
               "description": "The URL to the emoticon's image.",
               "title": "Url",
               "type": "string"
            }
         },
         "required": [
            "name",
            "url"
         ],
         "title": "ForumEmoticon",
         "type": "object"
      },
      "GuildMembership": {
         "description": "The guild information of a character.",
         "properties": {
            "name": {
               "description": "The name of the guild.",
               "title": "Name",
               "type": "string"
            },
            "rank": {
               "description": "The name of the rank the member has.",
               "title": "Rank",
               "type": "string"
            },
            "title": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The title of the member in the guild. This is only available for characters in the forums section.",
               "title": "Title"
            }
         },
         "required": [
            "name",
            "rank"
         ],
         "title": "GuildMembership",
         "type": "object"
      }
   },
   "required": [
      "postId",
      "author",
      "content",
      "postedDate"
   ]
}

Config:
  • populate_by_name: bool = True

  • alias_generator: function = <function to_camel at 0x73beb93f7e20>

  • use_attribute_docstrings: bool = True

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
  • author (tibiapy.models.forum.ForumAuthor)

  • content (str)

  • edited_by (str | None)

  • edited_date (datetime.datetime | None)

  • emoticon (tibiapy.models.forum.ForumEmoticon | None)

  • golden_frame (bool)

  • post_id (int)

  • posted_date (datetime.datetime)

  • signature (str | None)

  • title (str | None)

field author: ForumAuthor [Required]

The author of the post.

field content: str [Required]

The content of the post.

field edited_by: Optional[str] = None (alias 'editedBy')

The character that edited the post.

This is usually the same author, but in some occasions staff members edit the posts of others.

field edited_date: Optional[datetime] = None (alias 'editedDate')

The date when the post was last edited, if applicable.

field emoticon: Optional[ForumEmoticon] = None

The emoticon selected for the post.

field golden_frame: bool = False (alias 'goldenFrame')
field post_id: int [Required] (alias 'postId')

The id of the post.

field posted_date: datetime [Required] (alias 'postedDate')

The date when the post was made.

field signature: Optional[str] = None

The signature of the post.

field title: Optional[str] = None

The title of the post.

property url: str

Get the URL to this specific post.

pydantic model tibiapy.models.ForumThread[source]

Represents a forum thread.

Show JSON schema
{
   "title": "ForumThread",
   "description": "Represents a forum thread.",
   "type": "object",
   "properties": {
      "threadId": {
         "description": "The internal ID of the thread.",
         "title": "Threadid",
         "type": "integer"
      },
      "currentPage": {
         "default": 1,
         "description": "The currently viewed page.",
         "title": "Currentpage",
         "type": "integer"
      },
      "totalPages": {
         "default": 1,
         "description": "The total number of pages.",
         "title": "Totalpages",
         "type": "integer"
      },
      "resultsCount": {
         "default": 0,
         "description": "The total number of entries across all pages.",
         "title": "Resultscount",
         "type": "integer"
      },
      "entries": {
         "default": [],
         "description": "The list of posts the thread has.",
         "items": {
            "$ref": "#/$defs/ForumPost"
         },
         "title": "Entries",
         "type": "array"
      },
      "title": {
         "description": "The title of the thread.",
         "title": "Title",
         "type": "string"
      },
      "board": {
         "description": "The board this thread belongs to.",
         "title": "Board",
         "type": "string"
      },
      "boardId": {
         "description": "The ID of the board this thread belongs to.",
         "title": "Boardid",
         "type": "integer"
      },
      "section": {
         "description": "The board section this thread belongs to.",
         "title": "Section",
         "type": "string"
      },
      "sectionId": {
         "description": "The ID of the board section this thread belongs to.",
         "title": "Sectionid",
         "type": "integer"
      },
      "previousTopicNumber": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The number of the previous topic.",
         "title": "Previoustopicnumber"
      },
      "nextTopicNumber": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The number of the next topic.",
         "title": "Nexttopicnumber"
      },
      "goldenFrame": {
         "default": false,
         "description": "Whether the thread has a golden frame or not.\n\nIn the Proposals board,a golden frame means the thread has a reply by a staff member.",
         "title": "Goldenframe",
         "type": "boolean"
      },
      "anchoredPost": {
         "anyOf": [
            {
               "$ref": "#/$defs/ForumPost"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The post where the page is anchored to, if any.\n\nWhen a post is fetched directly, the thread that contains it is displayed, anchored to the specific post."
      }
   },
   "$defs": {
      "ForumAuthor": {
         "description": "Represents a post's author.",
         "properties": {
            "name": {
               "description": "The name of the character, author of the post.",
               "title": "Name",
               "type": "string"
            },
            "level": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The level of the character.",
               "title": "Level"
            },
            "world": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The world the character belongs to.",
               "title": "World"
            },
            "position": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The character's position, if any.",
               "title": "Position"
            },
            "title": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The character's selected title, if any.",
               "title": "Title"
            },
            "vocation": {
               "anyOf": [
                  {
                     "enum": [
                        "None",
                        "Druid",
                        "Knight",
                        "Paladin",
                        "Sorcerer",
                        "Elder Druid",
                        "Elite Knight",
                        "Royal Paladin",
                        "Master Sorcerer"
                     ],
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The vocation of the character.",
               "title": "Vocation"
            },
            "guild": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/GuildMembership"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The guild the author belongs to, if any."
            },
            "posts": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The number of posts this character has made.",
               "title": "Posts"
            },
            "isAuthorDeleted": {
               "default": false,
               "description": "Whether the author is deleted or not.",
               "title": "Isauthordeleted",
               "type": "boolean"
            },
            "isAuthorTraded": {
               "default": false,
               "description": "Whether the author is traded or not.",
               "title": "Isauthortraded",
               "type": "boolean"
            }
         },
         "required": [
            "name"
         ],
         "title": "ForumAuthor",
         "type": "object"
      },
      "ForumEmoticon": {
         "description": "Represents a forum's emoticon.",
         "properties": {
            "name": {
               "description": "The emoticon's name.",
               "title": "Name",
               "type": "string"
            },
            "url": {
               "description": "The URL to the emoticon's image.",
               "title": "Url",
               "type": "string"
            }
         },
         "required": [
            "name",
            "url"
         ],
         "title": "ForumEmoticon",
         "type": "object"
      },
      "ForumPost": {
         "description": "Represents a forum post.",
         "properties": {
            "postId": {
               "description": "The id of the post.",
               "title": "Postid",
               "type": "integer"
            },
            "author": {
               "$ref": "#/$defs/ForumAuthor",
               "description": "The author of the post."
            },
            "emoticon": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/ForumEmoticon"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The emoticon selected for the post."
            },
            "title": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The title of the post.",
               "title": "Title"
            },
            "content": {
               "description": "The content of the post.",
               "title": "Content",
               "type": "string"
            },
            "signature": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The signature of the post.",
               "title": "Signature"
            },
            "postedDate": {
               "description": "The date when the post was made.",
               "format": "date-time",
               "title": "Posteddate",
               "type": "string"
            },
            "editedDate": {
               "anyOf": [
                  {
                     "format": "date-time",
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The date when the post was last edited, if applicable.",
               "title": "Editeddate"
            },
            "editedBy": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The character that edited the post.\n\nThis is usually the same author, but in some occasions staff members edit the posts of others.",
               "title": "Editedby"
            },
            "goldenFrame": {
               "default": false,
               "title": "Goldenframe",
               "type": "boolean"
            }
         },
         "required": [
            "postId",
            "author",
            "content",
            "postedDate"
         ],
         "title": "ForumPost",
         "type": "object"
      },
      "GuildMembership": {
         "description": "The guild information of a character.",
         "properties": {
            "name": {
               "description": "The name of the guild.",
               "title": "Name",
               "type": "string"
            },
            "rank": {
               "description": "The name of the rank the member has.",
               "title": "Rank",
               "type": "string"
            },
            "title": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The title of the member in the guild. This is only available for characters in the forums section.",
               "title": "Title"
            }
         },
         "required": [
            "name",
            "rank"
         ],
         "title": "GuildMembership",
         "type": "object"
      }
   },
   "required": [
      "threadId",
      "title",
      "board",
      "boardId",
      "section",
      "sectionId"
   ]
}

Config:
  • populate_by_name: bool = True

  • alias_generator: function = <function to_camel at 0x73beb93f7e20>

  • use_attribute_docstrings: bool = True

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
  • anchored_post (tibiapy.models.forum.ForumPost | None)

  • board (str)

  • board_id (int)

  • current_page (int)

  • entries (list[tibiapy.models.forum.ForumPost])

  • golden_frame (bool)

  • next_topic_number (int | None)

  • previous_topic_number (int | None)

  • results_count (int)

  • section (str)

  • section_id (int)

  • thread_id (int)

  • title (str)

  • total_pages (int)

field anchored_post: Optional[ForumPost] = None (alias 'anchoredPost')

The post where the page is anchored to, if any.

When a post is fetched directly, the thread that contains it is displayed, anchored to the specific post.

field board: str [Required]

The board this thread belongs to.

field board_id: int [Required] (alias 'boardId')

The ID of the board this thread belongs to.

field current_page: int = 1 (alias 'currentPage')

The currently viewed page.

field entries: list[ForumPost] = []

The list of posts the thread has.

field golden_frame: bool = False (alias 'goldenFrame')

Whether the thread has a golden frame or not.

In the Proposals board,a golden frame means the thread has a reply by a staff member.

field next_topic_number: Optional[int] = None (alias 'nextTopicNumber')

The number of the next topic.

field previous_topic_number: Optional[int] = None (alias 'previousTopicNumber')

The number of the previous topic.

field results_count: int = 0 (alias 'resultsCount')

The total number of entries across all pages.

field section: str [Required]

The board section this thread belongs to.

field section_id: int [Required] (alias 'sectionId')

The ID of the board section this thread belongs to.

field thread_id: int [Required] (alias 'threadId')

The internal ID of the thread.

field title: str [Required]

The title of the thread.

field total_pages: int = 1 (alias 'totalPages')

The total number of pages.

get_page_url(page)[source]

Get the URL to a given page of the board.

Parameters:

page (int) – The desired page.

Returns:

The URL to the desired page.

Return type:

str

property next_page_url: str | None

The URL to the next page of the results, if available.

property next_thread_url: str

The URL to the next topic of the board, if there’s any.

property previous_page_url: str | None

The URL to the previous page of the results, if available.

property previous_thread_url: str

The URL to the previous topic of the board, if there’s any.

property url: str

The URL to the thread in Tibia.com.

Type:

str

pydantic model tibiapy.models.AnnouncementEntry[source]

Represents an announcement in the forum boards.

Show JSON schema
{
   "title": "AnnouncementEntry",
   "description": "Represents an announcement in the forum boards.",
   "type": "object",
   "properties": {
      "announcementId": {
         "description": "The internal id of the announcement.",
         "title": "Announcementid",
         "type": "integer"
      },
      "title": {
         "description": "The title of the announcement.",
         "title": "Title",
         "type": "string"
      },
      "announcementAuthor": {
         "description": "The character that made the announcement.",
         "title": "Announcementauthor",
         "type": "string"
      }
   },
   "required": [
      "announcementId",
      "title",
      "announcementAuthor"
   ]
}

Config:
  • populate_by_name: bool = True

  • alias_generator: function = <function to_camel at 0x73beb93f7e20>

  • use_attribute_docstrings: bool = True

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
  • announcement_author (str)

  • announcement_id (int)

  • title (str)

field announcement_author: str [Required] (alias 'announcementAuthor')

The character that made the announcement.

field announcement_id: int [Required] (alias 'announcementId')

The internal id of the announcement.

field title: str [Required]

The title of the announcement.

property url: str

Get the URL to this announcement.

pydantic model tibiapy.models.BoardEntry[source]

Represents a board in the list of boards.

This is the board information available when viewing a section (e.g. World, Trade, Community)

Show JSON schema
{
   "title": "BoardEntry",
   "description": "Represents a board in the list of boards.\n\nThis is the board information available when viewing a section (e.g. World, Trade, Community)",
   "type": "object",
   "properties": {
      "boardId": {
         "description": "The board's internal id.",
         "title": "Boardid",
         "type": "integer"
      },
      "name": {
         "description": "The name of the board.",
         "title": "Name",
         "type": "string"
      },
      "description": {
         "description": "The description of the board.",
         "title": "Description",
         "type": "string"
      },
      "posts": {
         "description": "The number of posts in this board.",
         "title": "Posts",
         "type": "integer"
      },
      "threads": {
         "description": "The number of threads in this board.",
         "title": "Threads",
         "type": "integer"
      },
      "lastPost": {
         "anyOf": [
            {
               "$ref": "#/$defs/LastPost"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The information of the last post made in this board."
      }
   },
   "$defs": {
      "LastPost": {
         "description": "Represents a forum thread.",
         "properties": {
            "postId": {
               "description": "The internal id of the post.",
               "title": "Postid",
               "type": "integer"
            },
            "author": {
               "description": "The name of the character that made the last post.",
               "title": "Author",
               "type": "string"
            },
            "postedOn": {
               "description": "The date when the last post was made.",
               "format": "date-time",
               "title": "Postedon",
               "type": "string"
            },
            "isAuthorDeleted": {
               "description": "Whether the last post's author is a character that is already deleted.",
               "title": "Isauthordeleted",
               "type": "boolean"
            },
            "isAuthorTraded": {
               "description": "Whether the last post's author was recently traded.",
               "title": "Isauthortraded",
               "type": "boolean"
            }
         },
         "required": [
            "postId",
            "author",
            "postedOn",
            "isAuthorDeleted",
            "isAuthorTraded"
         ],
         "title": "LastPost",
         "type": "object"
      }
   },
   "required": [
      "boardId",
      "name",
      "description",
      "posts",
      "threads"
   ]
}

Config:
  • populate_by_name: bool = True

  • alias_generator: function = <function to_camel at 0x73beb93f7e20>

  • use_attribute_docstrings: bool = True

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
  • board_id (int)

  • description (str)

  • last_post (tibiapy.models.forum.LastPost | None)

  • name (str)

  • posts (int)

  • threads (int)

field board_id: int [Required] (alias 'boardId')

The board’s internal id.

field description: str [Required]

The description of the board.

field last_post: Optional[LastPost] = None (alias 'lastPost')

The information of the last post made in this board.

field name: str [Required]

The name of the board.

field posts: int [Required]

The number of posts in this board.

field threads: int [Required]

The number of threads in this board.

property url: str

The URL of this board.

pydantic model tibiapy.models.ThreadEntry[source]

Represents a thread in a forum board.

Show JSON schema
{
   "title": "ThreadEntry",
   "description": "Represents a thread in a forum board.",
   "type": "object",
   "properties": {
      "threadId": {
         "description": "The internal id of the thread.",
         "title": "Threadid",
         "type": "integer"
      },
      "title": {
         "description": "The title of the thread.",
         "title": "Title",
         "type": "string"
      },
      "threadStarter": {
         "description": "The character that started the thread.",
         "title": "Threadstarter",
         "type": "string"
      },
      "threadStarterTraded": {
         "description": "Whether the thread starter was recently traded or not.",
         "title": "Threadstartertraded",
         "type": "boolean"
      },
      "threadStarterDeleted": {
         "description": "Whether the thread starter was recently deleted or not.",
         "title": "Threadstarterdeleted",
         "type": "boolean"
      },
      "replies": {
         "description": "The number of replies.",
         "title": "Replies",
         "type": "integer"
      },
      "views": {
         "description": "The number of views.",
         "title": "Views",
         "type": "integer"
      },
      "lastPost": {
         "anyOf": [
            {
               "$ref": "#/$defs/LastPost"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The information of the last post made in this board."
      },
      "status": {
         "$ref": "#/$defs/ThreadStatus",
         "description": "The status of the thread."
      },
      "statusIcon": {
         "description": "The URL of the icon displayed as status.",
         "title": "Statusicon",
         "type": "string"
      },
      "emoticon": {
         "anyOf": [
            {
               "$ref": "#/$defs/ForumEmoticon"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The emoticon used for the thread."
      },
      "totalPages": {
         "description": "The number of pages the thread has.",
         "title": "Totalpages",
         "type": "integer"
      },
      "goldenFrame": {
         "default": false,
         "description": "Whether the thread has a gold frame or not.\n\nIn the Proposals board, the gold frame indicates that a staff member has replied in the thread.",
         "title": "Goldenframe",
         "type": "boolean"
      }
   },
   "$defs": {
      "ForumEmoticon": {
         "description": "Represents a forum's emoticon.",
         "properties": {
            "name": {
               "description": "The emoticon's name.",
               "title": "Name",
               "type": "string"
            },
            "url": {
               "description": "The URL to the emoticon's image.",
               "title": "Url",
               "type": "string"
            }
         },
         "required": [
            "name",
            "url"
         ],
         "title": "ForumEmoticon",
         "type": "object"
      },
      "LastPost": {
         "description": "Represents a forum thread.",
         "properties": {
            "postId": {
               "description": "The internal id of the post.",
               "title": "Postid",
               "type": "integer"
            },
            "author": {
               "description": "The name of the character that made the last post.",
               "title": "Author",
               "type": "string"
            },
            "postedOn": {
               "description": "The date when the last post was made.",
               "format": "date-time",
               "title": "Postedon",
               "type": "string"
            },
            "isAuthorDeleted": {
               "description": "Whether the last post's author is a character that is already deleted.",
               "title": "Isauthordeleted",
               "type": "boolean"
            },
            "isAuthorTraded": {
               "description": "Whether the last post's author was recently traded.",
               "title": "Isauthortraded",
               "type": "boolean"
            }
         },
         "required": [
            "postId",
            "author",
            "postedOn",
            "isAuthorDeleted",
            "isAuthorTraded"
         ],
         "title": "LastPost",
         "type": "object"
      },
      "ThreadStatus": {
         "description": "The possible status a thread can have.\n\nThreads can have a combination of multiple status. The numeric values are arbitrary.",
         "enum": [
            0,
            1,
            2,
            4,
            8
         ],
         "title": "ThreadStatus",
         "type": "integer"
      }
   },
   "required": [
      "threadId",
      "title",
      "threadStarter",
      "threadStarterTraded",
      "threadStarterDeleted",
      "replies",
      "views",
      "status",
      "statusIcon",
      "totalPages"
   ]
}

Config:
  • populate_by_name: bool = True

  • alias_generator: function = <function to_camel at 0x73beb93f7e20>

  • use_attribute_docstrings: bool = True

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
  • emoticon (tibiapy.models.forum.ForumEmoticon | None)

  • golden_frame (bool)

  • last_post (tibiapy.models.forum.LastPost | None)

  • replies (int)

  • status (tibiapy.enums.ThreadStatus)

  • status_icon (str)

  • thread_id (int)

  • thread_starter (str)

  • thread_starter_deleted (bool)

  • thread_starter_traded (bool)

  • title (str)

  • total_pages (int)

  • views (int)

field emoticon: Optional[ForumEmoticon] = None

The emoticon used for the thread.

field golden_frame: bool = False (alias 'goldenFrame')

Whether the thread has a gold frame or not.

In the Proposals board, the gold frame indicates that a staff member has replied in the thread.

field last_post: Optional[LastPost] = None (alias 'lastPost')

The information of the last post made in this board.

field replies: int [Required]

The number of replies.

field status: ThreadStatus [Required]

The status of the thread.

field status_icon: str [Required] (alias 'statusIcon')

The URL of the icon displayed as status.

field thread_id: int [Required] (alias 'threadId')

The internal id of the thread.

field thread_starter: str [Required] (alias 'threadStarter')

The character that started the thread.

field thread_starter_deleted: bool [Required] (alias 'threadStarterDeleted')

Whether the thread starter was recently deleted or not.

field thread_starter_traded: bool [Required] (alias 'threadStarterTraded')

Whether the thread starter was recently traded or not.

field title: str [Required]

The title of the thread.

field total_pages: int [Required] (alias 'totalPages')

The number of pages the thread has.

field views: int [Required]

The number of views.

property url: str

The URL to the thread in Tibia.com.

Type:

str

pydantic model tibiapy.models.CMPost[source]

Represents a CM Post entry.

Show JSON schema
{
   "title": "CMPost",
   "description": "Represents a CM Post entry.",
   "type": "object",
   "properties": {
      "postId": {
         "description": "The ID of the post.",
         "title": "Postid",
         "type": "integer"
      },
      "postedOn": {
         "description": "The date when the post was made.",
         "format": "date-time",
         "title": "Postedon",
         "type": "string"
      },
      "board": {
         "description": "The name of the board where the post was made.",
         "title": "Board",
         "type": "string"
      },
      "threadTitle": {
         "description": "The title of the thread where the post is.",
         "title": "Threadtitle",
         "type": "string"
      }
   },
   "required": [
      "postId",
      "postedOn",
      "board",
      "threadTitle"
   ]
}

Config:
  • populate_by_name: bool = True

  • alias_generator: function = <function to_camel at 0x73beb93f7e20>

  • use_attribute_docstrings: bool = True

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
  • board (str)

  • post_id (int)

  • posted_on (datetime.datetime)

  • thread_title (str)

field board: str [Required]

The name of the board where the post was made.

field post_id: int [Required] (alias 'postId')

The ID of the post.

field posted_on: datetime [Required] (alias 'postedOn')

The date when the post was made.

field thread_title: str [Required] (alias 'threadTitle')

The title of the thread where the post is.

property url: str

Get the URL to this specific post.

pydantic model tibiapy.models.ForumAuthor[source]

Represents a post’s author.

Show JSON schema
{
   "title": "ForumAuthor",
   "description": "Represents a post's author.",
   "type": "object",
   "properties": {
      "name": {
         "description": "The name of the character, author of the post.",
         "title": "Name",
         "type": "string"
      },
      "level": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The level of the character.",
         "title": "Level"
      },
      "world": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The world the character belongs to.",
         "title": "World"
      },
      "position": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The character's position, if any.",
         "title": "Position"
      },
      "title": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The character's selected title, if any.",
         "title": "Title"
      },
      "vocation": {
         "anyOf": [
            {
               "enum": [
                  "None",
                  "Druid",
                  "Knight",
                  "Paladin",
                  "Sorcerer",
                  "Elder Druid",
                  "Elite Knight",
                  "Royal Paladin",
                  "Master Sorcerer"
               ],
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The vocation of the character.",
         "title": "Vocation"
      },
      "guild": {
         "anyOf": [
            {
               "$ref": "#/$defs/GuildMembership"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The guild the author belongs to, if any."
      },
      "posts": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The number of posts this character has made.",
         "title": "Posts"
      },
      "isAuthorDeleted": {
         "default": false,
         "description": "Whether the author is deleted or not.",
         "title": "Isauthordeleted",
         "type": "boolean"
      },
      "isAuthorTraded": {
         "default": false,
         "description": "Whether the author is traded or not.",
         "title": "Isauthortraded",
         "type": "boolean"
      }
   },
   "$defs": {
      "GuildMembership": {
         "description": "The guild information of a character.",
         "properties": {
            "name": {
               "description": "The name of the guild.",
               "title": "Name",
               "type": "string"
            },
            "rank": {
               "description": "The name of the rank the member has.",
               "title": "Rank",
               "type": "string"
            },
            "title": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The title of the member in the guild. This is only available for characters in the forums section.",
               "title": "Title"
            }
         },
         "required": [
            "name",
            "rank"
         ],
         "title": "GuildMembership",
         "type": "object"
      }
   },
   "required": [
      "name"
   ]
}

Config:
  • populate_by_name: bool = True

  • alias_generator: function = <function to_camel at 0x73beb93f7e20>

  • use_attribute_docstrings: bool = True

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
  • guild (tibiapy.models.character.GuildMembership | None)

  • is_author_deleted (bool)

  • is_author_traded (bool)

  • level (int | None)

  • name (str)

  • position (str | None)

  • posts (int | None)

  • title (str | None)

  • vocation (tibiapy.enums.Vocation | None)

  • world (str | None)

field guild: Optional[GuildMembership] = None

The guild the author belongs to, if any.

field is_author_deleted: bool = False (alias 'isAuthorDeleted')

Whether the author is deleted or not.

field is_author_traded: bool = False (alias 'isAuthorTraded')

Whether the author is traded or not.

field level: Optional[int] = None

The level of the character.

field name: str [Required]

The name of the character, author of the post.

field position: Optional[str] = None

The character’s position, if any.

field posts: Optional[int] = None

The number of posts this character has made.

field title: Optional[str] = None

The character’s selected title, if any.

field vocation: Optional[Vocation] = None

The vocation of the character.

field world: Optional[str] = None

The world the character belongs to.

property url: str

The URL of the character’s information page on Tibia.com.

pydantic model tibiapy.models.ForumEmoticon[source]

Represents a forum’s emoticon.

Show JSON schema
{
   "title": "ForumEmoticon",
   "description": "Represents a forum's emoticon.",
   "type": "object",
   "properties": {
      "name": {
         "description": "The emoticon's name.",
         "title": "Name",
         "type": "string"
      },
      "url": {
         "description": "The URL to the emoticon's image.",
         "title": "Url",
         "type": "string"
      }
   },
   "required": [
      "name",
      "url"
   ]
}

Config:
  • populate_by_name: bool = True

  • alias_generator: function = <function to_camel at 0x73beb93f7e20>

  • use_attribute_docstrings: bool = True

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
  • name (str)

  • url (str)

field name: str [Required]

The emoticon’s name.

field url: str [Required]

The URL to the emoticon’s image.

pydantic model tibiapy.models.LastPost[source]

Represents a forum thread.

Show JSON schema
{
   "title": "LastPost",
   "description": "Represents a forum thread.",
   "type": "object",
   "properties": {
      "postId": {
         "description": "The internal id of the post.",
         "title": "Postid",
         "type": "integer"
      },
      "author": {
         "description": "The name of the character that made the last post.",
         "title": "Author",
         "type": "string"
      },
      "postedOn": {
         "description": "The date when the last post was made.",
         "format": "date-time",
         "title": "Postedon",
         "type": "string"
      },
      "isAuthorDeleted": {
         "description": "Whether the last post's author is a character that is already deleted.",
         "title": "Isauthordeleted",
         "type": "boolean"
      },
      "isAuthorTraded": {
         "description": "Whether the last post's author was recently traded.",
         "title": "Isauthortraded",
         "type": "boolean"
      }
   },
   "required": [
      "postId",
      "author",
      "postedOn",
      "isAuthorDeleted",
      "isAuthorTraded"
   ]
}

Config:
  • populate_by_name: bool = True

  • alias_generator: function = <function to_camel at 0x73beb93f7e20>

  • use_attribute_docstrings: bool = True

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
  • author (str)

  • is_author_deleted (bool)

  • is_author_traded (bool)

  • post_id (int)

  • posted_on (datetime.datetime)

field author: str [Required]

The name of the character that made the last post.

field is_author_deleted: bool [Required] (alias 'isAuthorDeleted')

Whether the last post’s author is a character that is already deleted.

field is_author_traded: bool [Required] (alias 'isAuthorTraded')

Whether the last post’s author was recently traded.

field post_id: int [Required] (alias 'postId')

The internal id of the post.

field posted_on: datetime [Required] (alias 'postedOn')

The date when the last post was made.

property author_url: str

The URL to the author’s character information page.

property url: str

Get the URL to this specific post.

News

Models related to Tibia.com’s News section. This also contains the Event Calendar

pydantic model tibiapy.models.NewsArchive[source]

A news entry from the news archive.

Show JSON schema
{
   "title": "NewsArchive",
   "description": "A news entry from the news archive.",
   "type": "object",
   "properties": {
      "fromDate": {
         "description": "The start date to show news for.",
         "format": "date",
         "title": "Fromdate",
         "type": "string"
      },
      "toDate": {
         "description": "The end date to show news for.",
         "format": "date",
         "title": "Todate",
         "type": "string"
      },
      "types": {
         "description": "The type of news to show.",
         "items": {
            "enum": [
               "News Ticker",
               "Featured Article",
               "News"
            ],
            "type": "string"
         },
         "title": "Types",
         "type": "array",
         "uniqueItems": true
      },
      "categories": {
         "description": "The categories to show.",
         "items": {
            "enum": [
               "cipsoft",
               "community",
               "development",
               "support",
               "technical"
            ],
            "type": "string"
         },
         "title": "Categories",
         "type": "array",
         "uniqueItems": true
      },
      "entries": {
         "description": "The news matching the provided parameters.",
         "items": {
            "$ref": "#/$defs/NewsEntry"
         },
         "title": "Entries",
         "type": "array"
      }
   },
   "$defs": {
      "NewsEntry": {
         "description": "Represents a news article listed in the News Archive.",
         "properties": {
            "id": {
               "description": "The internal ID of the news entry.",
               "title": "Id",
               "type": "integer"
            },
            "category": {
               "description": "The category this belongs to.",
               "enum": [
                  "cipsoft",
                  "community",
                  "development",
                  "support",
                  "technical"
               ],
               "title": "Category",
               "type": "string"
            },
            "title": {
               "description": "The title of the news entry.\n\nNews tickers have a fragment of their content as a title.",
               "title": "Title",
               "type": "string"
            },
            "publishedOn": {
               "description": "The date when the news were published.",
               "format": "date",
               "title": "Publishedon",
               "type": "string"
            },
            "type": {
               "description": "The type of news of this list entry.",
               "enum": [
                  "News Ticker",
                  "Featured Article",
                  "News"
               ],
               "title": "Type",
               "type": "string"
            }
         },
         "required": [
            "id",
            "category",
            "title",
            "publishedOn",
            "type"
         ],
         "title": "NewsEntry",
         "type": "object"
      }
   },
   "required": [
      "fromDate",
      "toDate",
      "types",
      "categories",
      "entries"
   ]
}

Config:
  • populate_by_name: bool = True

  • alias_generator: function = <function to_camel at 0x73beb93f7e20>

  • use_attribute_docstrings: bool = True

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
  • categories (set[tibiapy.enums.NewsCategory])

  • entries (list[tibiapy.models.news.NewsEntry])

  • from_date (datetime.date)

  • to_date (datetime.date)

  • types (set[tibiapy.enums.NewsType])

field categories: set[NewsCategory] [Required]

The categories to show.

field entries: list[NewsEntry] [Required]

The news matching the provided parameters.

field from_date: date [Required] (alias 'fromDate')

The start date to show news for.

field to_date: date [Required] (alias 'toDate')

The end date to show news for.

field types: set[NewsType] [Required]

The type of news to show.

property url: str

Get the URL to the News Archive in Tibia.com.

pydantic model tibiapy.models.News[source]

Represents a news article.

Show JSON schema
{
   "title": "News",
   "description": "Represents a news article.",
   "type": "object",
   "properties": {
      "id": {
         "description": "The internal ID of the news entry.",
         "title": "Id",
         "type": "integer"
      },
      "category": {
         "description": "The category this belongs to.",
         "enum": [
            "cipsoft",
            "community",
            "development",
            "support",
            "technical"
         ],
         "title": "Category",
         "type": "string"
      },
      "title": {
         "description": "The title of the news entry.",
         "title": "Title",
         "type": "string"
      },
      "publishedOn": {
         "description": "The date when the news were published.",
         "format": "date",
         "title": "Publishedon",
         "type": "string"
      },
      "content": {
         "description": "The raw html content of the entry.",
         "title": "Content",
         "type": "string"
      },
      "threadId": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The thread id of the designated discussion thread for this entry.",
         "title": "Threadid"
      }
   },
   "required": [
      "id",
      "category",
      "title",
      "publishedOn",
      "content"
   ]
}

Config:
  • populate_by_name: bool = True

  • alias_generator: function = <function to_camel at 0x73beb93f7e20>

  • use_attribute_docstrings: bool = True

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
  • category (tibiapy.enums.NewsCategory)

  • content (str)

  • id (int)

  • published_on (datetime.date)

  • thread_id (int | None)

  • title (str)

field category: NewsCategory [Required]

The category this belongs to.

field content: str [Required]

The raw html content of the entry.

field id: int [Required]

The internal ID of the news entry.

field published_on: date [Required] (alias 'publishedOn')

The date when the news were published.

field thread_id: Optional[int] = None (alias 'threadId')

The thread id of the designated discussion thread for this entry.

field title: str [Required]

The title of the news entry.

property thread_url: str

The URL to the thread discussing this news entry, if any.

property url: str

The URL to the Tibia.com page of the news entry.

pydantic model tibiapy.models.NewsEntry[source]

Represents a news article listed in the News Archive.

Show JSON schema
{
   "title": "NewsEntry",
   "description": "Represents a news article listed in the News Archive.",
   "type": "object",
   "properties": {
      "id": {
         "description": "The internal ID of the news entry.",
         "title": "Id",
         "type": "integer"
      },
      "category": {
         "description": "The category this belongs to.",
         "enum": [
            "cipsoft",
            "community",
            "development",
            "support",
            "technical"
         ],
         "title": "Category",
         "type": "string"
      },
      "title": {
         "description": "The title of the news entry.\n\nNews tickers have a fragment of their content as a title.",
         "title": "Title",
         "type": "string"
      },
      "publishedOn": {
         "description": "The date when the news were published.",
         "format": "date",
         "title": "Publishedon",
         "type": "string"
      },
      "type": {
         "description": "The type of news of this list entry.",
         "enum": [
            "News Ticker",
            "Featured Article",
            "News"
         ],
         "title": "Type",
         "type": "string"
      }
   },
   "required": [
      "id",
      "category",
      "title",
      "publishedOn",
      "type"
   ]
}

Config:
  • populate_by_name: bool = True

  • alias_generator: function = <function to_camel at 0x73beb93f7e20>

  • use_attribute_docstrings: bool = True

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
  • category (tibiapy.enums.NewsCategory)

  • id (int)

  • published_on (datetime.date)

  • title (str)

  • type (tibiapy.enums.NewsType)

field category: NewsCategory [Required]

The category this belongs to.

field id: int [Required]

The internal ID of the news entry.

field published_on: date [Required] (alias 'publishedOn')

The date when the news were published.

field title: str [Required]

The title of the news entry.

News tickers have a fragment of their content as a title.

field type: NewsType [Required]

The type of news of this list entry.

property url: str

The URL to the Tibia.com page of the news entry.

pydantic model tibiapy.models.EventSchedule[source]

Represents the event’s calendar in Tibia.com.

Show JSON schema
{
   "title": "EventSchedule",
   "description": "Represents the event's calendar in Tibia.com.",
   "type": "object",
   "properties": {
      "month": {
         "description": "The month being displayed.\n\nNote that some days from the previous and next month may be included too.",
         "title": "Month",
         "type": "integer"
      },
      "year": {
         "description": "The year being displayed.",
         "title": "Year",
         "type": "integer"
      },
      "events": {
         "default": [],
         "description": "A list of events that happen during this month.\n\nIt might include some events from the previous and next months as well.",
         "items": {
            "$ref": "#/$defs/EventEntry"
         },
         "title": "Events",
         "type": "array"
      }
   },
   "$defs": {
      "EventEntry": {
         "description": "Represents an event's entry in the calendar.",
         "properties": {
            "title": {
               "description": "The title of the event.",
               "title": "Title",
               "type": "string"
            },
            "description": {
               "description": "The description of the event.",
               "title": "Description",
               "type": "string"
            },
            "startDate": {
               "anyOf": [
                  {
                     "format": "date",
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The day the event starts.\n\nIf the event is continuing from the previous month, this will be :obj:`None`.",
               "title": "Startdate"
            },
            "endDate": {
               "anyOf": [
                  {
                     "format": "date",
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The day the event ends.\n\nIf the event is continuing on the next month, this will be :obj:`None`.",
               "title": "Enddate"
            },
            "color": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The displayed color of the event.",
               "title": "Color"
            }
         },
         "required": [
            "title",
            "description"
         ],
         "title": "EventEntry",
         "type": "object"
      }
   },
   "required": [
      "month",
      "year"
   ]
}

Config:
  • populate_by_name: bool = True

  • alias_generator: function = <function to_camel at 0x73beb93f7e20>

  • use_attribute_docstrings: bool = True

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
  • events (list[tibiapy.models.event.EventEntry])

  • month (int)

  • year (int)

field events: list[EventEntry] = []

A list of events that happen during this month.

It might include some events from the previous and next months as well.

field month: int [Required]

The month being displayed.

Note that some days from the previous and next month may be included too.

field year: int [Required]

The year being displayed.

get_events_on(date)[source]

Get a list of events that are active during the specified desired_date.

Parameters:

date (datetime.date) – The date to check.

Returns:

The events that are active during the desired_date, if any.

Return type:

list of EventEntry

Notes

Dates outside the calendar’s month and year may yield unexpected results.

property url: str

Get the URL to the event calendar with the current parameters.

pydantic model tibiapy.models.EventEntry[source]

Represents an event’s entry in the calendar.

Show JSON schema
{
   "title": "EventEntry",
   "description": "Represents an event's entry in the calendar.",
   "type": "object",
   "properties": {
      "title": {
         "description": "The title of the event.",
         "title": "Title",
         "type": "string"
      },
      "description": {
         "description": "The description of the event.",
         "title": "Description",
         "type": "string"
      },
      "startDate": {
         "anyOf": [
            {
               "format": "date",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The day the event starts.\n\nIf the event is continuing from the previous month, this will be :obj:`None`.",
         "title": "Startdate"
      },
      "endDate": {
         "anyOf": [
            {
               "format": "date",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The day the event ends.\n\nIf the event is continuing on the next month, this will be :obj:`None`.",
         "title": "Enddate"
      },
      "color": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The displayed color of the event.",
         "title": "Color"
      }
   },
   "required": [
      "title",
      "description"
   ]
}

Config:
  • populate_by_name: bool = True

  • alias_generator: function = <function to_camel at 0x73beb93f7e20>

  • use_attribute_docstrings: bool = True

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
  • color (str | None)

  • description (str)

  • end_date (datetime.date | None)

  • start_date (datetime.date | None)

  • title (str)

field color: Optional[str] = None

The displayed color of the event.

field description: str [Required]

The description of the event.

field end_date: Optional[date] = None (alias 'endDate')

The day the event ends.

If the event is continuing on the next month, this will be None.

field start_date: Optional[date] = None (alias 'startDate')

The day the event starts.

If the event is continuing from the previous month, this will be None.

field title: str [Required]

The title of the event.

property duration: int

The number of days this event will be active for.

Bazaar

Models related to Tibia.com’s Bazaar section.

pydantic model tibiapy.models.CharacterBazaar[source]

Represents the char bazaar.

Show JSON schema
{
   "title": "CharacterBazaar",
   "description": "Represents the char bazaar.",
   "type": "object",
   "properties": {
      "currentPage": {
         "default": 1,
         "description": "The currently viewed page.",
         "title": "Currentpage",
         "type": "integer"
      },
      "totalPages": {
         "default": 1,
         "description": "The total number of pages.",
         "title": "Totalpages",
         "type": "integer"
      },
      "resultsCount": {
         "default": 0,
         "description": "The total number of entries across all pages.",
         "title": "Resultscount",
         "type": "integer"
      },
      "entries": {
         "default": [],
         "description": "The entries in this page.",
         "items": {
            "$ref": "#/$defs/Auction"
         },
         "title": "Entries",
         "type": "array"
      },
      "type": {
         "description": "The type of auctions being displayed, either current or auction history.",
         "enum": [
            "Current Auctions",
            "Auction History"
         ],
         "title": "Type",
         "type": "string"
      },
      "filters": {
         "anyOf": [
            {
               "$ref": "#/$defs/AuctionFilters"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The currently set filtering options."
      }
   },
   "$defs": {
      "AchievementEntry": {
         "description": "An unlocked achievement by the character.",
         "properties": {
            "name": {
               "description": "The name of the achievement.",
               "title": "Name",
               "type": "string"
            },
            "isSecret": {
               "description": "Whether the achievement is secret or not.",
               "title": "Issecret",
               "type": "boolean"
            }
         },
         "required": [
            "name",
            "isSecret"
         ],
         "title": "AchievementEntry",
         "type": "object"
      },
      "Auction": {
         "description": "Represents an auction in the list, containing the summary.",
         "properties": {
            "auctionId": {
               "description": "The internal id of the auction.",
               "title": "Auctionid",
               "type": "integer"
            },
            "name": {
               "description": "The name of the character.",
               "title": "Name",
               "type": "string"
            },
            "level": {
               "description": "The level of the character.",
               "title": "Level",
               "type": "integer"
            },
            "world": {
               "description": "The world the character is in.",
               "title": "World",
               "type": "string"
            },
            "vocation": {
               "description": "The vocation of the character.",
               "enum": [
                  "None",
                  "Druid",
                  "Knight",
                  "Paladin",
                  "Sorcerer",
                  "Elder Druid",
                  "Elite Knight",
                  "Royal Paladin",
                  "Master Sorcerer"
               ],
               "title": "Vocation",
               "type": "string"
            },
            "sex": {
               "description": "The sex of the character.",
               "enum": [
                  "male",
                  "female"
               ],
               "title": "Sex",
               "type": "string"
            },
            "outfit": {
               "$ref": "#/$defs/OutfitImage",
               "description": "The current outfit selected by the user."
            },
            "displayedItems": {
               "description": "The items selected to be displayed.",
               "items": {
                  "$ref": "#/$defs/ItemEntry"
               },
               "title": "Displayeditems",
               "type": "array"
            },
            "salesArguments": {
               "description": "The sale arguments selected for the auction.",
               "items": {
                  "$ref": "#/$defs/SalesArgument"
               },
               "title": "Salesarguments",
               "type": "array"
            },
            "auctionStart": {
               "description": "The date when the auction started.",
               "format": "date-time",
               "title": "Auctionstart",
               "type": "string"
            },
            "auctionEnd": {
               "description": "The date when the auction ends.",
               "format": "date-time",
               "title": "Auctionend",
               "type": "string"
            },
            "bid": {
               "description": "The current bid in Tibia Coins.",
               "title": "Bid",
               "type": "integer"
            },
            "bidType": {
               "description": "The type of the auction's bid.",
               "enum": [
                  "Minimum Bid",
                  "Current Bid",
                  "Winning Bid"
               ],
               "title": "Bidtype",
               "type": "string"
            },
            "status": {
               "description": "The current status of the auction.",
               "enum": [
                  "in progress",
                  "currently processed",
                  "will be transferred at the next server save",
                  "cancelled",
                  "finished"
               ],
               "title": "Status",
               "type": "string"
            },
            "details": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/AuctionDetails"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The auction's details."
            }
         },
         "required": [
            "auctionId",
            "name",
            "level",
            "world",
            "vocation",
            "sex",
            "outfit",
            "displayedItems",
            "salesArguments",
            "auctionStart",
            "auctionEnd",
            "bid",
            "bidType",
            "status"
         ],
         "title": "Auction",
         "type": "object"
      },
      "AuctionDetails": {
         "description": "The details of an auction.",
         "properties": {
            "hitPoints": {
               "description": "The hit points of the character.",
               "title": "Hitpoints",
               "type": "integer"
            },
            "mana": {
               "description": "The mana points of the character.",
               "title": "Mana",
               "type": "integer"
            },
            "capacity": {
               "description": "The character's capacity in ounces.",
               "title": "Capacity",
               "type": "integer"
            },
            "speed": {
               "description": "The character's speed.",
               "title": "Speed",
               "type": "integer"
            },
            "blessingsCount": {
               "description": "The number of blessings the character has.",
               "title": "Blessingscount",
               "type": "integer"
            },
            "mountsCount": {
               "description": "The number of mounts the character has.",
               "title": "Mountscount",
               "type": "integer"
            },
            "outfitsCount": {
               "description": "The number of outfits the character has.",
               "title": "Outfitscount",
               "type": "integer"
            },
            "titlesCount": {
               "description": "The number of titles the character has.",
               "title": "Titlescount",
               "type": "integer"
            },
            "skills": {
               "description": "The current skills of the character.",
               "items": {
                  "$ref": "#/$defs/SkillEntry"
               },
               "title": "Skills",
               "type": "array"
            },
            "creationDate": {
               "description": "The date when the character was created.",
               "format": "date-time",
               "title": "Creationdate",
               "type": "string"
            },
            "experience": {
               "description": "The total experience of the character.",
               "title": "Experience",
               "type": "integer"
            },
            "gold": {
               "description": "The total amount of gold the character has.",
               "title": "Gold",
               "type": "integer"
            },
            "achievementPoints": {
               "description": "The number of achievement points of the character.",
               "title": "Achievementpoints",
               "type": "integer"
            },
            "regularWorldTransferAvailableDate": {
               "anyOf": [
                  {
                     "format": "date-time",
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The date after regular world transfers will be available to purchase and use.\n:obj:`None` indicates it is available immediately.",
               "title": "Regularworldtransferavailabledate"
            },
            "charmExpansion": {
               "description": "Whether the character has a charm expansion or not.",
               "title": "Charmexpansion",
               "type": "boolean"
            },
            "availableCharmPoints": {
               "description": "The amount of charm points the character has available to spend.",
               "title": "Availablecharmpoints",
               "type": "integer"
            },
            "spentCharmPoints": {
               "description": "The total charm points the character has spent.",
               "title": "Spentcharmpoints",
               "type": "integer"
            },
            "preyWildcards": {
               "description": "The number of Prey Wildcards the character has.",
               "title": "Preywildcards",
               "type": "integer"
            },
            "dailyRewardStreak": {
               "description": "The current daily reward streak.",
               "title": "Dailyrewardstreak",
               "type": "integer"
            },
            "huntingTaskPoints": {
               "title": "Huntingtaskpoints",
               "type": "integer"
            },
            "permanentHuntingTaskSlots": {
               "description": "The number of hunting task slots.",
               "title": "Permanenthuntingtaskslots",
               "type": "integer"
            },
            "permanentPreySlots": {
               "description": "The number of prey slots.",
               "title": "Permanentpreyslots",
               "type": "integer"
            },
            "hirelings": {
               "description": "The number of hirelings the character has.",
               "title": "Hirelings",
               "type": "integer"
            },
            "hirelingJobs": {
               "description": "The number of hireling jobs the character has.",
               "title": "Hirelingjobs",
               "type": "integer"
            },
            "hirelingOutfits": {
               "description": "The number of hireling outfits the character has.",
               "title": "Hirelingoutfits",
               "type": "integer"
            },
            "exaltedDust": {
               "description": "The amount of exalted dust the character has.",
               "title": "Exalteddust",
               "type": "integer"
            },
            "exaltedDustLimit": {
               "description": "The dust limit of the character.",
               "title": "Exalteddustlimit",
               "type": "integer"
            },
            "bossPoints": {
               "description": "The boss points of the character.",
               "title": "Bosspoints",
               "type": "integer"
            },
            "bonusPromotionPoints": {
               "description": "The bonus promotion points of the character.",
               "title": "Bonuspromotionpoints",
               "type": "integer"
            },
            "items": {
               "$ref": "#/$defs/ItemSummary",
               "description": "The items the character has across inventory, depot and item stash."
            },
            "storeItems": {
               "$ref": "#/$defs/ItemSummary",
               "description": "The store items the character has."
            },
            "mounts": {
               "$ref": "#/$defs/Mounts",
               "description": "The mounts the character has unlocked."
            },
            "storeMounts": {
               "$ref": "#/$defs/Mounts",
               "description": "The mounts the character has purchased from the store."
            },
            "outfits": {
               "$ref": "#/$defs/Outfits",
               "description": "The outfits the character has unlocked."
            },
            "storeOutfits": {
               "$ref": "#/$defs/Outfits",
               "description": "The outfits the character has purchased from the store."
            },
            "familiars": {
               "$ref": "#/$defs/Familiars",
               "description": "The familiars the character has purchased or unlocked."
            },
            "blessings": {
               "description": "The blessings the character has.",
               "items": {
                  "$ref": "#/$defs/BlessingEntry"
               },
               "title": "Blessings",
               "type": "array"
            },
            "imbuements": {
               "description": "The imbuements the character has unlocked access to.",
               "items": {
                  "type": "string"
               },
               "title": "Imbuements",
               "type": "array"
            },
            "charms": {
               "description": "The charms the character has unlocked.",
               "items": {
                  "$ref": "#/$defs/CharmEntry"
               },
               "title": "Charms",
               "type": "array"
            },
            "completedCyclopediaMapAreas": {
               "description": "The cyclopedia map areas that the character has fully discovered.",
               "items": {
                  "type": "string"
               },
               "title": "Completedcyclopediamapareas",
               "type": "array"
            },
            "completedQuestLines": {
               "description": "The quest lines the character has fully completed.",
               "items": {
                  "type": "string"
               },
               "title": "Completedquestlines",
               "type": "array"
            },
            "titles": {
               "description": "The titles the character has unlocked.",
               "items": {
                  "type": "string"
               },
               "title": "Titles",
               "type": "array"
            },
            "achievements": {
               "description": "The achievements the character has unlocked.",
               "items": {
                  "$ref": "#/$defs/AchievementEntry"
               },
               "title": "Achievements",
               "type": "array"
            },
            "bestiaryProgress": {
               "description": "The bestiary progress of the character.",
               "items": {
                  "$ref": "#/$defs/BestiaryEntry"
               },
               "title": "Bestiaryprogress",
               "type": "array"
            },
            "bosstiaryProgress": {
               "description": "The bosstiary progress of the character.",
               "items": {
                  "$ref": "#/$defs/BestiaryEntry"
               },
               "title": "Bosstiaryprogress",
               "type": "array"
            },
            "revealedGems": {
               "description": "The gems that have been revealed by the character.",
               "items": {
                  "$ref": "#/$defs/RevealedGem"
               },
               "title": "Revealedgems",
               "type": "array"
            }
         },
         "required": [
            "hitPoints",
            "mana",
            "capacity",
            "speed",
            "blessingsCount",
            "mountsCount",
            "outfitsCount",
            "titlesCount",
            "skills",
            "creationDate",
            "experience",
            "gold",
            "achievementPoints",
            "charmExpansion",
            "availableCharmPoints",
            "spentCharmPoints",
            "preyWildcards",
            "dailyRewardStreak",
            "huntingTaskPoints",
            "permanentHuntingTaskSlots",
            "permanentPreySlots",
            "hirelings",
            "hirelingJobs",
            "hirelingOutfits",
            "exaltedDust",
            "exaltedDustLimit",
            "bossPoints",
            "bonusPromotionPoints",
            "items",
            "storeItems",
            "mounts",
            "storeMounts",
            "outfits",
            "storeOutfits",
            "familiars",
            "blessings",
            "imbuements",
            "charms",
            "completedCyclopediaMapAreas",
            "completedQuestLines",
            "titles",
            "achievements",
            "bestiaryProgress",
            "bosstiaryProgress",
            "revealedGems"
         ],
         "title": "AuctionDetails",
         "type": "object"
      },
      "AuctionFilters": {
         "description": "The auction filters available in the auctions section.\n\nAll attributes are optional.",
         "properties": {
            "world": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The character's world to show characters for.",
               "title": "World"
            },
            "pvpType": {
               "anyOf": [
                  {
                     "enum": [
                        "OPEN_PVP",
                        "OPTIONAL_PVP",
                        "HARDCORE_PVP",
                        "RETRO_OPEN_PVP",
                        "RETRO_HARDCORE_PVP"
                     ],
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The PvP type of the character's worlds to show.",
               "title": "Pvptype"
            },
            "battleye": {
               "anyOf": [
                  {
                     "enum": [
                        "INITIALLY_PROTECTED",
                        "PROTECTED",
                        "NOT_PROTECTED"
                     ],
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The type of BattlEye protection of the character's worlds to show.",
               "title": "Battleye"
            },
            "vocation": {
               "anyOf": [
                  {
                     "enum": [
                        "NONE",
                        "DRUID",
                        "KNIGHT",
                        "PALADIN",
                        "SORCERER"
                     ],
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The character vocation to show results for.",
               "title": "Vocation"
            },
            "minLevel": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The minimum level to display.",
               "title": "Minlevel"
            },
            "maxLevel": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The maximum level to display.",
               "title": "Maxlevel"
            },
            "skill": {
               "anyOf": [
                  {
                     "enum": [
                        "AXE_FIGHTING",
                        "CLUB_FIGHTING",
                        "DISTANCE_FIGHTING",
                        "FISHING",
                        "FIST_FIGHTING",
                        "MAGIC_LEVEL",
                        "SHIELDING",
                        "SWORD_FIGHTING"
                     ],
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The skill to filter by its level range.",
               "title": "Skill"
            },
            "minSkillLevel": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The minimum skill level of the selected :attr:`skill` to display.",
               "title": "Minskilllevel"
            },
            "maxSkillLevel": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The maximum skill level of the selected :attr:`skill` to display.",
               "title": "Maxskilllevel"
            },
            "orderBy": {
               "anyOf": [
                  {
                     "enum": [
                        "BID",
                        "END_DATE",
                        "LEVEL",
                        "START_DATE",
                        "AXE_FIGHTING",
                        "CLUB_FIGHTING",
                        "DISTANCE_FIGHTING",
                        "FISHING",
                        "FIST_FIGHTING",
                        "MAGIC_LEVEL",
                        "SHIELDING",
                        "SWORD_FIGHTING"
                     ],
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The column or value to order by.",
               "title": "Orderby"
            },
            "order": {
               "anyOf": [
                  {
                     "enum": [
                        "HIGHEST_LATEST",
                        "LOWEST_EARLIEST"
                     ],
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The ordering direction for the results.",
               "title": "Order"
            },
            "searchString": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The search term to filter out auctions.",
               "title": "Searchstring"
            },
            "searchType": {
               "anyOf": [
                  {
                     "enum": [
                        "ITEM_DEFAULT",
                        "ITEM_WILDCARD",
                        "CHARACTER_NAME"
                     ],
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The type of search to use. Defines the behaviour of :py:attr:`search_string`.",
               "title": "Searchtype"
            },
            "availableWorlds": {
               "default": [],
               "description": "The list of available worlds to select to filter.",
               "items": {
                  "type": "string"
               },
               "title": "Availableworlds",
               "type": "array"
            }
         },
         "title": "AuctionFilters",
         "type": "object"
      },
      "BestiaryEntry": {
         "description": "The bestiary progress for a specific creature.",
         "properties": {
            "name": {
               "description": "The name of the creature.",
               "title": "Name",
               "type": "string"
            },
            "kills": {
               "description": "The number of kills of this creature the player has done.",
               "title": "Kills",
               "type": "integer"
            },
            "step": {
               "description": "The current step to unlock this creature the character is in, where 4 is fully unlocked.",
               "title": "Step",
               "type": "integer"
            }
         },
         "required": [
            "name",
            "kills",
            "step"
         ],
         "title": "BestiaryEntry",
         "type": "object"
      },
      "BlessingEntry": {
         "description": "A character's blessings.",
         "properties": {
            "name": {
               "description": "The name of the blessing.",
               "title": "Name",
               "type": "string"
            },
            "amount": {
               "description": "The amount of blessing charges the character has.",
               "title": "Amount",
               "type": "integer"
            }
         },
         "required": [
            "name",
            "amount"
         ],
         "title": "BlessingEntry",
         "type": "object"
      },
      "CharmEntry": {
         "description": "An unlocked charm by the character.",
         "properties": {
            "name": {
               "description": "The name of the charm.",
               "title": "Name",
               "type": "string"
            },
            "cost": {
               "description": "The cost of the charm in charm points.",
               "title": "Cost",
               "type": "integer"
            }
         },
         "required": [
            "name",
            "cost"
         ],
         "title": "CharmEntry",
         "type": "object"
      },
      "FamiliarEntry": {
         "description": "Represents a familiar owned or unlocked by the character.",
         "properties": {
            "imageUrl": {
               "description": "The URL to the image.",
               "title": "Imageurl",
               "type": "string"
            },
            "name": {
               "description": "The familiar's name.",
               "title": "Name",
               "type": "string"
            },
            "familiarId": {
               "description": "The internal ID of the familiar.",
               "title": "Familiarid",
               "type": "integer"
            }
         },
         "required": [
            "imageUrl",
            "name",
            "familiarId"
         ],
         "title": "FamiliarEntry",
         "type": "object"
      },
      "Familiars": {
         "description": "The familiars the character has unlocked or purchased.",
         "properties": {
            "currentPage": {
               "default": 1,
               "description": "The currently viewed page.",
               "title": "Currentpage",
               "type": "integer"
            },
            "totalPages": {
               "default": 1,
               "description": "The total number of pages.",
               "title": "Totalpages",
               "type": "integer"
            },
            "resultsCount": {
               "default": 0,
               "description": "The total number of entries across all pages.",
               "title": "Resultscount",
               "type": "integer"
            },
            "entries": {
               "default": [],
               "description": "The entries in this page.",
               "items": {
                  "$ref": "#/$defs/FamiliarEntry"
               },
               "title": "Entries",
               "type": "array"
            },
            "isFullyFetched": {
               "default": false,
               "description": "Whether this result set was fully fetched or not.",
               "title": "Isfullyfetched",
               "type": "boolean"
            }
         },
         "title": "Familiars",
         "type": "object"
      },
      "ItemEntry": {
         "description": "Represents an item displayed on an auction, or the character's items in the auction detail.",
         "properties": {
            "imageUrl": {
               "description": "The URL to the item's image.",
               "title": "Imageurl",
               "type": "string"
            },
            "name": {
               "description": "The item's name.",
               "title": "Name",
               "type": "string"
            },
            "description": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The item's description, if any.",
               "title": "Description"
            },
            "count": {
               "default": 1,
               "description": "The item's count.",
               "title": "Count",
               "type": "integer"
            },
            "itemId": {
               "description": "The item's client id.",
               "title": "Itemid",
               "type": "integer"
            },
            "tier": {
               "default": 0,
               "description": "The item's tier.",
               "title": "Tier",
               "type": "integer"
            }
         },
         "required": [
            "imageUrl",
            "name",
            "itemId"
         ],
         "title": "ItemEntry",
         "type": "object"
      },
      "ItemSummary": {
         "description": "Items in a character's inventory and depot.",
         "properties": {
            "currentPage": {
               "default": 1,
               "description": "The currently viewed page.",
               "title": "Currentpage",
               "type": "integer"
            },
            "totalPages": {
               "default": 1,
               "description": "The total number of pages.",
               "title": "Totalpages",
               "type": "integer"
            },
            "resultsCount": {
               "default": 0,
               "description": "The total number of entries across all pages.",
               "title": "Resultscount",
               "type": "integer"
            },
            "entries": {
               "default": [],
               "description": "The entries in this page.",
               "items": {
                  "$ref": "#/$defs/ItemEntry"
               },
               "title": "Entries",
               "type": "array"
            },
            "isFullyFetched": {
               "default": false,
               "description": "Whether this result set was fully fetched or not.",
               "title": "Isfullyfetched",
               "type": "boolean"
            }
         },
         "title": "ItemSummary",
         "type": "object"
      },
      "MountEntry": {
         "description": "Represents a mount owned or unlocked by the character.",
         "properties": {
            "imageUrl": {
               "description": "The URL to the image.",
               "title": "Imageurl",
               "type": "string"
            },
            "name": {
               "description": "The mount's name.",
               "title": "Name",
               "type": "string"
            },
            "mountId": {
               "description": "The internal ID of the mount.",
               "title": "Mountid",
               "type": "integer"
            }
         },
         "required": [
            "imageUrl",
            "name",
            "mountId"
         ],
         "title": "MountEntry",
         "type": "object"
      },
      "Mounts": {
         "description": "The mounts the character has unlocked or purchased.",
         "properties": {
            "currentPage": {
               "default": 1,
               "description": "The currently viewed page.",
               "title": "Currentpage",
               "type": "integer"
            },
            "totalPages": {
               "default": 1,
               "description": "The total number of pages.",
               "title": "Totalpages",
               "type": "integer"
            },
            "resultsCount": {
               "default": 0,
               "description": "The total number of entries across all pages.",
               "title": "Resultscount",
               "type": "integer"
            },
            "entries": {
               "default": [],
               "description": "The entries in this page.",
               "items": {
                  "$ref": "#/$defs/MountEntry"
               },
               "title": "Entries",
               "type": "array"
            },
            "isFullyFetched": {
               "default": false,
               "description": "Whether this result set was fully fetched or not.",
               "title": "Isfullyfetched",
               "type": "boolean"
            }
         },
         "title": "Mounts",
         "type": "object"
      },
      "OutfitEntry": {
         "description": "Represents an outfit owned or unlocked by the character.",
         "properties": {
            "outfitId": {
               "description": "The internal ID of the outfit.",
               "title": "Outfitid",
               "type": "integer"
            },
            "addons": {
               "description": "The selected or unlocked addons.",
               "title": "Addons",
               "type": "integer"
            },
            "imageUrl": {
               "description": "The URL to the image.",
               "title": "Imageurl",
               "type": "string"
            },
            "name": {
               "description": "The outfit's name.",
               "title": "Name",
               "type": "string"
            }
         },
         "required": [
            "outfitId",
            "addons",
            "imageUrl",
            "name"
         ],
         "title": "OutfitEntry",
         "type": "object"
      },
      "OutfitImage": {
         "description": "The image of the outfit currently being worn by the character.",
         "properties": {
            "outfitId": {
               "description": "The ID of the outfit.",
               "title": "Outfitid",
               "type": "integer"
            },
            "addons": {
               "description": "The addons displayed in the outfit.",
               "title": "Addons",
               "type": "integer"
            },
            "imageUrl": {
               "description": "The URL of the image.",
               "title": "Imageurl",
               "type": "string"
            }
         },
         "required": [
            "outfitId",
            "addons",
            "imageUrl"
         ],
         "title": "OutfitImage",
         "type": "object"
      },
      "Outfits": {
         "description": "The outfits the character has unlocked or purchased.",
         "properties": {
            "currentPage": {
               "default": 1,
               "description": "The currently viewed page.",
               "title": "Currentpage",
               "type": "integer"
            },
            "totalPages": {
               "default": 1,
               "description": "The total number of pages.",
               "title": "Totalpages",
               "type": "integer"
            },
            "resultsCount": {
               "default": 0,
               "description": "The total number of entries across all pages.",
               "title": "Resultscount",
               "type": "integer"
            },
            "entries": {
               "default": [],
               "description": "The entries in this page.",
               "items": {
                  "$ref": "#/$defs/OutfitEntry"
               },
               "title": "Entries",
               "type": "array"
            },
            "isFullyFetched": {
               "default": false,
               "description": "Whether this result set was fully fetched or not.",
               "title": "Isfullyfetched",
               "type": "boolean"
            }
         },
         "title": "Outfits",
         "type": "object"
      },
      "RevealedGem": {
         "description": "A gem that has been revealed for the character.",
         "properties": {
            "gemType": {
               "description": "The type of gem.",
               "title": "Gemtype",
               "type": "string"
            },
            "mods": {
               "description": "The mods or effects the gem has.",
               "items": {
                  "type": "string"
               },
               "title": "Mods",
               "type": "array"
            }
         },
         "required": [
            "gemType",
            "mods"
         ],
         "title": "RevealedGem",
         "type": "object"
      },
      "SalesArgument": {
         "description": "Represents a sales argument.\n\nSales arguments can be selected when creating an auction, and allow the user to highlight certain\ncharacter features in the auction listing.",
         "properties": {
            "categoryId": {
               "title": "Categoryid",
               "type": "integer"
            },
            "categoryImage": {
               "description": "The URL to the category icon.",
               "title": "Categoryimage",
               "type": "string"
            },
            "content": {
               "description": "The content of the sales argument.",
               "title": "Content",
               "type": "string"
            }
         },
         "required": [
            "categoryId",
            "categoryImage",
            "content"
         ],
         "title": "SalesArgument",
         "type": "object"
      },
      "SkillEntry": {
         "description": "Represents the character's skills.",
         "properties": {
            "name": {
               "description": "The name of the skill.",
               "title": "Name",
               "type": "string"
            },
            "level": {
               "description": "The current level.",
               "title": "Level",
               "type": "integer"
            },
            "progress": {
               "description": "The percentage of progress for the next level.",
               "title": "Progress",
               "type": "number"
            }
         },
         "required": [
            "name",
            "level",
            "progress"
         ],
         "title": "SkillEntry",
         "type": "object"
      }
   },
   "required": [
      "type"
   ]
}

Config:
  • populate_by_name: bool = True

  • alias_generator: function = <function to_camel at 0x73beb93f7e20>

  • use_attribute_docstrings: bool = True

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
  • current_page (int)

  • entries (list[tibiapy.models.pagination.T])

  • filters (tibiapy.models.bazaar.AuctionFilters | None)

  • results_count (int)

  • total_pages (int)

  • type (tibiapy.enums.BazaarType)

field current_page: int = 1 (alias 'currentPage')

The currently viewed page.

field entries: list[T] = []

The entries in this page.

field filters: Optional[AuctionFilters] = None

The currently set filtering options.

field results_count: int = 0 (alias 'resultsCount')

The total number of entries across all pages.

field total_pages: int = 1 (alias 'totalPages')

The total number of pages.

field type: BazaarType [Required]

The type of auctions being displayed, either current or auction history.

get_page_url(page)[source]

Get the URL to a given page of the bazaar.

Parameters:

page (int) – The desired page.

Returns:

The URL to the desired page.

Return type:

str

property next_page_url: str | None

The URL to the next page of the results, if available.

property previous_page_url: str | None

The URL to the previous page of the results, if available.

property url: str

The URL to the Character Bazaar with the current parameters.

pydantic model tibiapy.models.Auction[source]

Represents an auction in the list, containing the summary.

Show JSON schema
{
   "title": "Auction",
   "description": "Represents an auction in the list, containing the summary.",
   "type": "object",
   "properties": {
      "auctionId": {
         "description": "The internal id of the auction.",
         "title": "Auctionid",
         "type": "integer"
      },
      "name": {
         "description": "The name of the character.",
         "title": "Name",
         "type": "string"
      },
      "level": {
         "description": "The level of the character.",
         "title": "Level",
         "type": "integer"
      },
      "world": {
         "description": "The world the character is in.",
         "title": "World",
         "type": "string"
      },
      "vocation": {
         "description": "The vocation of the character.",
         "enum": [
            "None",
            "Druid",
            "Knight",
            "Paladin",
            "Sorcerer",
            "Elder Druid",
            "Elite Knight",
            "Royal Paladin",
            "Master Sorcerer"
         ],
         "title": "Vocation",
         "type": "string"
      },
      "sex": {
         "description": "The sex of the character.",
         "enum": [
            "male",
            "female"
         ],
         "title": "Sex",
         "type": "string"
      },
      "outfit": {
         "$ref": "#/$defs/OutfitImage",
         "description": "The current outfit selected by the user."
      },
      "displayedItems": {
         "description": "The items selected to be displayed.",
         "items": {
            "$ref": "#/$defs/ItemEntry"
         },
         "title": "Displayeditems",
         "type": "array"
      },
      "salesArguments": {
         "description": "The sale arguments selected for the auction.",
         "items": {
            "$ref": "#/$defs/SalesArgument"
         },
         "title": "Salesarguments",
         "type": "array"
      },
      "auctionStart": {
         "description": "The date when the auction started.",
         "format": "date-time",
         "title": "Auctionstart",
         "type": "string"
      },
      "auctionEnd": {
         "description": "The date when the auction ends.",
         "format": "date-time",
         "title": "Auctionend",
         "type": "string"
      },
      "bid": {
         "description": "The current bid in Tibia Coins.",
         "title": "Bid",
         "type": "integer"
      },
      "bidType": {
         "description": "The type of the auction's bid.",
         "enum": [
            "Minimum Bid",
            "Current Bid",
            "Winning Bid"
         ],
         "title": "Bidtype",
         "type": "string"
      },
      "status": {
         "description": "The current status of the auction.",
         "enum": [
            "in progress",
            "currently processed",
            "will be transferred at the next server save",
            "cancelled",
            "finished"
         ],
         "title": "Status",
         "type": "string"
      },
      "details": {
         "anyOf": [
            {
               "$ref": "#/$defs/AuctionDetails"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The auction's details."
      }
   },
   "$defs": {
      "AchievementEntry": {
         "description": "An unlocked achievement by the character.",
         "properties": {
            "name": {
               "description": "The name of the achievement.",
               "title": "Name",
               "type": "string"
            },
            "isSecret": {
               "description": "Whether the achievement is secret or not.",
               "title": "Issecret",
               "type": "boolean"
            }
         },
         "required": [
            "name",
            "isSecret"
         ],
         "title": "AchievementEntry",
         "type": "object"
      },
      "AuctionDetails": {
         "description": "The details of an auction.",
         "properties": {
            "hitPoints": {
               "description": "The hit points of the character.",
               "title": "Hitpoints",
               "type": "integer"
            },
            "mana": {
               "description": "The mana points of the character.",
               "title": "Mana",
               "type": "integer"
            },
            "capacity": {
               "description": "The character's capacity in ounces.",
               "title": "Capacity",
               "type": "integer"
            },
            "speed": {
               "description": "The character's speed.",
               "title": "Speed",
               "type": "integer"
            },
            "blessingsCount": {
               "description": "The number of blessings the character has.",
               "title": "Blessingscount",
               "type": "integer"
            },
            "mountsCount": {
               "description": "The number of mounts the character has.",
               "title": "Mountscount",
               "type": "integer"
            },
            "outfitsCount": {
               "description": "The number of outfits the character has.",
               "title": "Outfitscount",
               "type": "integer"
            },
            "titlesCount": {
               "description": "The number of titles the character has.",
               "title": "Titlescount",
               "type": "integer"
            },
            "skills": {
               "description": "The current skills of the character.",
               "items": {
                  "$ref": "#/$defs/SkillEntry"
               },
               "title": "Skills",
               "type": "array"
            },
            "creationDate": {
               "description": "The date when the character was created.",
               "format": "date-time",
               "title": "Creationdate",
               "type": "string"
            },
            "experience": {
               "description": "The total experience of the character.",
               "title": "Experience",
               "type": "integer"
            },
            "gold": {
               "description": "The total amount of gold the character has.",
               "title": "Gold",
               "type": "integer"
            },
            "achievementPoints": {
               "description": "The number of achievement points of the character.",
               "title": "Achievementpoints",
               "type": "integer"
            },
            "regularWorldTransferAvailableDate": {
               "anyOf": [
                  {
                     "format": "date-time",
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The date after regular world transfers will be available to purchase and use.\n:obj:`None` indicates it is available immediately.",
               "title": "Regularworldtransferavailabledate"
            },
            "charmExpansion": {
               "description": "Whether the character has a charm expansion or not.",
               "title": "Charmexpansion",
               "type": "boolean"
            },
            "availableCharmPoints": {
               "description": "The amount of charm points the character has available to spend.",
               "title": "Availablecharmpoints",
               "type": "integer"
            },
            "spentCharmPoints": {
               "description": "The total charm points the character has spent.",
               "title": "Spentcharmpoints",
               "type": "integer"
            },
            "preyWildcards": {
               "description": "The number of Prey Wildcards the character has.",
               "title": "Preywildcards",
               "type": "integer"
            },
            "dailyRewardStreak": {
               "description": "The current daily reward streak.",
               "title": "Dailyrewardstreak",
               "type": "integer"
            },
            "huntingTaskPoints": {
               "title": "Huntingtaskpoints",
               "type": "integer"
            },
            "permanentHuntingTaskSlots": {
               "description": "The number of hunting task slots.",
               "title": "Permanenthuntingtaskslots",
               "type": "integer"
            },
            "permanentPreySlots": {
               "description": "The number of prey slots.",
               "title": "Permanentpreyslots",
               "type": "integer"
            },
            "hirelings": {
               "description": "The number of hirelings the character has.",
               "title": "Hirelings",
               "type": "integer"
            },
            "hirelingJobs": {
               "description": "The number of hireling jobs the character has.",
               "title": "Hirelingjobs",
               "type": "integer"
            },
            "hirelingOutfits": {
               "description": "The number of hireling outfits the character has.",
               "title": "Hirelingoutfits",
               "type": "integer"
            },
            "exaltedDust": {
               "description": "The amount of exalted dust the character has.",
               "title": "Exalteddust",
               "type": "integer"
            },
            "exaltedDustLimit": {
               "description": "The dust limit of the character.",
               "title": "Exalteddustlimit",
               "type": "integer"
            },
            "bossPoints": {
               "description": "The boss points of the character.",
               "title": "Bosspoints",
               "type": "integer"
            },
            "bonusPromotionPoints": {
               "description": "The bonus promotion points of the character.",
               "title": "Bonuspromotionpoints",
               "type": "integer"
            },
            "items": {
               "$ref": "#/$defs/ItemSummary",
               "description": "The items the character has across inventory, depot and item stash."
            },
            "storeItems": {
               "$ref": "#/$defs/ItemSummary",
               "description": "The store items the character has."
            },
            "mounts": {
               "$ref": "#/$defs/Mounts",
               "description": "The mounts the character has unlocked."
            },
            "storeMounts": {
               "$ref": "#/$defs/Mounts",
               "description": "The mounts the character has purchased from the store."
            },
            "outfits": {
               "$ref": "#/$defs/Outfits",
               "description": "The outfits the character has unlocked."
            },
            "storeOutfits": {
               "$ref": "#/$defs/Outfits",
               "description": "The outfits the character has purchased from the store."
            },
            "familiars": {
               "$ref": "#/$defs/Familiars",
               "description": "The familiars the character has purchased or unlocked."
            },
            "blessings": {
               "description": "The blessings the character has.",
               "items": {
                  "$ref": "#/$defs/BlessingEntry"
               },
               "title": "Blessings",
               "type": "array"
            },
            "imbuements": {
               "description": "The imbuements the character has unlocked access to.",
               "items": {
                  "type": "string"
               },
               "title": "Imbuements",
               "type": "array"
            },
            "charms": {
               "description": "The charms the character has unlocked.",
               "items": {
                  "$ref": "#/$defs/CharmEntry"
               },
               "title": "Charms",
               "type": "array"
            },
            "completedCyclopediaMapAreas": {
               "description": "The cyclopedia map areas that the character has fully discovered.",
               "items": {
                  "type": "string"
               },
               "title": "Completedcyclopediamapareas",
               "type": "array"
            },
            "completedQuestLines": {
               "description": "The quest lines the character has fully completed.",
               "items": {
                  "type": "string"
               },
               "title": "Completedquestlines",
               "type": "array"
            },
            "titles": {
               "description": "The titles the character has unlocked.",
               "items": {
                  "type": "string"
               },
               "title": "Titles",
               "type": "array"
            },
            "achievements": {
               "description": "The achievements the character has unlocked.",
               "items": {
                  "$ref": "#/$defs/AchievementEntry"
               },
               "title": "Achievements",
               "type": "array"
            },
            "bestiaryProgress": {
               "description": "The bestiary progress of the character.",
               "items": {
                  "$ref": "#/$defs/BestiaryEntry"
               },
               "title": "Bestiaryprogress",
               "type": "array"
            },
            "bosstiaryProgress": {
               "description": "The bosstiary progress of the character.",
               "items": {
                  "$ref": "#/$defs/BestiaryEntry"
               },
               "title": "Bosstiaryprogress",
               "type": "array"
            },
            "revealedGems": {
               "description": "The gems that have been revealed by the character.",
               "items": {
                  "$ref": "#/$defs/RevealedGem"
               },
               "title": "Revealedgems",
               "type": "array"
            }
         },
         "required": [
            "hitPoints",
            "mana",
            "capacity",
            "speed",
            "blessingsCount",
            "mountsCount",
            "outfitsCount",
            "titlesCount",
            "skills",
            "creationDate",
            "experience",
            "gold",
            "achievementPoints",
            "charmExpansion",
            "availableCharmPoints",
            "spentCharmPoints",
            "preyWildcards",
            "dailyRewardStreak",
            "huntingTaskPoints",
            "permanentHuntingTaskSlots",
            "permanentPreySlots",
            "hirelings",
            "hirelingJobs",
            "hirelingOutfits",
            "exaltedDust",
            "exaltedDustLimit",
            "bossPoints",
            "bonusPromotionPoints",
            "items",
            "storeItems",
            "mounts",
            "storeMounts",
            "outfits",
            "storeOutfits",
            "familiars",
            "blessings",
            "imbuements",
            "charms",
            "completedCyclopediaMapAreas",
            "completedQuestLines",
            "titles",
            "achievements",
            "bestiaryProgress",
            "bosstiaryProgress",
            "revealedGems"
         ],
         "title": "AuctionDetails",
         "type": "object"
      },
      "BestiaryEntry": {
         "description": "The bestiary progress for a specific creature.",
         "properties": {
            "name": {
               "description": "The name of the creature.",
               "title": "Name",
               "type": "string"
            },
            "kills": {
               "description": "The number of kills of this creature the player has done.",
               "title": "Kills",
               "type": "integer"
            },
            "step": {
               "description": "The current step to unlock this creature the character is in, where 4 is fully unlocked.",
               "title": "Step",
               "type": "integer"
            }
         },
         "required": [
            "name",
            "kills",
            "step"
         ],
         "title": "BestiaryEntry",
         "type": "object"
      },
      "BlessingEntry": {
         "description": "A character's blessings.",
         "properties": {
            "name": {
               "description": "The name of the blessing.",
               "title": "Name",
               "type": "string"
            },
            "amount": {
               "description": "The amount of blessing charges the character has.",
               "title": "Amount",
               "type": "integer"
            }
         },
         "required": [
            "name",
            "amount"
         ],
         "title": "BlessingEntry",
         "type": "object"
      },
      "CharmEntry": {
         "description": "An unlocked charm by the character.",
         "properties": {
            "name": {
               "description": "The name of the charm.",
               "title": "Name",
               "type": "string"
            },
            "cost": {
               "description": "The cost of the charm in charm points.",
               "title": "Cost",
               "type": "integer"
            }
         },
         "required": [
            "name",
            "cost"
         ],
         "title": "CharmEntry",
         "type": "object"
      },
      "FamiliarEntry": {
         "description": "Represents a familiar owned or unlocked by the character.",
         "properties": {
            "imageUrl": {
               "description": "The URL to the image.",
               "title": "Imageurl",
               "type": "string"
            },
            "name": {
               "description": "The familiar's name.",
               "title": "Name",
               "type": "string"
            },
            "familiarId": {
               "description": "The internal ID of the familiar.",
               "title": "Familiarid",
               "type": "integer"
            }
         },
         "required": [
            "imageUrl",
            "name",
            "familiarId"
         ],
         "title": "FamiliarEntry",
         "type": "object"
      },
      "Familiars": {
         "description": "The familiars the character has unlocked or purchased.",
         "properties": {
            "currentPage": {
               "default": 1,
               "description": "The currently viewed page.",
               "title": "Currentpage",
               "type": "integer"
            },
            "totalPages": {
               "default": 1,
               "description": "The total number of pages.",
               "title": "Totalpages",
               "type": "integer"
            },
            "resultsCount": {
               "default": 0,
               "description": "The total number of entries across all pages.",
               "title": "Resultscount",
               "type": "integer"
            },
            "entries": {
               "default": [],
               "description": "The entries in this page.",
               "items": {
                  "$ref": "#/$defs/FamiliarEntry"
               },
               "title": "Entries",
               "type": "array"
            },
            "isFullyFetched": {
               "default": false,
               "description": "Whether this result set was fully fetched or not.",
               "title": "Isfullyfetched",
               "type": "boolean"
            }
         },
         "title": "Familiars",
         "type": "object"
      },
      "ItemEntry": {
         "description": "Represents an item displayed on an auction, or the character's items in the auction detail.",
         "properties": {
            "imageUrl": {
               "description": "The URL to the item's image.",
               "title": "Imageurl",
               "type": "string"
            },
            "name": {
               "description": "The item's name.",
               "title": "Name",
               "type": "string"
            },
            "description": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The item's description, if any.",
               "title": "Description"
            },
            "count": {
               "default": 1,
               "description": "The item's count.",
               "title": "Count",
               "type": "integer"
            },
            "itemId": {
               "description": "The item's client id.",
               "title": "Itemid",
               "type": "integer"
            },
            "tier": {
               "default": 0,
               "description": "The item's tier.",
               "title": "Tier",
               "type": "integer"
            }
         },
         "required": [
            "imageUrl",
            "name",
            "itemId"
         ],
         "title": "ItemEntry",
         "type": "object"
      },
      "ItemSummary": {
         "description": "Items in a character's inventory and depot.",
         "properties": {
            "currentPage": {
               "default": 1,
               "description": "The currently viewed page.",
               "title": "Currentpage",
               "type": "integer"
            },
            "totalPages": {
               "default": 1,
               "description": "The total number of pages.",
               "title": "Totalpages",
               "type": "integer"
            },
            "resultsCount": {
               "default": 0,
               "description": "The total number of entries across all pages.",
               "title": "Resultscount",
               "type": "integer"
            },
            "entries": {
               "default": [],
               "description": "The entries in this page.",
               "items": {
                  "$ref": "#/$defs/ItemEntry"
               },
               "title": "Entries",
               "type": "array"
            },
            "isFullyFetched": {
               "default": false,
               "description": "Whether this result set was fully fetched or not.",
               "title": "Isfullyfetched",
               "type": "boolean"
            }
         },
         "title": "ItemSummary",
         "type": "object"
      },
      "MountEntry": {
         "description": "Represents a mount owned or unlocked by the character.",
         "properties": {
            "imageUrl": {
               "description": "The URL to the image.",
               "title": "Imageurl",
               "type": "string"
            },
            "name": {
               "description": "The mount's name.",
               "title": "Name",
               "type": "string"
            },
            "mountId": {
               "description": "The internal ID of the mount.",
               "title": "Mountid",
               "type": "integer"
            }
         },
         "required": [
            "imageUrl",
            "name",
            "mountId"
         ],
         "title": "MountEntry",
         "type": "object"
      },
      "Mounts": {
         "description": "The mounts the character has unlocked or purchased.",
         "properties": {
            "currentPage": {
               "default": 1,
               "description": "The currently viewed page.",
               "title": "Currentpage",
               "type": "integer"
            },
            "totalPages": {
               "default": 1,
               "description": "The total number of pages.",
               "title": "Totalpages",
               "type": "integer"
            },
            "resultsCount": {
               "default": 0,
               "description": "The total number of entries across all pages.",
               "title": "Resultscount",
               "type": "integer"
            },
            "entries": {
               "default": [],
               "description": "The entries in this page.",
               "items": {
                  "$ref": "#/$defs/MountEntry"
               },
               "title": "Entries",
               "type": "array"
            },
            "isFullyFetched": {
               "default": false,
               "description": "Whether this result set was fully fetched or not.",
               "title": "Isfullyfetched",
               "type": "boolean"
            }
         },
         "title": "Mounts",
         "type": "object"
      },
      "OutfitEntry": {
         "description": "Represents an outfit owned or unlocked by the character.",
         "properties": {
            "outfitId": {
               "description": "The internal ID of the outfit.",
               "title": "Outfitid",
               "type": "integer"
            },
            "addons": {
               "description": "The selected or unlocked addons.",
               "title": "Addons",
               "type": "integer"
            },
            "imageUrl": {
               "description": "The URL to the image.",
               "title": "Imageurl",
               "type": "string"
            },
            "name": {
               "description": "The outfit's name.",
               "title": "Name",
               "type": "string"
            }
         },
         "required": [
            "outfitId",
            "addons",
            "imageUrl",
            "name"
         ],
         "title": "OutfitEntry",
         "type": "object"
      },
      "OutfitImage": {
         "description": "The image of the outfit currently being worn by the character.",
         "properties": {
            "outfitId": {
               "description": "The ID of the outfit.",
               "title": "Outfitid",
               "type": "integer"
            },
            "addons": {
               "description": "The addons displayed in the outfit.",
               "title": "Addons",
               "type": "integer"
            },
            "imageUrl": {
               "description": "The URL of the image.",
               "title": "Imageurl",
               "type": "string"
            }
         },
         "required": [
            "outfitId",
            "addons",
            "imageUrl"
         ],
         "title": "OutfitImage",
         "type": "object"
      },
      "Outfits": {
         "description": "The outfits the character has unlocked or purchased.",
         "properties": {
            "currentPage": {
               "default": 1,
               "description": "The currently viewed page.",
               "title": "Currentpage",
               "type": "integer"
            },
            "totalPages": {
               "default": 1,
               "description": "The total number of pages.",
               "title": "Totalpages",
               "type": "integer"
            },
            "resultsCount": {
               "default": 0,
               "description": "The total number of entries across all pages.",
               "title": "Resultscount",
               "type": "integer"
            },
            "entries": {
               "default": [],
               "description": "The entries in this page.",
               "items": {
                  "$ref": "#/$defs/OutfitEntry"
               },
               "title": "Entries",
               "type": "array"
            },
            "isFullyFetched": {
               "default": false,
               "description": "Whether this result set was fully fetched or not.",
               "title": "Isfullyfetched",
               "type": "boolean"
            }
         },
         "title": "Outfits",
         "type": "object"
      },
      "RevealedGem": {
         "description": "A gem that has been revealed for the character.",
         "properties": {
            "gemType": {
               "description": "The type of gem.",
               "title": "Gemtype",
               "type": "string"
            },
            "mods": {
               "description": "The mods or effects the gem has.",
               "items": {
                  "type": "string"
               },
               "title": "Mods",
               "type": "array"
            }
         },
         "required": [
            "gemType",
            "mods"
         ],
         "title": "RevealedGem",
         "type": "object"
      },
      "SalesArgument": {
         "description": "Represents a sales argument.\n\nSales arguments can be selected when creating an auction, and allow the user to highlight certain\ncharacter features in the auction listing.",
         "properties": {
            "categoryId": {
               "title": "Categoryid",
               "type": "integer"
            },
            "categoryImage": {
               "description": "The URL to the category icon.",
               "title": "Categoryimage",
               "type": "string"
            },
            "content": {
               "description": "The content of the sales argument.",
               "title": "Content",
               "type": "string"
            }
         },
         "required": [
            "categoryId",
            "categoryImage",
            "content"
         ],
         "title": "SalesArgument",
         "type": "object"
      },
      "SkillEntry": {
         "description": "Represents the character's skills.",
         "properties": {
            "name": {
               "description": "The name of the skill.",
               "title": "Name",
               "type": "string"
            },
            "level": {
               "description": "The current level.",
               "title": "Level",
               "type": "integer"
            },
            "progress": {
               "description": "The percentage of progress for the next level.",
               "title": "Progress",
               "type": "number"
            }
         },
         "required": [
            "name",
            "level",
            "progress"
         ],
         "title": "SkillEntry",
         "type": "object"
      }
   },
   "required": [
      "auctionId",
      "name",
      "level",
      "world",
      "vocation",
      "sex",
      "outfit",
      "displayedItems",
      "salesArguments",
      "auctionStart",
      "auctionEnd",
      "bid",
      "bidType",
      "status"
   ]
}

Config:
  • populate_by_name: bool = True

  • alias_generator: function = <function to_camel at 0x73beb93f7e20>

  • use_attribute_docstrings: bool = True

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
  • auction_end (datetime.datetime)

  • auction_id (int)

  • auction_start (datetime.datetime)

  • bid (int)

  • bid_type (tibiapy.enums.BidType)

  • details (tibiapy.models.bazaar.AuctionDetails | None)

  • displayed_items (list[tibiapy.models.bazaar.ItemEntry])

  • level (int)

  • name (str)

  • outfit (tibiapy.models.bazaar.OutfitImage)

  • sales_arguments (list[tibiapy.models.bazaar.SalesArgument])

  • sex (tibiapy.enums.Sex)

  • status (tibiapy.enums.AuctionStatus)

  • vocation (tibiapy.enums.Vocation)

  • world (str)

field auction_end: datetime [Required] (alias 'auctionEnd')

The date when the auction ends.

field auction_id: int [Required] (alias 'auctionId')

The internal id of the auction.

field auction_start: datetime [Required] (alias 'auctionStart')

The date when the auction started.

field bid: int [Required]

The current bid in Tibia Coins.

field bid_type: BidType [Required] (alias 'bidType')

The type of the auction’s bid.

field details: Optional[AuctionDetails] = None

The auction’s details.

field displayed_items: list[ItemEntry] [Required] (alias 'displayedItems')

The items selected to be displayed.

field level: int [Required]

The level of the character.

field name: str [Required]

The name of the character.

field outfit: OutfitImage [Required]

The current outfit selected by the user.

field sales_arguments: list[SalesArgument] [Required] (alias 'salesArguments')

The sale arguments selected for the auction.

field sex: Sex [Required]

The sex of the character.

field status: AuctionStatus [Required]

The current status of the auction.

field vocation: Vocation [Required]

The vocation of the character.

field world: str [Required]

The world the character is in.

property character_url: str

The URL of the character’s information page on Tibia.com.

property url: str

The URL to this auction’s detail page on Tibia.com.

pydantic model tibiapy.models.AuctionDetails[source]

The details of an auction.

Show JSON schema
{
   "title": "AuctionDetails",
   "description": "The details of an auction.",
   "type": "object",
   "properties": {
      "hitPoints": {
         "description": "The hit points of the character.",
         "title": "Hitpoints",
         "type": "integer"
      },
      "mana": {
         "description": "The mana points of the character.",
         "title": "Mana",
         "type": "integer"
      },
      "capacity": {
         "description": "The character's capacity in ounces.",
         "title": "Capacity",
         "type": "integer"
      },
      "speed": {
         "description": "The character's speed.",
         "title": "Speed",
         "type": "integer"
      },
      "blessingsCount": {
         "description": "The number of blessings the character has.",
         "title": "Blessingscount",
         "type": "integer"
      },
      "mountsCount": {
         "description": "The number of mounts the character has.",
         "title": "Mountscount",
         "type": "integer"
      },
      "outfitsCount": {
         "description": "The number of outfits the character has.",
         "title": "Outfitscount",
         "type": "integer"
      },
      "titlesCount": {
         "description": "The number of titles the character has.",
         "title": "Titlescount",
         "type": "integer"
      },
      "skills": {
         "description": "The current skills of the character.",
         "items": {
            "$ref": "#/$defs/SkillEntry"
         },
         "title": "Skills",
         "type": "array"
      },
      "creationDate": {
         "description": "The date when the character was created.",
         "format": "date-time",
         "title": "Creationdate",
         "type": "string"
      },
      "experience": {
         "description": "The total experience of the character.",
         "title": "Experience",
         "type": "integer"
      },
      "gold": {
         "description": "The total amount of gold the character has.",
         "title": "Gold",
         "type": "integer"
      },
      "achievementPoints": {
         "description": "The number of achievement points of the character.",
         "title": "Achievementpoints",
         "type": "integer"
      },
      "regularWorldTransferAvailableDate": {
         "anyOf": [
            {
               "format": "date-time",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The date after regular world transfers will be available to purchase and use.\n:obj:`None` indicates it is available immediately.",
         "title": "Regularworldtransferavailabledate"
      },
      "charmExpansion": {
         "description": "Whether the character has a charm expansion or not.",
         "title": "Charmexpansion",
         "type": "boolean"
      },
      "availableCharmPoints": {
         "description": "The amount of charm points the character has available to spend.",
         "title": "Availablecharmpoints",
         "type": "integer"
      },
      "spentCharmPoints": {
         "description": "The total charm points the character has spent.",
         "title": "Spentcharmpoints",
         "type": "integer"
      },
      "preyWildcards": {
         "description": "The number of Prey Wildcards the character has.",
         "title": "Preywildcards",
         "type": "integer"
      },
      "dailyRewardStreak": {
         "description": "The current daily reward streak.",
         "title": "Dailyrewardstreak",
         "type": "integer"
      },
      "huntingTaskPoints": {
         "title": "Huntingtaskpoints",
         "type": "integer"
      },
      "permanentHuntingTaskSlots": {
         "description": "The number of hunting task slots.",
         "title": "Permanenthuntingtaskslots",
         "type": "integer"
      },
      "permanentPreySlots": {
         "description": "The number of prey slots.",
         "title": "Permanentpreyslots",
         "type": "integer"
      },
      "hirelings": {
         "description": "The number of hirelings the character has.",
         "title": "Hirelings",
         "type": "integer"
      },
      "hirelingJobs": {
         "description": "The number of hireling jobs the character has.",
         "title": "Hirelingjobs",
         "type": "integer"
      },
      "hirelingOutfits": {
         "description": "The number of hireling outfits the character has.",
         "title": "Hirelingoutfits",
         "type": "integer"
      },
      "exaltedDust": {
         "description": "The amount of exalted dust the character has.",
         "title": "Exalteddust",
         "type": "integer"
      },
      "exaltedDustLimit": {
         "description": "The dust limit of the character.",
         "title": "Exalteddustlimit",
         "type": "integer"
      },
      "bossPoints": {
         "description": "The boss points of the character.",
         "title": "Bosspoints",
         "type": "integer"
      },
      "bonusPromotionPoints": {
         "description": "The bonus promotion points of the character.",
         "title": "Bonuspromotionpoints",
         "type": "integer"
      },
      "items": {
         "$ref": "#/$defs/ItemSummary",
         "description": "The items the character has across inventory, depot and item stash."
      },
      "storeItems": {
         "$ref": "#/$defs/ItemSummary",
         "description": "The store items the character has."
      },
      "mounts": {
         "$ref": "#/$defs/Mounts",
         "description": "The mounts the character has unlocked."
      },
      "storeMounts": {
         "$ref": "#/$defs/Mounts",
         "description": "The mounts the character has purchased from the store."
      },
      "outfits": {
         "$ref": "#/$defs/Outfits",
         "description": "The outfits the character has unlocked."
      },
      "storeOutfits": {
         "$ref": "#/$defs/Outfits",
         "description": "The outfits the character has purchased from the store."
      },
      "familiars": {
         "$ref": "#/$defs/Familiars",
         "description": "The familiars the character has purchased or unlocked."
      },
      "blessings": {
         "description": "The blessings the character has.",
         "items": {
            "$ref": "#/$defs/BlessingEntry"
         },
         "title": "Blessings",
         "type": "array"
      },
      "imbuements": {
         "description": "The imbuements the character has unlocked access to.",
         "items": {
            "type": "string"
         },
         "title": "Imbuements",
         "type": "array"
      },
      "charms": {
         "description": "The charms the character has unlocked.",
         "items": {
            "$ref": "#/$defs/CharmEntry"
         },
         "title": "Charms",
         "type": "array"
      },
      "completedCyclopediaMapAreas": {
         "description": "The cyclopedia map areas that the character has fully discovered.",
         "items": {
            "type": "string"
         },
         "title": "Completedcyclopediamapareas",
         "type": "array"
      },
      "completedQuestLines": {
         "description": "The quest lines the character has fully completed.",
         "items": {
            "type": "string"
         },
         "title": "Completedquestlines",
         "type": "array"
      },
      "titles": {
         "description": "The titles the character has unlocked.",
         "items": {
            "type": "string"
         },
         "title": "Titles",
         "type": "array"
      },
      "achievements": {
         "description": "The achievements the character has unlocked.",
         "items": {
            "$ref": "#/$defs/AchievementEntry"
         },
         "title": "Achievements",
         "type": "array"
      },
      "bestiaryProgress": {
         "description": "The bestiary progress of the character.",
         "items": {
            "$ref": "#/$defs/BestiaryEntry"
         },
         "title": "Bestiaryprogress",
         "type": "array"
      },
      "bosstiaryProgress": {
         "description": "The bosstiary progress of the character.",
         "items": {
            "$ref": "#/$defs/BestiaryEntry"
         },
         "title": "Bosstiaryprogress",
         "type": "array"
      },
      "revealedGems": {
         "description": "The gems that have been revealed by the character.",
         "items": {
            "$ref": "#/$defs/RevealedGem"
         },
         "title": "Revealedgems",
         "type": "array"
      }
   },
   "$defs": {
      "AchievementEntry": {
         "description": "An unlocked achievement by the character.",
         "properties": {
            "name": {
               "description": "The name of the achievement.",
               "title": "Name",
               "type": "string"
            },
            "isSecret": {
               "description": "Whether the achievement is secret or not.",
               "title": "Issecret",
               "type": "boolean"
            }
         },
         "required": [
            "name",
            "isSecret"
         ],
         "title": "AchievementEntry",
         "type": "object"
      },
      "BestiaryEntry": {
         "description": "The bestiary progress for a specific creature.",
         "properties": {
            "name": {
               "description": "The name of the creature.",
               "title": "Name",
               "type": "string"
            },
            "kills": {
               "description": "The number of kills of this creature the player has done.",
               "title": "Kills",
               "type": "integer"
            },
            "step": {
               "description": "The current step to unlock this creature the character is in, where 4 is fully unlocked.",
               "title": "Step",
               "type": "integer"
            }
         },
         "required": [
            "name",
            "kills",
            "step"
         ],
         "title": "BestiaryEntry",
         "type": "object"
      },
      "BlessingEntry": {
         "description": "A character's blessings.",
         "properties": {
            "name": {
               "description": "The name of the blessing.",
               "title": "Name",
               "type": "string"
            },
            "amount": {
               "description": "The amount of blessing charges the character has.",
               "title": "Amount",
               "type": "integer"
            }
         },
         "required": [
            "name",
            "amount"
         ],
         "title": "BlessingEntry",
         "type": "object"
      },
      "CharmEntry": {
         "description": "An unlocked charm by the character.",
         "properties": {
            "name": {
               "description": "The name of the charm.",
               "title": "Name",
               "type": "string"
            },
            "cost": {
               "description": "The cost of the charm in charm points.",
               "title": "Cost",
               "type": "integer"
            }
         },
         "required": [
            "name",
            "cost"
         ],
         "title": "CharmEntry",
         "type": "object"
      },
      "FamiliarEntry": {
         "description": "Represents a familiar owned or unlocked by the character.",
         "properties": {
            "imageUrl": {
               "description": "The URL to the image.",
               "title": "Imageurl",
               "type": "string"
            },
            "name": {
               "description": "The familiar's name.",
               "title": "Name",
               "type": "string"
            },
            "familiarId": {
               "description": "The internal ID of the familiar.",
               "title": "Familiarid",
               "type": "integer"
            }
         },
         "required": [
            "imageUrl",
            "name",
            "familiarId"
         ],
         "title": "FamiliarEntry",
         "type": "object"
      },
      "Familiars": {
         "description": "The familiars the character has unlocked or purchased.",
         "properties": {
            "currentPage": {
               "default": 1,
               "description": "The currently viewed page.",
               "title": "Currentpage",
               "type": "integer"
            },
            "totalPages": {
               "default": 1,
               "description": "The total number of pages.",
               "title": "Totalpages",
               "type": "integer"
            },
            "resultsCount": {
               "default": 0,
               "description": "The total number of entries across all pages.",
               "title": "Resultscount",
               "type": "integer"
            },
            "entries": {
               "default": [],
               "description": "The entries in this page.",
               "items": {
                  "$ref": "#/$defs/FamiliarEntry"
               },
               "title": "Entries",
               "type": "array"
            },
            "isFullyFetched": {
               "default": false,
               "description": "Whether this result set was fully fetched or not.",
               "title": "Isfullyfetched",
               "type": "boolean"
            }
         },
         "title": "Familiars",
         "type": "object"
      },
      "ItemEntry": {
         "description": "Represents an item displayed on an auction, or the character's items in the auction detail.",
         "properties": {
            "imageUrl": {
               "description": "The URL to the item's image.",
               "title": "Imageurl",
               "type": "string"
            },
            "name": {
               "description": "The item's name.",
               "title": "Name",
               "type": "string"
            },
            "description": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The item's description, if any.",
               "title": "Description"
            },
            "count": {
               "default": 1,
               "description": "The item's count.",
               "title": "Count",
               "type": "integer"
            },
            "itemId": {
               "description": "The item's client id.",
               "title": "Itemid",
               "type": "integer"
            },
            "tier": {
               "default": 0,
               "description": "The item's tier.",
               "title": "Tier",
               "type": "integer"
            }
         },
         "required": [
            "imageUrl",
            "name",
            "itemId"
         ],
         "title": "ItemEntry",
         "type": "object"
      },
      "ItemSummary": {
         "description": "Items in a character's inventory and depot.",
         "properties": {
            "currentPage": {
               "default": 1,
               "description": "The currently viewed page.",
               "title": "Currentpage",
               "type": "integer"
            },
            "totalPages": {
               "default": 1,
               "description": "The total number of pages.",
               "title": "Totalpages",
               "type": "integer"
            },
            "resultsCount": {
               "default": 0,
               "description": "The total number of entries across all pages.",
               "title": "Resultscount",
               "type": "integer"
            },
            "entries": {
               "default": [],
               "description": "The entries in this page.",
               "items": {
                  "$ref": "#/$defs/ItemEntry"
               },
               "title": "Entries",
               "type": "array"
            },
            "isFullyFetched": {
               "default": false,
               "description": "Whether this result set was fully fetched or not.",
               "title": "Isfullyfetched",
               "type": "boolean"
            }
         },
         "title": "ItemSummary",
         "type": "object"
      },
      "MountEntry": {
         "description": "Represents a mount owned or unlocked by the character.",
         "properties": {
            "imageUrl": {
               "description": "The URL to the image.",
               "title": "Imageurl",
               "type": "string"
            },
            "name": {
               "description": "The mount's name.",
               "title": "Name",
               "type": "string"
            },
            "mountId": {
               "description": "The internal ID of the mount.",
               "title": "Mountid",
               "type": "integer"
            }
         },
         "required": [
            "imageUrl",
            "name",
            "mountId"
         ],
         "title": "MountEntry",
         "type": "object"
      },
      "Mounts": {
         "description": "The mounts the character has unlocked or purchased.",
         "properties": {
            "currentPage": {
               "default": 1,
               "description": "The currently viewed page.",
               "title": "Currentpage",
               "type": "integer"
            },
            "totalPages": {
               "default": 1,
               "description": "The total number of pages.",
               "title": "Totalpages",
               "type": "integer"
            },
            "resultsCount": {
               "default": 0,
               "description": "The total number of entries across all pages.",
               "title": "Resultscount",
               "type": "integer"
            },
            "entries": {
               "default": [],
               "description": "The entries in this page.",
               "items": {
                  "$ref": "#/$defs/MountEntry"
               },
               "title": "Entries",
               "type": "array"
            },
            "isFullyFetched": {
               "default": false,
               "description": "Whether this result set was fully fetched or not.",
               "title": "Isfullyfetched",
               "type": "boolean"
            }
         },
         "title": "Mounts",
         "type": "object"
      },
      "OutfitEntry": {
         "description": "Represents an outfit owned or unlocked by the character.",
         "properties": {
            "outfitId": {
               "description": "The internal ID of the outfit.",
               "title": "Outfitid",
               "type": "integer"
            },
            "addons": {
               "description": "The selected or unlocked addons.",
               "title": "Addons",
               "type": "integer"
            },
            "imageUrl": {
               "description": "The URL to the image.",
               "title": "Imageurl",
               "type": "string"
            },
            "name": {
               "description": "The outfit's name.",
               "title": "Name",
               "type": "string"
            }
         },
         "required": [
            "outfitId",
            "addons",
            "imageUrl",
            "name"
         ],
         "title": "OutfitEntry",
         "type": "object"
      },
      "Outfits": {
         "description": "The outfits the character has unlocked or purchased.",
         "properties": {
            "currentPage": {
               "default": 1,
               "description": "The currently viewed page.",
               "title": "Currentpage",
               "type": "integer"
            },
            "totalPages": {
               "default": 1,
               "description": "The total number of pages.",
               "title": "Totalpages",
               "type": "integer"
            },
            "resultsCount": {
               "default": 0,
               "description": "The total number of entries across all pages.",
               "title": "Resultscount",
               "type": "integer"
            },
            "entries": {
               "default": [],
               "description": "The entries in this page.",
               "items": {
                  "$ref": "#/$defs/OutfitEntry"
               },
               "title": "Entries",
               "type": "array"
            },
            "isFullyFetched": {
               "default": false,
               "description": "Whether this result set was fully fetched or not.",
               "title": "Isfullyfetched",
               "type": "boolean"
            }
         },
         "title": "Outfits",
         "type": "object"
      },
      "RevealedGem": {
         "description": "A gem that has been revealed for the character.",
         "properties": {
            "gemType": {
               "description": "The type of gem.",
               "title": "Gemtype",
               "type": "string"
            },
            "mods": {
               "description": "The mods or effects the gem has.",
               "items": {
                  "type": "string"
               },
               "title": "Mods",
               "type": "array"
            }
         },
         "required": [
            "gemType",
            "mods"
         ],
         "title": "RevealedGem",
         "type": "object"
      },
      "SkillEntry": {
         "description": "Represents the character's skills.",
         "properties": {
            "name": {
               "description": "The name of the skill.",
               "title": "Name",
               "type": "string"
            },
            "level": {
               "description": "The current level.",
               "title": "Level",
               "type": "integer"
            },
            "progress": {
               "description": "The percentage of progress for the next level.",
               "title": "Progress",
               "type": "number"
            }
         },
         "required": [
            "name",
            "level",
            "progress"
         ],
         "title": "SkillEntry",
         "type": "object"
      }
   },
   "required": [
      "hitPoints",
      "mana",
      "capacity",
      "speed",
      "blessingsCount",
      "mountsCount",
      "outfitsCount",
      "titlesCount",
      "skills",
      "creationDate",
      "experience",
      "gold",
      "achievementPoints",
      "charmExpansion",
      "availableCharmPoints",
      "spentCharmPoints",
      "preyWildcards",
      "dailyRewardStreak",
      "huntingTaskPoints",
      "permanentHuntingTaskSlots",
      "permanentPreySlots",
      "hirelings",
      "hirelingJobs",
      "hirelingOutfits",
      "exaltedDust",
      "exaltedDustLimit",
      "bossPoints",
      "bonusPromotionPoints",
      "items",
      "storeItems",
      "mounts",
      "storeMounts",
      "outfits",
      "storeOutfits",
      "familiars",
      "blessings",
      "imbuements",
      "charms",
      "completedCyclopediaMapAreas",
      "completedQuestLines",
      "titles",
      "achievements",
      "bestiaryProgress",
      "bosstiaryProgress",
      "revealedGems"
   ]
}

Config:
  • populate_by_name: bool = True

  • alias_generator: function = <function to_camel at 0x73beb93f7e20>

  • use_attribute_docstrings: bool = True

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
  • achievement_points (int)

  • achievements (list[tibiapy.models.bazaar.AchievementEntry])

  • available_charm_points (int)

  • bestiary_progress (list[tibiapy.models.bazaar.BestiaryEntry])

  • blessings (list[tibiapy.models.bazaar.BlessingEntry])

  • blessings_count (int)

  • bonus_promotion_points (int)

  • boss_points (int)

  • bosstiary_progress (list[tibiapy.models.bazaar.BestiaryEntry])

  • capacity (int)

  • charm_expansion (bool)

  • charms (list[tibiapy.models.bazaar.CharmEntry])

  • completed_cyclopedia_map_areas (list[str])

  • completed_quest_lines (list[str])

  • creation_date (datetime.datetime)

  • daily_reward_streak (int)

  • exalted_dust (int)

  • exalted_dust_limit (int)

  • experience (int)

  • familiars (tibiapy.models.bazaar.Familiars)

  • gold (int)

  • hireling_jobs (int)

  • hireling_outfits (int)

  • hirelings (int)

  • hit_points (int)

  • hunting_task_points (int)

  • imbuements (list[str])

  • items (tibiapy.models.bazaar.ItemSummary)

  • mana (int)

  • mounts (tibiapy.models.bazaar.Mounts)

  • mounts_count (int)

  • outfits (tibiapy.models.bazaar.Outfits)

  • outfits_count (int)

  • permanent_hunting_task_slots (int)

  • permanent_prey_slots (int)

  • prey_wildcards (int)

  • regular_world_transfer_available_date (datetime.datetime | None)

  • revealed_gems (list[tibiapy.models.bazaar.RevealedGem])

  • skills (list[tibiapy.models.bazaar.SkillEntry])

  • speed (int)

  • spent_charm_points (int)

  • store_items (tibiapy.models.bazaar.ItemSummary)

  • store_mounts (tibiapy.models.bazaar.Mounts)

  • store_outfits (tibiapy.models.bazaar.Outfits)

  • titles (list[str])

  • titles_count (int)

field achievement_points: int [Required] (alias 'achievementPoints')

The number of achievement points of the character.

field achievements: list[AchievementEntry] [Required]

The achievements the character has unlocked.

field available_charm_points: int [Required] (alias 'availableCharmPoints')

The amount of charm points the character has available to spend.

field bestiary_progress: list[BestiaryEntry] [Required] (alias 'bestiaryProgress')

The bestiary progress of the character.

field blessings: list[BlessingEntry] [Required]

The blessings the character has.

field blessings_count: int [Required] (alias 'blessingsCount')

The number of blessings the character has.

field bonus_promotion_points: int [Required] (alias 'bonusPromotionPoints')

The bonus promotion points of the character.

field boss_points: int [Required] (alias 'bossPoints')

The boss points of the character.

field bosstiary_progress: list[BestiaryEntry] [Required] (alias 'bosstiaryProgress')

The bosstiary progress of the character.

field capacity: int [Required]

The character’s capacity in ounces.

field charm_expansion: bool [Required] (alias 'charmExpansion')

Whether the character has a charm expansion or not.

field charms: list[CharmEntry] [Required]

The charms the character has unlocked.

field completed_cyclopedia_map_areas: list[str] [Required] (alias 'completedCyclopediaMapAreas')

The cyclopedia map areas that the character has fully discovered.

field completed_quest_lines: list[str] [Required] (alias 'completedQuestLines')

The quest lines the character has fully completed.

field creation_date: datetime [Required] (alias 'creationDate')

The date when the character was created.

field daily_reward_streak: int [Required] (alias 'dailyRewardStreak')

The current daily reward streak.

field exalted_dust: int [Required] (alias 'exaltedDust')

The amount of exalted dust the character has.

field exalted_dust_limit: int [Required] (alias 'exaltedDustLimit')

The dust limit of the character.

field experience: int [Required]

The total experience of the character.

field familiars: Familiars [Required]

The familiars the character has purchased or unlocked.

field gold: int [Required]

The total amount of gold the character has.

field hireling_jobs: int [Required] (alias 'hirelingJobs')

The number of hireling jobs the character has.

field hireling_outfits: int [Required] (alias 'hirelingOutfits')

The number of hireling outfits the character has.

field hirelings: int [Required]

The number of hirelings the character has.

field hit_points: int [Required] (alias 'hitPoints')

The hit points of the character.

field hunting_task_points: int [Required] (alias 'huntingTaskPoints')
field imbuements: list[str] [Required]

The imbuements the character has unlocked access to.

field items: ItemSummary [Required]

The items the character has across inventory, depot and item stash.

field mana: int [Required]

The mana points of the character.

field mounts: Mounts [Required]

The mounts the character has unlocked.

field mounts_count: int [Required] (alias 'mountsCount')

The number of mounts the character has.

field outfits: Outfits [Required]

The outfits the character has unlocked.

field outfits_count: int [Required] (alias 'outfitsCount')

The number of outfits the character has.

field permanent_hunting_task_slots: int [Required] (alias 'permanentHuntingTaskSlots')

The number of hunting task slots.

field permanent_prey_slots: int [Required] (alias 'permanentPreySlots')

The number of prey slots.

field prey_wildcards: int [Required] (alias 'preyWildcards')

The number of Prey Wildcards the character has.

field regular_world_transfer_available_date: Optional[datetime] = None (alias 'regularWorldTransferAvailableDate')

The date after regular world transfers will be available to purchase and use. None indicates it is available immediately.

The date after regular world transfers will be available to purchase and use. None indicates it is available immediately.

field revealed_gems: list[RevealedGem] [Required] (alias 'revealedGems')

The gems that have been revealed by the character.

field skills: list[SkillEntry] [Required]

The current skills of the character.

field speed: int [Required]

The character’s speed.

field spent_charm_points: int [Required] (alias 'spentCharmPoints')

The total charm points the character has spent.

field store_items: ItemSummary [Required] (alias 'storeItems')

The store items the character has.

field store_mounts: Mounts [Required] (alias 'storeMounts')

The mounts the character has purchased from the store.

field store_outfits: Outfits [Required] (alias 'storeOutfits')

The outfits the character has purchased from the store.

field titles: list[str] [Required]

The titles the character has unlocked.

field titles_count: int [Required] (alias 'titlesCount')

The number of titles the character has.

property completed_bestiary_entries: list[BestiaryEntry]

Get a list of completed bestiary entries.

property regular_world_transfer_available: bool

Whether regular world transfers are available immediately for this character.

property skills_map: dict[str, SkillEntry]

A mapping of skills by their name.

pydantic model tibiapy.models.AchievementEntry[source]

An unlocked achievement by the character.

Show JSON schema
{
   "title": "AchievementEntry",
   "description": "An unlocked achievement by the character.",
   "type": "object",
   "properties": {
      "name": {
         "description": "The name of the achievement.",
         "title": "Name",
         "type": "string"
      },
      "isSecret": {
         "description": "Whether the achievement is secret or not.",
         "title": "Issecret",
         "type": "boolean"
      }
   },
   "required": [
      "name",
      "isSecret"
   ]
}

Config:
  • populate_by_name: bool = True

  • alias_generator: function = <function to_camel at 0x73beb93f7e20>

  • use_attribute_docstrings: bool = True

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
  • is_secret (bool)

  • name (str)

field is_secret: bool [Required] (alias 'isSecret')

Whether the achievement is secret or not.

field name: str [Required]

The name of the achievement.

pydantic model tibiapy.models.AuctionFilters[source]

The auction filters available in the auctions section.

All attributes are optional.

Show JSON schema
{
   "title": "AuctionFilters",
   "description": "The auction filters available in the auctions section.\n\nAll attributes are optional.",
   "type": "object",
   "properties": {
      "world": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The character's world to show characters for.",
         "title": "World"
      },
      "pvpType": {
         "anyOf": [
            {
               "enum": [
                  "OPEN_PVP",
                  "OPTIONAL_PVP",
                  "HARDCORE_PVP",
                  "RETRO_OPEN_PVP",
                  "RETRO_HARDCORE_PVP"
               ],
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The PvP type of the character's worlds to show.",
         "title": "Pvptype"
      },
      "battleye": {
         "anyOf": [
            {
               "enum": [
                  "INITIALLY_PROTECTED",
                  "PROTECTED",
                  "NOT_PROTECTED"
               ],
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The type of BattlEye protection of the character's worlds to show.",
         "title": "Battleye"
      },
      "vocation": {
         "anyOf": [
            {
               "enum": [
                  "NONE",
                  "DRUID",
                  "KNIGHT",
                  "PALADIN",
                  "SORCERER"
               ],
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The character vocation to show results for.",
         "title": "Vocation"
      },
      "minLevel": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The minimum level to display.",
         "title": "Minlevel"
      },
      "maxLevel": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The maximum level to display.",
         "title": "Maxlevel"
      },
      "skill": {
         "anyOf": [
            {
               "enum": [
                  "AXE_FIGHTING",
                  "CLUB_FIGHTING",
                  "DISTANCE_FIGHTING",
                  "FISHING",
                  "FIST_FIGHTING",
                  "MAGIC_LEVEL",
                  "SHIELDING",
                  "SWORD_FIGHTING"
               ],
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The skill to filter by its level range.",
         "title": "Skill"
      },
      "minSkillLevel": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The minimum skill level of the selected :attr:`skill` to display.",
         "title": "Minskilllevel"
      },
      "maxSkillLevel": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The maximum skill level of the selected :attr:`skill` to display.",
         "title": "Maxskilllevel"
      },
      "orderBy": {
         "anyOf": [
            {
               "enum": [
                  "BID",
                  "END_DATE",
                  "LEVEL",
                  "START_DATE",
                  "AXE_FIGHTING",
                  "CLUB_FIGHTING",
                  "DISTANCE_FIGHTING",
                  "FISHING",
                  "FIST_FIGHTING",
                  "MAGIC_LEVEL",
                  "SHIELDING",
                  "SWORD_FIGHTING"
               ],
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The column or value to order by.",
         "title": "Orderby"
      },
      "order": {
         "anyOf": [
            {
               "enum": [
                  "HIGHEST_LATEST",
                  "LOWEST_EARLIEST"
               ],
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The ordering direction for the results.",
         "title": "Order"
      },
      "searchString": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The search term to filter out auctions.",
         "title": "Searchstring"
      },
      "searchType": {
         "anyOf": [
            {
               "enum": [
                  "ITEM_DEFAULT",
                  "ITEM_WILDCARD",
                  "CHARACTER_NAME"
               ],
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The type of search to use. Defines the behaviour of :py:attr:`search_string`.",
         "title": "Searchtype"
      },
      "availableWorlds": {
         "default": [],
         "description": "The list of available worlds to select to filter.",
         "items": {
            "type": "string"
         },
         "title": "Availableworlds",
         "type": "array"
      }
   }
}

Config:
  • populate_by_name: bool = True

  • alias_generator: function = <function to_camel at 0x73beb93f7e20>

  • use_attribute_docstrings: bool = True

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
  • available_worlds (list[str])

  • battleye (tibiapy.enums.AuctionBattlEyeFilter | None)

  • max_level (int | None)

  • max_skill_level (int | None)

  • min_level (int | None)

  • min_skill_level (int | None)

  • order (tibiapy.enums.AuctionOrderDirection | None)

  • order_by (tibiapy.enums.AuctionOrderBy | None)

  • pvp_type (tibiapy.enums.PvpTypeFilter | None)

  • search_string (str | None)

  • search_type (tibiapy.enums.AuctionSearchType | None)

  • skill (tibiapy.enums.AuctionSkillFilter | None)

  • vocation (tibiapy.enums.AuctionVocationFilter | None)

  • world (str | None)

field available_worlds: list[str] = [] (alias 'availableWorlds')

The list of available worlds to select to filter.

field battleye: Optional[AuctionBattlEyeFilter] = None

The type of BattlEye protection of the character’s worlds to show.

field max_level: Optional[int] = None (alias 'maxLevel')

The maximum level to display.

field max_skill_level: Optional[int] = None (alias 'maxSkillLevel')

The maximum skill level of the selected skill to display.

field min_level: Optional[int] = None (alias 'minLevel')

The minimum level to display.

field min_skill_level: Optional[int] = None (alias 'minSkillLevel')

The minimum skill level of the selected skill to display.

field order: Optional[AuctionOrderDirection] = None

The ordering direction for the results.

field order_by: Optional[AuctionOrderBy] = None (alias 'orderBy')

The column or value to order by.

field pvp_type: Optional[PvpTypeFilter] = None (alias 'pvpType')

The PvP type of the character’s worlds to show.

field search_string: Optional[str] = None (alias 'searchString')

The search term to filter out auctions.

field search_type: Optional[AuctionSearchType] = None (alias 'searchType')

The type of search to use. Defines the behaviour of search_string.

field skill: Optional[AuctionSkillFilter] = None

The skill to filter by its level range.

field vocation: Optional[AuctionVocationFilter] = None

The character vocation to show results for.

field world: Optional[str] = None

The character’s world to show characters for.

property query_params: dict[str, str]

The query parameters representing this filter.

pydantic model tibiapy.models.BestiaryEntry[source]

The bestiary progress for a specific creature.

Show JSON schema
{
   "title": "BestiaryEntry",
   "description": "The bestiary progress for a specific creature.",
   "type": "object",
   "properties": {
      "name": {
         "description": "The name of the creature.",
         "title": "Name",
         "type": "string"
      },
      "kills": {
         "description": "The number of kills of this creature the player has done.",
         "title": "Kills",
         "type": "integer"
      },
      "step": {
         "description": "The current step to unlock this creature the character is in, where 4 is fully unlocked.",
         "title": "Step",
         "type": "integer"
      }
   },
   "required": [
      "name",
      "kills",
      "step"
   ]
}

Config:
  • populate_by_name: bool = True

  • alias_generator: function = <function to_camel at 0x73beb93f7e20>

  • use_attribute_docstrings: bool = True

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
  • kills (int)

  • name (str)

  • step (int)

field kills: int [Required]

The number of kills of this creature the player has done.

field name: str [Required]

The name of the creature.

field step: int [Required]

The current step to unlock this creature the character is in, where 4 is fully unlocked.

property is_completed: bool

Whether the entry is completed or not.

pydantic model tibiapy.models.BlessingEntry[source]

A character’s blessings.

Show JSON schema
{
   "title": "BlessingEntry",
   "description": "A character's blessings.",
   "type": "object",
   "properties": {
      "name": {
         "description": "The name of the blessing.",
         "title": "Name",
         "type": "string"
      },
      "amount": {
         "description": "The amount of blessing charges the character has.",
         "title": "Amount",
         "type": "integer"
      }
   },
   "required": [
      "name",
      "amount"
   ]
}

Config:
  • populate_by_name: bool = True

  • alias_generator: function = <function to_camel at 0x73beb93f7e20>

  • use_attribute_docstrings: bool = True

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
  • amount (int)

  • name (str)

field amount: int [Required]

The amount of blessing charges the character has.

field name: str [Required]

The name of the blessing.

pydantic model tibiapy.models.CharmEntry[source]

An unlocked charm by the character.

Show JSON schema
{
   "title": "CharmEntry",
   "description": "An unlocked charm by the character.",
   "type": "object",
   "properties": {
      "name": {
         "description": "The name of the charm.",
         "title": "Name",
         "type": "string"
      },
      "cost": {
         "description": "The cost of the charm in charm points.",
         "title": "Cost",
         "type": "integer"
      }
   },
   "required": [
      "name",
      "cost"
   ]
}

Config:
  • populate_by_name: bool = True

  • alias_generator: function = <function to_camel at 0x73beb93f7e20>

  • use_attribute_docstrings: bool = True

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
  • cost (int)

  • name (str)

field cost: int [Required]

The cost of the charm in charm points.

field name: str [Required]

The name of the charm.

pydantic model tibiapy.models.FamiliarEntry[source]

Represents a familiar owned or unlocked by the character.

Show JSON schema
{
   "title": "FamiliarEntry",
   "description": "Represents a familiar owned or unlocked by the character.",
   "type": "object",
   "properties": {
      "imageUrl": {
         "description": "The URL to the image.",
         "title": "Imageurl",
         "type": "string"
      },
      "name": {
         "description": "The familiar's name.",
         "title": "Name",
         "type": "string"
      },
      "familiarId": {
         "description": "The internal ID of the familiar.",
         "title": "Familiarid",
         "type": "integer"
      }
   },
   "required": [
      "imageUrl",
      "name",
      "familiarId"
   ]
}

Config:
  • populate_by_name: bool = True

  • alias_generator: function = <function to_camel at 0x73beb93f7e20>

  • use_attribute_docstrings: bool = True

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
  • familiar_id (int)

  • image_url (str)

  • name (str)

field familiar_id: int [Required] (alias 'familiarId')

The internal ID of the familiar.

field image_url: str [Required] (alias 'imageUrl')

The URL to the image.

field name: str [Required]

The familiar’s name.

pydantic model tibiapy.models.ItemEntry[source]

Represents an item displayed on an auction, or the character’s items in the auction detail.

Show JSON schema
{
   "title": "ItemEntry",
   "description": "Represents an item displayed on an auction, or the character's items in the auction detail.",
   "type": "object",
   "properties": {
      "imageUrl": {
         "description": "The URL to the item's image.",
         "title": "Imageurl",
         "type": "string"
      },
      "name": {
         "description": "The item's name.",
         "title": "Name",
         "type": "string"
      },
      "description": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The item's description, if any.",
         "title": "Description"
      },
      "count": {
         "default": 1,
         "description": "The item's count.",
         "title": "Count",
         "type": "integer"
      },
      "itemId": {
         "description": "The item's client id.",
         "title": "Itemid",
         "type": "integer"
      },
      "tier": {
         "default": 0,
         "description": "The item's tier.",
         "title": "Tier",
         "type": "integer"
      }
   },
   "required": [
      "imageUrl",
      "name",
      "itemId"
   ]
}

Config:
  • populate_by_name: bool = True

  • alias_generator: function = <function to_camel at 0x73beb93f7e20>

  • use_attribute_docstrings: bool = True

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
  • count (int)

  • description (str | None)

  • image_url (str)

  • item_id (int)

  • name (str)

  • tier (int)

field count: int = 1

The item’s count.

field description: Optional[str] = None

The item’s description, if any.

field image_url: str [Required] (alias 'imageUrl')

The URL to the item’s image.

field item_id: int [Required] (alias 'itemId')

The item’s client id.

field name: str [Required]

The item’s name.

field tier: int = 0

The item’s tier.

pydantic model tibiapy.models.MountEntry[source]

Represents a mount owned or unlocked by the character.

Show JSON schema
{
   "title": "MountEntry",
   "description": "Represents a mount owned or unlocked by the character.",
   "type": "object",
   "properties": {
      "imageUrl": {
         "description": "The URL to the image.",
         "title": "Imageurl",
         "type": "string"
      },
      "name": {
         "description": "The mount's name.",
         "title": "Name",
         "type": "string"
      },
      "mountId": {
         "description": "The internal ID of the mount.",
         "title": "Mountid",
         "type": "integer"
      }
   },
   "required": [
      "imageUrl",
      "name",
      "mountId"
   ]
}

Config:
  • populate_by_name: bool = True

  • alias_generator: function = <function to_camel at 0x73beb93f7e20>

  • use_attribute_docstrings: bool = True

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
  • image_url (str)

  • mount_id (int)

  • name (str)

field image_url: str [Required] (alias 'imageUrl')

The URL to the image.

field mount_id: int [Required] (alias 'mountId')

The internal ID of the mount.

field name: str [Required]

The mount’s name.

pydantic model tibiapy.models.OutfitEntry[source]

Represents an outfit owned or unlocked by the character.

Show JSON schema
{
   "title": "OutfitEntry",
   "description": "Represents an outfit owned or unlocked by the character.",
   "type": "object",
   "properties": {
      "outfitId": {
         "description": "The internal ID of the outfit.",
         "title": "Outfitid",
         "type": "integer"
      },
      "addons": {
         "description": "The selected or unlocked addons.",
         "title": "Addons",
         "type": "integer"
      },
      "imageUrl": {
         "description": "The URL to the image.",
         "title": "Imageurl",
         "type": "string"
      },
      "name": {
         "description": "The outfit's name.",
         "title": "Name",
         "type": "string"
      }
   },
   "required": [
      "outfitId",
      "addons",
      "imageUrl",
      "name"
   ]
}

Config:
  • populate_by_name: bool = True

  • alias_generator: function = <function to_camel at 0x73beb93f7e20>

  • use_attribute_docstrings: bool = True

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
  • addons (int)

  • image_url (str)

  • name (str)

  • outfit_id (int)

field addons: int [Required]

The selected or unlocked addons.

field image_url: str [Required] (alias 'imageUrl')

The URL to the image.

field name: str [Required]

The outfit’s name.

field outfit_id: int [Required] (alias 'outfitId')

The internal ID of the outfit.

pydantic model tibiapy.models.Familiars[source]

The familiars the character has unlocked or purchased.

Show JSON schema
{
   "title": "Familiars",
   "description": "The familiars the character has unlocked or purchased.",
   "type": "object",
   "properties": {
      "currentPage": {
         "default": 1,
         "description": "The currently viewed page.",
         "title": "Currentpage",
         "type": "integer"
      },
      "totalPages": {
         "default": 1,
         "description": "The total number of pages.",
         "title": "Totalpages",
         "type": "integer"
      },
      "resultsCount": {
         "default": 0,
         "description": "The total number of entries across all pages.",
         "title": "Resultscount",
         "type": "integer"
      },
      "entries": {
         "default": [],
         "description": "The entries in this page.",
         "items": {
            "$ref": "#/$defs/FamiliarEntry"
         },
         "title": "Entries",
         "type": "array"
      },
      "isFullyFetched": {
         "default": false,
         "description": "Whether this result set was fully fetched or not.",
         "title": "Isfullyfetched",
         "type": "boolean"
      }
   },
   "$defs": {
      "FamiliarEntry": {
         "description": "Represents a familiar owned or unlocked by the character.",
         "properties": {
            "imageUrl": {
               "description": "The URL to the image.",
               "title": "Imageurl",
               "type": "string"
            },
            "name": {
               "description": "The familiar's name.",
               "title": "Name",
               "type": "string"
            },
            "familiarId": {
               "description": "The internal ID of the familiar.",
               "title": "Familiarid",
               "type": "integer"
            }
         },
         "required": [
            "imageUrl",
            "name",
            "familiarId"
         ],
         "title": "FamiliarEntry",
         "type": "object"
      }
   }
}

Config:
  • populate_by_name: bool = True

  • alias_generator: function = <function to_camel at 0x73beb93f7e20>

  • use_attribute_docstrings: bool = True

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
  • current_page (int)

  • entries (list[tibiapy.models.pagination.T])

  • is_fully_fetched (bool)

  • results_count (int)

  • total_pages (int)

field current_page: int = 1 (alias 'currentPage')

The currently viewed page.

field entries: list[T] = []

The entries in this page.

field is_fully_fetched: bool = False (alias 'isFullyFetched')

Whether this result set was fully fetched or not.

field results_count: int = 0 (alias 'resultsCount')

The total number of entries across all pages.

field total_pages: int = 1 (alias 'totalPages')

The total number of pages.

get_by_id(entry_id)[source]

Get a familiar by its familiar id.

Parameters:

entry_id (int) – The ID of the familiar.

Returns:

The familiar matching the id.

Return type:

FamiliarEntry

get_by_name(name)

Get an entry by its name.

Parameters:

name (str) – The name of the entry, case-insensitive.

Returns:

The entry matching the name.

Return type:

object

search(value)

Search an entry by its name.

Parameters:

value (str) – The value to look for.

Returns:

A list of entries with names containing the search term.

Return type:

list

pydantic model tibiapy.models.ItemSummary[source]

Items in a character’s inventory and depot.

Show JSON schema
{
   "title": "ItemSummary",
   "description": "Items in a character's inventory and depot.",
   "type": "object",
   "properties": {
      "currentPage": {
         "default": 1,
         "description": "The currently viewed page.",
         "title": "Currentpage",
         "type": "integer"
      },
      "totalPages": {
         "default": 1,
         "description": "The total number of pages.",
         "title": "Totalpages",
         "type": "integer"
      },
      "resultsCount": {
         "default": 0,
         "description": "The total number of entries across all pages.",
         "title": "Resultscount",
         "type": "integer"
      },
      "entries": {
         "default": [],
         "description": "The entries in this page.",
         "items": {
            "$ref": "#/$defs/ItemEntry"
         },
         "title": "Entries",
         "type": "array"
      },
      "isFullyFetched": {
         "default": false,
         "description": "Whether this result set was fully fetched or not.",
         "title": "Isfullyfetched",
         "type": "boolean"
      }
   },
   "$defs": {
      "ItemEntry": {
         "description": "Represents an item displayed on an auction, or the character's items in the auction detail.",
         "properties": {
            "imageUrl": {
               "description": "The URL to the item's image.",
               "title": "Imageurl",
               "type": "string"
            },
            "name": {
               "description": "The item's name.",
               "title": "Name",
               "type": "string"
            },
            "description": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The item's description, if any.",
               "title": "Description"
            },
            "count": {
               "default": 1,
               "description": "The item's count.",
               "title": "Count",
               "type": "integer"
            },
            "itemId": {
               "description": "The item's client id.",
               "title": "Itemid",
               "type": "integer"
            },
            "tier": {
               "default": 0,
               "description": "The item's tier.",
               "title": "Tier",
               "type": "integer"
            }
         },
         "required": [
            "imageUrl",
            "name",
            "itemId"
         ],
         "title": "ItemEntry",
         "type": "object"
      }
   }
}

Config:
  • populate_by_name: bool = True

  • alias_generator: function = <function to_camel at 0x73beb93f7e20>

  • use_attribute_docstrings: bool = True

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
  • current_page (int)

  • entries (list[tibiapy.models.pagination.T])

  • is_fully_fetched (bool)

  • results_count (int)

  • total_pages (int)

field current_page: int = 1 (alias 'currentPage')

The currently viewed page.

field entries: list[T] = []

The entries in this page.

field is_fully_fetched: bool = False (alias 'isFullyFetched')

Whether this result set was fully fetched or not.

field results_count: int = 0 (alias 'resultsCount')

The total number of entries across all pages.

field total_pages: int = 1 (alias 'totalPages')

The total number of pages.

get_by_id(entry_id)[source]

Get an item by its item id.

Parameters:

entry_id (int) – The ID of the item.

Returns:

The item matching the id.

Return type:

ItemEntry

get_by_name(name)

Get an entry by its name.

Parameters:

name (str) – The name of the entry, case-insensitive.

Returns:

The entry matching the name.

Return type:

object

search(value)

Search an entry by its name.

Parameters:

value (str) – The value to look for.

Returns:

A list of entries with names containing the search term.

Return type:

list

pydantic model tibiapy.models.Mounts[source]

The mounts the character has unlocked or purchased.

Show JSON schema
{
   "title": "Mounts",
   "description": "The mounts the character has unlocked or purchased.",
   "type": "object",
   "properties": {
      "currentPage": {
         "default": 1,
         "description": "The currently viewed page.",
         "title": "Currentpage",
         "type": "integer"
      },
      "totalPages": {
         "default": 1,
         "description": "The total number of pages.",
         "title": "Totalpages",
         "type": "integer"
      },
      "resultsCount": {
         "default": 0,
         "description": "The total number of entries across all pages.",
         "title": "Resultscount",
         "type": "integer"
      },
      "entries": {
         "default": [],
         "description": "The entries in this page.",
         "items": {
            "$ref": "#/$defs/MountEntry"
         },
         "title": "Entries",
         "type": "array"
      },
      "isFullyFetched": {
         "default": false,
         "description": "Whether this result set was fully fetched or not.",
         "title": "Isfullyfetched",
         "type": "boolean"
      }
   },
   "$defs": {
      "MountEntry": {
         "description": "Represents a mount owned or unlocked by the character.",
         "properties": {
            "imageUrl": {
               "description": "The URL to the image.",
               "title": "Imageurl",
               "type": "string"
            },
            "name": {
               "description": "The mount's name.",
               "title": "Name",
               "type": "string"
            },
            "mountId": {
               "description": "The internal ID of the mount.",
               "title": "Mountid",
               "type": "integer"
            }
         },
         "required": [
            "imageUrl",
            "name",
            "mountId"
         ],
         "title": "MountEntry",
         "type": "object"
      }
   }
}

Config:
  • populate_by_name: bool = True

  • alias_generator: function = <function to_camel at 0x73beb93f7e20>

  • use_attribute_docstrings: bool = True

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
  • current_page (int)

  • entries (list[tibiapy.models.pagination.T])

  • is_fully_fetched (bool)

  • results_count (int)

  • total_pages (int)

field current_page: int = 1 (alias 'currentPage')

The currently viewed page.

field entries: list[T] = []

The entries in this page.

field is_fully_fetched: bool = False (alias 'isFullyFetched')

Whether this result set was fully fetched or not.

field results_count: int = 0 (alias 'resultsCount')

The total number of entries across all pages.

field total_pages: int = 1 (alias 'totalPages')

The total number of pages.

get_by_id(entry_id)[source]

Get a mount by its mount id.

Parameters:

entry_id (int) – The ID of the mount.

Returns:

The mount matching the id.

Return type:

MountEntry

get_by_name(name)

Get an entry by its name.

Parameters:

name (str) – The name of the entry, case-insensitive.

Returns:

The entry matching the name.

Return type:

object

search(value)

Search an entry by its name.

Parameters:

value (str) – The value to look for.

Returns:

A list of entries with names containing the search term.

Return type:

list

pydantic model tibiapy.models.OutfitImage[source]

The image of the outfit currently being worn by the character.

Show JSON schema
{
   "title": "OutfitImage",
   "description": "The image of the outfit currently being worn by the character.",
   "type": "object",
   "properties": {
      "outfitId": {
         "description": "The ID of the outfit.",
         "title": "Outfitid",
         "type": "integer"
      },
      "addons": {
         "description": "The addons displayed in the outfit.",
         "title": "Addons",
         "type": "integer"
      },
      "imageUrl": {
         "description": "The URL of the image.",
         "title": "Imageurl",
         "type": "string"
      }
   },
   "required": [
      "outfitId",
      "addons",
      "imageUrl"
   ]
}

Config:
  • populate_by_name: bool = True

  • alias_generator: function = <function to_camel at 0x73beb93f7e20>

  • use_attribute_docstrings: bool = True

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
  • addons (int)

  • image_url (str)

  • outfit_id (int)

field addons: int [Required]

The addons displayed in the outfit.

field image_url: str [Required] (alias 'imageUrl')

The URL of the image.

field outfit_id: int [Required] (alias 'outfitId')

The ID of the outfit.

pydantic model tibiapy.models.Outfits[source]

The outfits the character has unlocked or purchased.

Show JSON schema
{
   "title": "Outfits",
   "description": "The outfits the character has unlocked or purchased.",
   "type": "object",
   "properties": {
      "currentPage": {
         "default": 1,
         "description": "The currently viewed page.",
         "title": "Currentpage",
         "type": "integer"
      },
      "totalPages": {
         "default": 1,
         "description": "The total number of pages.",
         "title": "Totalpages",
         "type": "integer"
      },
      "resultsCount": {
         "default": 0,
         "description": "The total number of entries across all pages.",
         "title": "Resultscount",
         "type": "integer"
      },
      "entries": {
         "default": [],
         "description": "The entries in this page.",
         "items": {
            "$ref": "#/$defs/OutfitEntry"
         },
         "title": "Entries",
         "type": "array"
      },
      "isFullyFetched": {
         "default": false,
         "description": "Whether this result set was fully fetched or not.",
         "title": "Isfullyfetched",
         "type": "boolean"
      }
   },
   "$defs": {
      "OutfitEntry": {
         "description": "Represents an outfit owned or unlocked by the character.",
         "properties": {
            "outfitId": {
               "description": "The internal ID of the outfit.",
               "title": "Outfitid",
               "type": "integer"
            },
            "addons": {
               "description": "The selected or unlocked addons.",
               "title": "Addons",
               "type": "integer"
            },
            "imageUrl": {
               "description": "The URL to the image.",
               "title": "Imageurl",
               "type": "string"
            },
            "name": {
               "description": "The outfit's name.",
               "title": "Name",
               "type": "string"
            }
         },
         "required": [
            "outfitId",
            "addons",
            "imageUrl",
            "name"
         ],
         "title": "OutfitEntry",
         "type": "object"
      }
   }
}

Config:
  • populate_by_name: bool = True

  • alias_generator: function = <function to_camel at 0x73beb93f7e20>

  • use_attribute_docstrings: bool = True

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
  • current_page (int)

  • entries (list[tibiapy.models.pagination.T])

  • is_fully_fetched (bool)

  • results_count (int)

  • total_pages (int)

field current_page: int = 1 (alias 'currentPage')

The currently viewed page.

field entries: list[T] = []

The entries in this page.

field is_fully_fetched: bool = False (alias 'isFullyFetched')

Whether this result set was fully fetched or not.

field results_count: int = 0 (alias 'resultsCount')

The total number of entries across all pages.

field total_pages: int = 1 (alias 'totalPages')

The total number of pages.

get_by_id(entry_id)[source]

Get an outfit by its outfit id.

Parameters:

entry_id (int) – The ID of the outfit.

Returns:

The outfit matching the id.

Return type:

OutfitEntry

get_by_name(name)

Get an entry by its name.

Parameters:

name (str) – The name of the entry, case-insensitive.

Returns:

The entry matching the name.

Return type:

object

search(value)

Search an entry by its name.

Parameters:

value (str) – The value to look for.

Returns:

A list of entries with names containing the search term.

Return type:

list

pydantic model tibiapy.models.SalesArgument[source]

Represents a sales argument.

Sales arguments can be selected when creating an auction, and allow the user to highlight certain character features in the auction listing.

Show JSON schema
{
   "title": "SalesArgument",
   "description": "Represents a sales argument.\n\nSales arguments can be selected when creating an auction, and allow the user to highlight certain\ncharacter features in the auction listing.",
   "type": "object",
   "properties": {
      "categoryId": {
         "title": "Categoryid",
         "type": "integer"
      },
      "categoryImage": {
         "description": "The URL to the category icon.",
         "title": "Categoryimage",
         "type": "string"
      },
      "content": {
         "description": "The content of the sales argument.",
         "title": "Content",
         "type": "string"
      }
   },
   "required": [
      "categoryId",
      "categoryImage",
      "content"
   ]
}

Config:
  • populate_by_name: bool = True

  • alias_generator: function = <function to_camel at 0x73beb93f7e20>

  • use_attribute_docstrings: bool = True

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
  • category_id (int)

  • category_image (str)

  • content (str)

field category_id: int [Required] (alias 'categoryId')
field category_image: str [Required] (alias 'categoryImage')

The URL to the category icon.

field content: str [Required]

The content of the sales argument.

pydantic model tibiapy.models.SkillEntry[source]

Represents the character’s skills.

Show JSON schema
{
   "title": "SkillEntry",
   "description": "Represents the character's skills.",
   "type": "object",
   "properties": {
      "name": {
         "description": "The name of the skill.",
         "title": "Name",
         "type": "string"
      },
      "level": {
         "description": "The current level.",
         "title": "Level",
         "type": "integer"
      },
      "progress": {
         "description": "The percentage of progress for the next level.",
         "title": "Progress",
         "type": "number"
      }
   },
   "required": [
      "name",
      "level",
      "progress"
   ]
}

Config:
  • populate_by_name: bool = True

  • alias_generator: function = <function to_camel at 0x73beb93f7e20>

  • use_attribute_docstrings: bool = True

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
  • level (int)

  • name (str)

  • progress (float)

field level: int [Required]

The current level.

field name: str [Required]

The name of the skill.

field progress: float [Required]

The percentage of progress for the next level.

pydantic model tibiapy.models.RevealedGem[source]

A gem that has been revealed for the character.

Show JSON schema
{
   "title": "RevealedGem",
   "description": "A gem that has been revealed for the character.",
   "type": "object",
   "properties": {
      "gemType": {
         "description": "The type of gem.",
         "title": "Gemtype",
         "type": "string"
      },
      "mods": {
         "description": "The mods or effects the gem has.",
         "items": {
            "type": "string"
         },
         "title": "Mods",
         "type": "array"
      }
   },
   "required": [
      "gemType",
      "mods"
   ]
}

Config:
  • populate_by_name: bool = True

  • alias_generator: function = <function to_camel at 0x73beb93f7e20>

  • use_attribute_docstrings: bool = True

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
  • gem_type (str)

  • mods (list[str])

field gem_type: str [Required] (alias 'gemType')

The type of gem.

field mods: list[str] [Required]

The mods or effects the gem has.

Kill Statistics

pydantic model tibiapy.models.KillStatistics[source]

Represents the kill statistics of a world.

Show JSON schema
{
   "title": "KillStatistics",
   "description": "Represents the kill statistics of a world.",
   "type": "object",
   "properties": {
      "world": {
         "description": "The world the statistics belong to.",
         "title": "World",
         "type": "string"
      },
      "entries": {
         "additionalProperties": {
            "$ref": "#/$defs/RaceEntry"
         },
         "description": "A dictionary of kills entries of every race, where the key is the name of the race.",
         "title": "Entries",
         "type": "object"
      },
      "total": {
         "$ref": "#/$defs/RaceEntry",
         "description": "The kill statistics totals."
      },
      "availableWorlds": {
         "description": "The list of worlds available for selection.",
         "items": {
            "type": "string"
         },
         "title": "Availableworlds",
         "type": "array"
      }
   },
   "$defs": {
      "RaceEntry": {
         "description": "Represents the statistics of a race.",
         "properties": {
            "lastDayKilled": {
               "description": "Number of creatures of this race killed in the last day.",
               "title": "Lastdaykilled",
               "type": "integer"
            },
            "lastDayPlayersKilled": {
               "description": "Number of players killed by this race in the last day.",
               "title": "Lastdayplayerskilled",
               "type": "integer"
            },
            "lastWeekKilled": {
               "description": "Number of creatures of this race killed in the last week.",
               "title": "Lastweekkilled",
               "type": "integer"
            },
            "lastWeekPlayersKilled": {
               "description": "Number of players killed by this race in the last week.",
               "title": "Lastweekplayerskilled",
               "type": "integer"
            }
         },
         "required": [
            "lastDayKilled",
            "lastDayPlayersKilled",
            "lastWeekKilled",
            "lastWeekPlayersKilled"
         ],
         "title": "RaceEntry",
         "type": "object"
      }
   },
   "required": [
      "world",
      "entries",
      "total",
      "availableWorlds"
   ]
}

Config:
  • populate_by_name: bool = True

  • alias_generator: function = <function to_camel at 0x73beb93f7e20>

  • use_attribute_docstrings: bool = True

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
  • available_worlds (list[str])

  • entries (dict[str, tibiapy.models.kill_statistics.RaceEntry])

  • total (tibiapy.models.kill_statistics.RaceEntry)

  • world (str)

field available_worlds: list[str] [Required] (alias 'availableWorlds')

The list of worlds available for selection.

field entries: dict[str, RaceEntry] [Required]

A dictionary of kills entries of every race, where the key is the name of the race.

field total: RaceEntry [Required]

The kill statistics totals.

field world: str [Required]

The world the statistics belong to.

property players: RaceEntry

The kill statistics for players.

property url: str

The URL to the kill statistics page on Tibia.com containing the results.

pydantic model tibiapy.models.RaceEntry[source]

Represents the statistics of a race.

Show JSON schema
{
   "title": "RaceEntry",
   "description": "Represents the statistics of a race.",
   "type": "object",
   "properties": {
      "lastDayKilled": {
         "description": "Number of creatures of this race killed in the last day.",
         "title": "Lastdaykilled",
         "type": "integer"
      },
      "lastDayPlayersKilled": {
         "description": "Number of players killed by this race in the last day.",
         "title": "Lastdayplayerskilled",
         "type": "integer"
      },
      "lastWeekKilled": {
         "description": "Number of creatures of this race killed in the last week.",
         "title": "Lastweekkilled",
         "type": "integer"
      },
      "lastWeekPlayersKilled": {
         "description": "Number of players killed by this race in the last week.",
         "title": "Lastweekplayerskilled",
         "type": "integer"
      }
   },
   "required": [
      "lastDayKilled",
      "lastDayPlayersKilled",
      "lastWeekKilled",
      "lastWeekPlayersKilled"
   ]
}

Config:
  • populate_by_name: bool = True

  • alias_generator: function = <function to_camel at 0x73beb93f7e20>

  • use_attribute_docstrings: bool = True

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
  • last_day_killed (int)

  • last_day_players_killed (int)

  • last_week_killed (int)

  • last_week_players_killed (int)

field last_day_killed: int [Required] (alias 'lastDayKilled')

Number of creatures of this race killed in the last day.

field last_day_players_killed: int [Required] (alias 'lastDayPlayersKilled')

Number of players killed by this race in the last day.

field last_week_killed: int [Required] (alias 'lastWeekKilled')

Number of creatures of this race killed in the last week.

field last_week_players_killed: int [Required] (alias 'lastWeekPlayersKilled')

Number of players killed by this race in the last week.

Library

pydantic model tibiapy.models.CreaturesSection[source]

Represents the creature’s section in the Tibia.com library.

Show JSON schema
{
   "title": "CreaturesSection",
   "description": "Represents the creature's section in the Tibia.com library.",
   "type": "object",
   "properties": {
      "boostedCreature": {
         "$ref": "#/$defs/CreatureEntry",
         "description": "The current boosted creature."
      },
      "creatures": {
         "description": "The list of creatures in the library.",
         "items": {
            "$ref": "#/$defs/CreatureEntry"
         },
         "title": "Creatures",
         "type": "array"
      }
   },
   "$defs": {
      "CreatureEntry": {
         "description": "Represents a creature in the Library section.",
         "properties": {
            "name": {
               "description": "The name of the creature, usually in plural, except for the boosted creature.",
               "title": "Name",
               "type": "string"
            },
            "identifier": {
               "description": "The internal name of the creature's race. Used for links and images.",
               "title": "Identifier",
               "type": "string"
            }
         },
         "required": [
            "name",
            "identifier"
         ],
         "title": "CreatureEntry",
         "type": "object"
      }
   },
   "required": [
      "boostedCreature",
      "creatures"
   ]
}

Config:
  • populate_by_name: bool = True

  • alias_generator: function = <function to_camel at 0x73beb93f7e20>

  • use_attribute_docstrings: bool = True

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
  • boosted_creature (tibiapy.models.creature.CreatureEntry)

  • creatures (list[tibiapy.models.creature.CreatureEntry])

field boosted_creature: CreatureEntry [Required] (alias 'boostedCreature')

The current boosted creature.

field creatures: list[CreatureEntry] [Required]

The list of creatures in the library.

pydantic model tibiapy.models.Creature[source]

Represents a creature’s details on the Tibia.com library.

Show JSON schema
{
   "title": "Creature",
   "description": "Represents a creature's details on the Tibia.com library.",
   "type": "object",
   "properties": {
      "name": {
         "description": "The name of the creature, in plural form.",
         "title": "Name",
         "type": "string"
      },
      "identifier": {
         "description": "The race's internal name. Used for links and images.",
         "title": "Identifier",
         "type": "string"
      },
      "description": {
         "description": "A description of the creature.",
         "title": "Description",
         "type": "string"
      },
      "hitpoints": {
         "description": "The number of hitpoints the creature has.",
         "title": "Hitpoints",
         "type": "integer"
      },
      "experience": {
         "description": "The number of experience points given for killing this creature.",
         "title": "Experience",
         "type": "integer"
      },
      "immuneTo": {
         "description": "The elements this creature is immune to.",
         "items": {
            "type": "string"
         },
         "title": "Immuneto",
         "type": "array"
      },
      "weakAgainst": {
         "description": "The elements this creature is weak against.",
         "items": {
            "type": "string"
         },
         "title": "Weakagainst",
         "type": "array"
      },
      "strongAgainst": {
         "description": "The elements this creature is strong against.",
         "items": {
            "type": "string"
         },
         "title": "Strongagainst",
         "type": "array"
      },
      "loot": {
         "description": "Some of the items this creature drops.",
         "title": "Loot",
         "type": "string"
      },
      "manaCost": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "description": "The mana neccessary to summon or convince this creature.",
         "title": "Manacost"
      },
      "summonable": {
         "description": "Whether this creature can be summoned or not.",
         "title": "Summonable",
         "type": "boolean"
      },
      "convinceable": {
         "description": "Whether this creature can be convinced or not.",
         "title": "Convinceable",
         "type": "boolean"
      }
   },
   "required": [
      "name",
      "identifier",
      "description",
      "hitpoints",
      "experience",
      "immuneTo",
      "weakAgainst",
      "strongAgainst",
      "loot",
      "manaCost",
      "summonable",
      "convinceable"
   ]
}

Config:
  • populate_by_name: bool = True

  • alias_generator: function = <function to_camel at 0x73beb93f7e20>

  • use_attribute_docstrings: bool = True

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
  • convinceable (bool)

  • description (str)

  • experience (int)

  • hitpoints (int)

  • identifier (str)

  • immune_to (list[str])

  • loot (str)

  • mana_cost (int | None)

  • name (str)

  • strong_against (list[str])

  • summonable (bool)

  • weak_against (list[str])

field convinceable: bool [Required]

Whether this creature can be convinced or not.

field description: str [Required]

A description of the creature.

field experience: int [Required]

The number of experience points given for killing this creature.

field hitpoints: int [Required]

The number of hitpoints the creature has.

field identifier: str [Required]

The race’s internal name. Used for links and images.

field immune_to: list[str] [Required] (alias 'immuneTo')

The elements this creature is immune to.

field loot: str [Required]

Some of the items this creature drops.

field mana_cost: Optional[int] [Required] (alias 'manaCost')

The mana neccessary to summon or convince this creature.

field name: str [Required]

The name of the creature, in plural form.

field strong_against: list[str] [Required] (alias 'strongAgainst')

The elements this creature is strong against.

field summonable: bool [Required]

Whether this creature can be summoned or not.

field weak_against: list[str] [Required] (alias 'weakAgainst')

The elements this creature is weak against.

property image_url: str

The URL to this creature’s image.

property url: str

The URL to this creature’s details.

pydantic model tibiapy.models.CreatureEntry[source]

Represents a creature in the Library section.

Show JSON schema
{
   "title": "CreatureEntry",
   "description": "Represents a creature in the Library section.",
   "type": "object",
   "properties": {
      "name": {
         "description": "The name of the creature, usually in plural, except for the boosted creature.",
         "title": "Name",
         "type": "string"
      },
      "identifier": {
         "description": "The internal name of the creature's race. Used for links and images.",
         "title": "Identifier",
         "type": "string"
      }
   },
   "required": [
      "name",
      "identifier"
   ]
}

Config:
  • populate_by_name: bool = True

  • alias_generator: function = <function to_camel at 0x73beb93f7e20>

  • use_attribute_docstrings: bool = True

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
  • identifier (str)

  • name (str)

field identifier: str [Required]

The internal name of the creature’s race. Used for links and images.

field name: str [Required]

The name of the creature, usually in plural, except for the boosted creature.

property image_url: str

The URL to this creature’s image.

property url: str

The URL to this creature’s details.

pydantic model tibiapy.models.BoostableBosses[source]

Represents the boostable bosses section in the Tibia.com library.

Show JSON schema
{
   "title": "BoostableBosses",
   "description": "Represents the boostable bosses section in the Tibia.com library.",
   "type": "object",
   "properties": {
      "boostedBoss": {
         "$ref": "#/$defs/BossEntry",
         "description": "The current boosted boss."
      },
      "bosses": {
         "description": "The list of boostable bosses.",
         "items": {
            "$ref": "#/$defs/BossEntry"
         },
         "title": "Bosses",
         "type": "array"
      }
   },
   "$defs": {
      "BossEntry": {
         "description": "Represents a boss in the boostable bosses section in the Tibia.com library.",
         "properties": {
            "name": {
               "description": "The name of the boss.",
               "title": "Name",
               "type": "string"
            },
            "identifier": {
               "description": "The internal name of the boss. Used for images.",
               "title": "Identifier",
               "type": "string"
            }
         },
         "required": [
            "name",
            "identifier"
         ],
         "title": "BossEntry",
         "type": "object"
      }
   },
   "required": [
      "boostedBoss",
      "bosses"
   ]
}

Config:
  • populate_by_name: bool = True

  • alias_generator: function = <function to_camel at 0x73beb93f7e20>

  • use_attribute_docstrings: bool = True

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
  • boosted_boss (tibiapy.models.creature.BossEntry)

  • bosses (list[tibiapy.models.creature.BossEntry])

field boosted_boss: BossEntry [Required] (alias 'boostedBoss')

The current boosted boss.

field bosses: list[BossEntry] [Required]

The list of boostable bosses.

pydantic model tibiapy.models.BoostedCreatures[source]

Contains both boosted creature and boosted boss.

Show JSON schema
{
   "title": "BoostedCreatures",
   "description": "Contains both boosted creature and boosted boss.",
   "type": "object",
   "properties": {
      "creature": {
         "$ref": "#/$defs/CreatureEntry",
         "description": "The boosted creature of the day."
      },
      "boss": {
         "$ref": "#/$defs/BossEntry",
         "description": "The boosted boss of the day."
      }
   },
   "$defs": {
      "BossEntry": {
         "description": "Represents a boss in the boostable bosses section in the Tibia.com library.",
         "properties": {
            "name": {
               "description": "The name of the boss.",
               "title": "Name",
               "type": "string"
            },
            "identifier": {
               "description": "The internal name of the boss. Used for images.",
               "title": "Identifier",
               "type": "string"
            }
         },
         "required": [
            "name",
            "identifier"
         ],
         "title": "BossEntry",
         "type": "object"
      },
      "CreatureEntry": {
         "description": "Represents a creature in the Library section.",
         "properties": {
            "name": {
               "description": "The name of the creature, usually in plural, except for the boosted creature.",
               "title": "Name",
               "type": "string"
            },
            "identifier": {
               "description": "The internal name of the creature's race. Used for links and images.",
               "title": "Identifier",
               "type": "string"
            }
         },
         "required": [
            "name",
            "identifier"
         ],
         "title": "CreatureEntry",
         "type": "object"
      }
   },
   "required": [
      "creature",
      "boss"
   ]
}

Config:
  • populate_by_name: bool = True

  • alias_generator: function = <function to_camel at 0x73beb93f7e20>

  • use_attribute_docstrings: bool = True

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
  • boss (tibiapy.models.creature.BossEntry)

  • creature (tibiapy.models.creature.CreatureEntry)

field boss: BossEntry [Required]

The boosted boss of the day.

field creature: CreatureEntry [Required]

The boosted creature of the day.

pydantic model tibiapy.models.BossEntry[source]

Represents a boss in the boostable bosses section in the Tibia.com library.

Show JSON schema
{
   "title": "BossEntry",
   "description": "Represents a boss in the boostable bosses section in the Tibia.com library.",
   "type": "object",
   "properties": {
      "name": {
         "description": "The name of the boss.",
         "title": "Name",
         "type": "string"
      },
      "identifier": {
         "description": "The internal name of the boss. Used for images.",
         "title": "Identifier",
         "type": "string"
      }
   },
   "required": [
      "name",
      "identifier"
   ]
}

Config:
  • populate_by_name: bool = True

  • alias_generator: function = <function to_camel at 0x73beb93f7e20>

  • use_attribute_docstrings: bool = True

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
  • identifier (str)

  • name (str)

field identifier: str [Required]

The internal name of the boss. Used for images.

field name: str [Required]

The name of the boss.

property image_url: str

The URL to this boss’s image.

pydantic model tibiapy.models.SpellsSection[source]

The spells section in Tibia.com.

Show JSON schema
{
   "title": "SpellsSection",
   "description": "The spells section in Tibia.com.",
   "type": "object",
   "properties": {
      "vocation": {
         "anyOf": [
            {
               "enum": [
                  "Druid",
                  "Knight",
                  "Paladin",
                  "Sorcerer"
               ],
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The selected vocation filter. If :obj:`None`, spells for any vocation will be shown.",
         "title": "Vocation"
      },
      "group": {
         "anyOf": [
            {
               "enum": [
                  "Attack",
                  "Healing",
                  "Support"
               ],
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The selected spell group to display. If :obj:`None`, spells for any group will be shown.",
         "title": "Group"
      },
      "spellType": {
         "anyOf": [
            {
               "enum": [
                  "Instant",
                  "Rune"
               ],
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The selected spell type to display. If :obj:`None`, spells for any type will be shown.",
         "title": "Spelltype"
      },
      "isPremium": {
         "anyOf": [
            {
               "type": "boolean"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The premium status to filter in. :obj:`True` to show only premium spells,\n:obj:`False` to show free account spells and :obj:`None` will show any spells.",
         "title": "Ispremium"
      },
      "sortBy": {
         "description": "The sorting order of the displayed spells.",
         "enum": [
            "name",
            "group",
            "type",
            "level",
            "mana",
            "price",
            "premium"
         ],
         "title": "Sortby",
         "type": "string"
      },
      "entries": {
         "description": "The spells matching the selected filters.",
         "items": {
            "$ref": "#/$defs/SpellEntry"
         },
         "title": "Entries",
         "type": "array"
      }
   },
   "$defs": {
      "SpellEntry": {
         "description": "A spell listed on the spells section.",
         "properties": {
            "identifier": {
               "description": "The internal identifier of the spell. This is used as a key for links and images.",
               "title": "Identifier",
               "type": "string"
            },
            "name": {
               "description": "The name of the spell.",
               "title": "Name",
               "type": "string"
            },
            "words": {
               "description": "The words to cast the spell.",
               "title": "Words",
               "type": "string"
            },
            "group": {
               "description": "The cooldown group of the spell.",
               "enum": [
                  "Attack",
                  "Healing",
                  "Support"
               ],
               "title": "Group",
               "type": "string"
            },
            "spellType": {
               "description": "The type of the spell",
               "enum": [
                  "Instant",
                  "Rune"
               ],
               "title": "Spelltype",
               "type": "string"
            },
            "expLevel": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The required level to cast the spell. If obj:`None`, the spell is obtained through a Revelation Perk.",
               "title": "Explevel"
            },
            "mana": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The mana required to use the spell. If :obj:`None`, the mana cost is variable.",
               "title": "Mana"
            },
            "price": {
               "description": "The price in gold coins to learn the spell.",
               "title": "Price",
               "type": "integer"
            },
            "isPremium": {
               "description": "Whether the spell requires a premium account to learn and use it.",
               "title": "Ispremium",
               "type": "boolean"
            }
         },
         "required": [
            "identifier",
            "name",
            "words",
            "group",
            "spellType",
            "price",
            "isPremium"
         ],
         "title": "SpellEntry",
         "type": "object"
      }
   },
   "required": [
      "sortBy",
      "entries"
   ]
}

Config:
  • populate_by_name: bool = True

  • alias_generator: function = <function to_camel at 0x73beb93f7e20>

  • use_attribute_docstrings: bool = True

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
  • entries (list[tibiapy.models.spell.SpellEntry])

  • group (tibiapy.enums.SpellGroup | None)

  • is_premium (bool | None)

  • sort_by (tibiapy.enums.SpellSorting)

  • spell_type (tibiapy.enums.SpellType | None)

  • vocation (tibiapy.enums.SpellVocationFilter | None)

field entries: list[SpellEntry] [Required]

The spells matching the selected filters.

field group: Optional[SpellGroup] = None

The selected spell group to display. If None, spells for any group will be shown.

field is_premium: Optional[bool] = None (alias 'isPremium')

The premium status to filter in. True to show only premium spells, False to show free account spells and None will show any spells.

The premium status to filter in. True to show only premium spells, False to show free account spells and None will show any spells.

field sort_by: SpellSorting [Required] (alias 'sortBy')

The sorting order of the displayed spells.

field spell_type: Optional[SpellType] = None (alias 'spellType')

The selected spell type to display. If None, spells for any type will be shown.

field vocation: Optional[SpellVocationFilter] = None

The selected vocation filter. If None, spells for any vocation will be shown.

property url: str

The URL to the spells section in Tibia.com.

pydantic model tibiapy.models.Spell[source]

A spell listed on the spells section.

Show JSON schema
{
   "title": "Spell",
   "description": "A spell listed on the spells section.",
   "type": "object",
   "properties": {
      "identifier": {
         "description": "The internal identifier of the spell. This is used as a key for links and images.",
         "title": "Identifier",
         "type": "string"
      },
      "name": {
         "description": "The name of the spell.",
         "title": "Name",
         "type": "string"
      },
      "words": {
         "description": "The words to cast the spell.",
         "title": "Words",
         "type": "string"
      },
      "group": {
         "description": "The cooldown group of the spell.",
         "enum": [
            "Attack",
            "Healing",
            "Support"
         ],
         "title": "Group",
         "type": "string"
      },
      "spellType": {
         "description": "The type of the spell",
         "enum": [
            "Instant",
            "Rune"
         ],
         "title": "Spelltype",
         "type": "string"
      },
      "expLevel": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The required level to cast the spell. If obj:`None`, the spell is obtained through a Revelation Perk.",
         "title": "Explevel"
      },
      "mana": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The mana required to use the spell. If :obj:`None`, the mana cost is variable.",
         "title": "Mana"
      },
      "price": {
         "description": "The price in gold coins to learn the spell.",
         "title": "Price",
         "type": "integer"
      },
      "isPremium": {
         "description": "Whether the spell requires a premium account to learn and use it.",
         "title": "Ispremium",
         "type": "boolean"
      },
      "description": {
         "description": "A description of the spells effect and history.",
         "title": "Description",
         "type": "string"
      },
      "vocations": {
         "description": "The vocations that can use this spell.",
         "items": {
            "type": "string"
         },
         "title": "Vocations",
         "type": "array"
      },
      "cooldown": {
         "description": "The individual cooldown of this spell in seconds.",
         "title": "Cooldown",
         "type": "integer"
      },
      "cooldownGroup": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The group cooldown of this spell in seconds.",
         "title": "Cooldowngroup"
      },
      "groupSecondary": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The secondary cooldown group of this spell, if any.",
         "title": "Groupsecondary"
      },
      "cooldownGroupSecondary": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The secondary cooldown of this spell in seconds.",
         "title": "Cooldowngroupsecondary"
      },
      "soulPoints": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The number of soul points consumed by this spell. It will be :obj:`None` if not applicable.",
         "title": "Soulpoints"
      },
      "amount": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The amount of objects created by this spell. It will be :obj:`None` if not applicable.",
         "title": "Amount"
      },
      "magicType": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The type of magic of this spell. Influenced by specialized magic level attributes.",
         "title": "Magictype"
      },
      "cities": {
         "description": "The cities where this spell can be learned.",
         "items": {
            "type": "string"
         },
         "title": "Cities",
         "type": "array"
      },
      "rune": {
         "anyOf": [
            {
               "$ref": "#/$defs/Rune"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Information of the rune created by this spell, if applicable."
      }
   },
   "$defs": {
      "Rune": {
         "description": "Information about runes created by spells.",
         "properties": {
            "name": {
               "description": "The name of the rune.",
               "title": "Name",
               "type": "string"
            },
            "vocations": {
               "description": "The vocations that can use this rune.",
               "items": {
                  "type": "string"
               },
               "title": "Vocations",
               "type": "array"
            },
            "group": {
               "description": "The cooldown group of the rune.",
               "enum": [
                  "Attack",
                  "Healing",
                  "Support"
               ],
               "title": "Group",
               "type": "string"
            },
            "expLevel": {
               "description": "The experience level required to use the rune.",
               "title": "Explevel",
               "type": "integer"
            },
            "mana": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The amount of mana needed to use the rune. It will be :obj:`None` if not applicable.",
               "title": "Mana"
            },
            "magicLevel": {
               "description": "The magic level required to use the rune.",
               "title": "Magiclevel",
               "type": "integer"
            },
            "magicType": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The type of magic of this rune. Influenced by specialized magic level attributes.",
               "title": "Magictype"
            }
         },
         "required": [
            "name",
            "vocations",
            "group",
            "expLevel",
            "magicLevel"
         ],
         "title": "Rune",
         "type": "object"
      }
   },
   "required": [
      "identifier",
      "name",
      "words",
      "group",
      "spellType",
      "price",
      "isPremium",
      "description",
      "vocations",
      "cooldown",
      "cities"
   ]
}

Config:
  • populate_by_name: bool = True

  • alias_generator: function = <function to_camel at 0x73beb93f7e20>

  • use_attribute_docstrings: bool = True

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
  • amount (int | None)

  • cities (list[str])

  • cooldown (int)

  • cooldown_group (int | None)

  • cooldown_group_secondary (int | None)

  • description (str)

  • exp_level (int | None)

  • group (tibiapy.enums.SpellGroup)

  • group_secondary (str | None)

  • identifier (str)

  • is_premium (bool)

  • magic_type (str | None)

  • mana (int | None)

  • name (str)

  • price (int)

  • rune (tibiapy.models.spell.Rune | None)

  • soul_points (int | None)

  • spell_type (tibiapy.enums.SpellType)

  • vocations (list[str])

  • words (str)

field amount: Optional[int] = None

The amount of objects created by this spell. It will be None if not applicable.

field cities: list[str] [Required]

The cities where this spell can be learned.

field cooldown: int [Required]

The individual cooldown of this spell in seconds.

field cooldown_group: Optional[int] = None (alias 'cooldownGroup')

The group cooldown of this spell in seconds.

field cooldown_group_secondary: Optional[int] = None (alias 'cooldownGroupSecondary')

The secondary cooldown of this spell in seconds.

field description: str [Required]

A description of the spells effect and history.

field exp_level: Optional[int] = None (alias 'expLevel')

The required level to cast the spell. If obj:None, the spell is obtained through a Revelation Perk.

field group: SpellGroup [Required]

The cooldown group of the spell.

field group_secondary: Optional[str] = None (alias 'groupSecondary')

The secondary cooldown group of this spell, if any.

field identifier: str [Required]

The internal identifier of the spell. This is used as a key for links and images.

field is_premium: bool [Required] (alias 'isPremium')

Whether the spell requires a premium account to learn and use it.

field magic_type: Optional[str] = None (alias 'magicType')

The type of magic of this spell. Influenced by specialized magic level attributes.

field mana: Optional[int] = None

The mana required to use the spell. If None, the mana cost is variable.

field name: str [Required]

The name of the spell.

field price: int [Required]

The price in gold coins to learn the spell.

field rune: Optional[Rune] = None

Information of the rune created by this spell, if applicable.

field soul_points: Optional[int] = None (alias 'soulPoints')

The number of soul points consumed by this spell. It will be None if not applicable.

field spell_type: SpellType [Required] (alias 'spellType')

The type of the spell

field vocations: list[str] [Required]

The vocations that can use this spell.

field words: str [Required]

The words to cast the spell.

property image_url: str

The URL to this spell’s image.

property url: str

The URL to the spell.

pydantic model tibiapy.models.Rune[source]

Information about runes created by spells.

Show JSON schema
{
   "title": "Rune",
   "description": "Information about runes created by spells.",
   "type": "object",
   "properties": {
      "name": {
         "description": "The name of the rune.",
         "title": "Name",
         "type": "string"
      },
      "vocations": {
         "description": "The vocations that can use this rune.",
         "items": {
            "type": "string"
         },
         "title": "Vocations",
         "type": "array"
      },
      "group": {
         "description": "The cooldown group of the rune.",
         "enum": [
            "Attack",
            "Healing",
            "Support"
         ],
         "title": "Group",
         "type": "string"
      },
      "expLevel": {
         "description": "The experience level required to use the rune.",
         "title": "Explevel",
         "type": "integer"
      },
      "mana": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The amount of mana needed to use the rune. It will be :obj:`None` if not applicable.",
         "title": "Mana"
      },
      "magicLevel": {
         "description": "The magic level required to use the rune.",
         "title": "Magiclevel",
         "type": "integer"
      },
      "magicType": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The type of magic of this rune. Influenced by specialized magic level attributes.",
         "title": "Magictype"
      }
   },
   "required": [
      "name",
      "vocations",
      "group",
      "expLevel",
      "magicLevel"
   ]
}

Config:
  • populate_by_name: bool = True

  • alias_generator: function = <function to_camel at 0x73beb93f7e20>

  • use_attribute_docstrings: bool = True

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
  • exp_level (int)

  • group (tibiapy.enums.SpellGroup)

  • magic_level (int)

  • magic_type (str | None)

  • mana (int | None)

  • name (str)

  • vocations (list[str])

field exp_level: int [Required] (alias 'expLevel')

The experience level required to use the rune.

field group: SpellGroup [Required]

The cooldown group of the rune.

field magic_level: int [Required] (alias 'magicLevel')

The magic level required to use the rune.

field magic_type: Optional[str] = None (alias 'magicType')

The type of magic of this rune. Influenced by specialized magic level attributes.

field mana: Optional[int] = None

The amount of mana needed to use the rune. It will be None if not applicable.

field name: str [Required]

The name of the rune.

field vocations: list[str] [Required]

The vocations that can use this rune.

pydantic model tibiapy.models.SpellEntry[source]

A spell listed on the spells section.

Show JSON schema
{
   "title": "SpellEntry",
   "description": "A spell listed on the spells section.",
   "type": "object",
   "properties": {
      "identifier": {
         "description": "The internal identifier of the spell. This is used as a key for links and images.",
         "title": "Identifier",
         "type": "string"
      },
      "name": {
         "description": "The name of the spell.",
         "title": "Name",
         "type": "string"
      },
      "words": {
         "description": "The words to cast the spell.",
         "title": "Words",
         "type": "string"
      },
      "group": {
         "description": "The cooldown group of the spell.",
         "enum": [
            "Attack",
            "Healing",
            "Support"
         ],
         "title": "Group",
         "type": "string"
      },
      "spellType": {
         "description": "The type of the spell",
         "enum": [
            "Instant",
            "Rune"
         ],
         "title": "Spelltype",
         "type": "string"
      },
      "expLevel": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The required level to cast the spell. If obj:`None`, the spell is obtained through a Revelation Perk.",
         "title": "Explevel"
      },
      "mana": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The mana required to use the spell. If :obj:`None`, the mana cost is variable.",
         "title": "Mana"
      },
      "price": {
         "description": "The price in gold coins to learn the spell.",
         "title": "Price",
         "type": "integer"
      },
      "isPremium": {
         "description": "Whether the spell requires a premium account to learn and use it.",
         "title": "Ispremium",
         "type": "boolean"
      }
   },
   "required": [
      "identifier",
      "name",
      "words",
      "group",
      "spellType",
      "price",
      "isPremium"
   ]
}

Config:
  • populate_by_name: bool = True

  • alias_generator: function = <function to_camel at 0x73beb93f7e20>

  • use_attribute_docstrings: bool = True

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
  • exp_level (int | None)

  • group (tibiapy.enums.SpellGroup)

  • identifier (str)

  • is_premium (bool)

  • mana (int | None)

  • name (str)

  • price (int)

  • spell_type (tibiapy.enums.SpellType)

  • words (str)

field exp_level: Optional[int] = None (alias 'expLevel')

The required level to cast the spell. If obj:None, the spell is obtained through a Revelation Perk.

field group: SpellGroup [Required]

The cooldown group of the spell.

field identifier: str [Required]

The internal identifier of the spell. This is used as a key for links and images.

field is_premium: bool [Required] (alias 'isPremium')

Whether the spell requires a premium account to learn and use it.

field mana: Optional[int] = None

The mana required to use the spell. If None, the mana cost is variable.

field name: str [Required]

The name of the spell.

field price: int [Required]

The price in gold coins to learn the spell.

field spell_type: SpellType [Required] (alias 'spellType')

The type of the spell

field words: str [Required]

The words to cast the spell.

property image_url: str

The URL to this spell’s image.

property url: str

The URL to the spell.

Library

pydantic model tibiapy.models.FansitesSection[source]

The fansites section of Tibia.com.

Show JSON schema
{
   "title": "FansitesSection",
   "description": "The fansites section of Tibia.com.",
   "type": "object",
   "properties": {
      "promotedFansites": {
         "description": "Promoted fansites.",
         "items": {
            "$ref": "#/$defs/Fansite"
         },
         "title": "Promotedfansites",
         "type": "array"
      },
      "supportedFansites": {
         "description": "Supported fansites.",
         "items": {
            "$ref": "#/$defs/Fansite"
         },
         "title": "Supportedfansites",
         "type": "array"
      }
   },
   "$defs": {
      "Fansite": {
         "description": "Represents a fansite in the fansite programme.",
         "properties": {
            "name": {
               "description": "The name of the fansite.",
               "title": "Name",
               "type": "string"
            },
            "url": {
               "description": "The URL to the fansite.",
               "title": "Url",
               "type": "string"
            },
            "logoUrl": {
               "description": "URL to the fansite's logo.",
               "title": "Logourl",
               "type": "string"
            },
            "contact": {
               "description": "The name of the contact person.",
               "title": "Contact",
               "type": "string"
            },
            "content": {
               "description": "A list of content categories for the site.",
               "items": {
                  "$ref": "#/$defs/FansiteContent"
               },
               "title": "Content",
               "type": "array"
            },
            "socialMedia": {
               "description": "A list of the social media sites the fansite has.",
               "items": {
                  "$ref": "#/$defs/FansiteSocialMedia"
               },
               "title": "Socialmedia",
               "type": "array"
            },
            "languages": {
               "description": "A list of the languages the site is available in.",
               "items": {
                  "type": "string"
               },
               "title": "Languages",
               "type": "array"
            },
            "specials": {
               "description": "A description of features or highligts.",
               "items": {
                  "type": "string"
               },
               "title": "Specials",
               "type": "array"
            },
            "fansiteItemImageUrl": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "description": "The URL to the fansite item's icon, if available.",
               "title": "Fansiteitemimageurl"
            }
         },
         "required": [
            "name",
            "url",
            "logoUrl",
            "contact",
            "content",
            "socialMedia",
            "languages",
            "specials",
            "fansiteItemImageUrl"
         ],
         "title": "Fansite",
         "type": "object"
      },
      "FansiteContent": {
         "description": "An icon to represent a category of content.",
         "properties": {
            "name": {
               "description": "The name of the content category.",
               "title": "Name",
               "type": "string"
            },
            "iconUrl": {
               "description": "URL to the icon.",
               "title": "Iconurl",
               "type": "string"
            }
         },
         "required": [
            "name",
            "iconUrl"
         ],
         "title": "FansiteContent",
         "type": "object"
      },
      "FansiteSocialMedia": {
         "description": "An icon to represent available social media for the fansite.",
         "properties": {
            "name": {
               "description": "The name of the social media site.",
               "title": "Name",
               "type": "string"
            },
            "iconUrl": {
               "description": "The URL to the icon.",
               "title": "Iconurl",
               "type": "string"
            }
         },
         "required": [
            "name",
            "iconUrl"
         ],
         "title": "FansiteSocialMedia",
         "type": "object"
      }
   },
   "required": [
      "promotedFansites",
      "supportedFansites"
   ]
}

Config:
  • populate_by_name: bool = True

  • alias_generator: function = <function to_camel at 0x73beb93f7e20>

  • use_attribute_docstrings: bool = True

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
  • promoted_fansites (list[tibiapy.models.fansite.Fansite])

  • supported_fansites (list[tibiapy.models.fansite.Fansite])

field promoted_fansites: list[Fansite] [Required] (alias 'promotedFansites')

Promoted fansites.

field supported_fansites: list[Fansite] [Required] (alias 'supportedFansites')

Supported fansites.

pydantic model tibiapy.models.Fansite[source]

Represents a fansite in the fansite programme.

Show JSON schema
{
   "title": "Fansite",
   "description": "Represents a fansite in the fansite programme.",
   "type": "object",
   "properties": {
      "name": {
         "description": "The name of the fansite.",
         "title": "Name",
         "type": "string"
      },
      "url": {
         "description": "The URL to the fansite.",
         "title": "Url",
         "type": "string"
      },
      "logoUrl": {
         "description": "URL to the fansite's logo.",
         "title": "Logourl",
         "type": "string"
      },
      "contact": {
         "description": "The name of the contact person.",
         "title": "Contact",
         "type": "string"
      },
      "content": {
         "description": "A list of content categories for the site.",
         "items": {
            "$ref": "#/$defs/FansiteContent"
         },
         "title": "Content",
         "type": "array"
      },
      "socialMedia": {
         "description": "A list of the social media sites the fansite has.",
         "items": {
            "$ref": "#/$defs/FansiteSocialMedia"
         },
         "title": "Socialmedia",
         "type": "array"
      },
      "languages": {
         "description": "A list of the languages the site is available in.",
         "items": {
            "type": "string"
         },
         "title": "Languages",
         "type": "array"
      },
      "specials": {
         "description": "A description of features or highligts.",
         "items": {
            "type": "string"
         },
         "title": "Specials",
         "type": "array"
      },
      "fansiteItemImageUrl": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "description": "The URL to the fansite item's icon, if available.",
         "title": "Fansiteitemimageurl"
      }
   },
   "$defs": {
      "FansiteContent": {
         "description": "An icon to represent a category of content.",
         "properties": {
            "name": {
               "description": "The name of the content category.",
               "title": "Name",
               "type": "string"
            },
            "iconUrl": {
               "description": "URL to the icon.",
               "title": "Iconurl",
               "type": "string"
            }
         },
         "required": [
            "name",
            "iconUrl"
         ],
         "title": "FansiteContent",
         "type": "object"
      },
      "FansiteSocialMedia": {
         "description": "An icon to represent available social media for the fansite.",
         "properties": {
            "name": {
               "description": "The name of the social media site.",
               "title": "Name",
               "type": "string"
            },
            "iconUrl": {
               "description": "The URL to the icon.",
               "title": "Iconurl",
               "type": "string"
            }
         },
         "required": [
            "name",
            "iconUrl"
         ],
         "title": "FansiteSocialMedia",
         "type": "object"
      }
   },
   "required": [
      "name",
      "url",
      "logoUrl",
      "contact",
      "content",
      "socialMedia",
      "languages",
      "specials",
      "fansiteItemImageUrl"
   ]
}

Config:
  • populate_by_name: bool = True

  • alias_generator: function = <function to_camel at 0x73beb93f7e20>

  • use_attribute_docstrings: bool = True

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
  • contact (str)

  • content (list[tibiapy.models.fansite.FansiteContent])

  • fansite_item_image_url (str | None)

  • languages (list[str])

  • logo_url (str)

  • name (str)

  • social_media (list[tibiapy.models.fansite.FansiteSocialMedia])

  • specials (list[str])

  • url (str)

field contact: str [Required]

The name of the contact person.

field content: list[FansiteContent] [Required]

A list of content categories for the site.

field fansite_item_image_url: Optional[str] [Required] (alias 'fansiteItemImageUrl')

The URL to the fansite item’s icon, if available.

field languages: list[str] [Required]

A list of the languages the site is available in.

field logo_url: str [Required] (alias 'logoUrl')

URL to the fansite’s logo.

field name: str [Required]

The name of the fansite.

field social_media: list[FansiteSocialMedia] [Required] (alias 'socialMedia')

A list of the social media sites the fansite has.

field specials: list[str] [Required]

A description of features or highligts.

field url: str [Required]

The URL to the fansite.

pydantic model tibiapy.models.FansiteSocialMedia[source]

An icon to represent available social media for the fansite.

Show JSON schema
{
   "title": "FansiteSocialMedia",
   "description": "An icon to represent available social media for the fansite.",
   "type": "object",
   "properties": {
      "name": {
         "description": "The name of the social media site.",
         "title": "Name",
         "type": "string"
      },
      "iconUrl": {
         "description": "The URL to the icon.",
         "title": "Iconurl",
         "type": "string"
      }
   },
   "required": [
      "name",
      "iconUrl"
   ]
}

Config:
  • populate_by_name: bool = True

  • alias_generator: function = <function to_camel at 0x73beb93f7e20>

  • use_attribute_docstrings: bool = True

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
  • icon_url (str)

  • name (str)

field icon_url: str [Required] (alias 'iconUrl')

The URL to the icon.

field name: str [Required]

The name of the social media site.

pydantic model tibiapy.models.FansiteContent[source]

An icon to represent a category of content.

Show JSON schema
{
   "title": "FansiteContent",
   "description": "An icon to represent a category of content.",
   "type": "object",
   "properties": {
      "name": {
         "description": "The name of the content category.",
         "title": "Name",
         "type": "string"
      },
      "iconUrl": {
         "description": "URL to the icon.",
         "title": "Iconurl",
         "type": "string"
      }
   },
   "required": [
      "name",
      "iconUrl"
   ]
}

Config:
  • populate_by_name: bool = True

  • alias_generator: function = <function to_camel at 0x73beb93f7e20>

  • use_attribute_docstrings: bool = True

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
  • icon_url (str)

  • name (str)

field icon_url: str [Required] (alias 'iconUrl')

URL to the icon.

field name: str [Required]

The name of the content category.

Base Classes

The following classes are not meant to be used or instantiated, but are documented here for informational purposes.

They implement methods and properties that can be inherited by other classes to implement their functionality.

pydantic model tibiapy.models.BaseModel[source]

Base class for all model classes.

Show JSON schema
{
   "title": "BaseModel",
   "description": "Base class for all model classes.",
   "type": "object",
   "properties": {}
}

Config:
  • populate_by_name: bool = True

  • alias_generator: function = <function to_camel at 0x73beb93f7e20>

  • use_attribute_docstrings: bool = True

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

classmethod construct(_fields_set=None, **values)[source]
Return type:

Self

copy(*, include=None, exclude=None, update=None, deep=False)[source]

Returns a copy of the model.

!!! warning “Deprecated”

This method is now deprecated; use model_copy instead.

If you need include or exclude, use:

`python {test="skip" lint="skip"} data = self.model_dump(include=include, exclude=exclude, round_trip=True) data = {**data, **(update or {})} copied = self.model_validate(data) `

Parameters:
  • include (Set[int] | Set[str] | Mapping[int, Any] | Mapping[str, Any] | None) – Optional set or mapping specifying which fields to include in the copied model.

  • exclude (Set[int] | Set[str] | Mapping[int, Any] | Mapping[str, Any] | None) – Optional set or mapping specifying which fields to exclude in the copied model.

  • update (Optional[Dict[str, Any]]) – Optional dictionary of field-value pairs to override field values in the copied model.

  • deep (bool) – If True, the values of fields that are Pydantic models will be deep-copied.

Return type:

Self

Returns:

A copy of the model with included, excluded and updated fields as specified.

dict(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False)[source]
Return type:

Dict[str, Any]

classmethod from_orm(obj)[source]
Return type:

Self

json(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, encoder=PydanticUndefined, models_as_dict=PydanticUndefined, **dumps_kwargs)[source]
Return type:

str

classmethod model_construct(_fields_set=None, **values)[source]

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed.

!!! note

model_construct() generally respects the model_config.extra setting on the provided model. That is, if model_config.extra == ‘allow’, then all extra passed values are added to the model instance’s __dict__ and __pydantic_extra__ fields. If model_config.extra == ‘ignore’ (the default), then all extra passed values are ignored. Because no validation is performed with a call to model_construct(), having model_config.extra == ‘forbid’ does not result in an error if extra values are passed, but they will be ignored.

Parameters:
  • _fields_set (set[str] | None) – A set of field names that were originally explicitly set during instantiation. If provided, this is directly used for the [model_fields_set][pydantic.BaseModel.model_fields_set] attribute. Otherwise, the field names from the values argument will be used.

  • values (Any) – Trusted or pre-validated data dictionary.

Return type:

Self

Returns:

A new instance of the Model class with validated data.

model_copy(*, update=None, deep=False)[source]
!!! abstract “Usage Documentation”

[model_copy](../concepts/models.md#model-copy)

Returns a copy of the model.

!!! note

The underlying instance’s [__dict__][object.__dict__] attribute is copied. This might have unexpected side effects if you store anything in it, on top of the model fields (e.g. the value of [cached properties][functools.cached_property]).

Parameters:
  • update (Mapping[str, Any] | None) – Values to change/add in the new model. Note: the data is not validated before creating the new model. You should trust this data.

  • deep (bool) – Set to True to make a deep copy of the model.

Return type:

Self

Returns:

New model instance.

model_dump(*, mode='python', include=None, exclude=None, context=None, by_alias=None, exclude_unset=False, exclude_defaults=False, exclude_none=False, exclude_computed_fields=False, round_trip=False, warnings=True, fallback=None, serialize_as_any=False, polymorphic_serialization=None)[source]
!!! abstract “Usage Documentation”

[model_dump](../concepts/serialization.md#python-mode)

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

Parameters:
  • mode (Union[Literal['json', 'python'], str]) – The mode in which to_python should run. If mode is ‘json’, the output will only contain JSON serializable types. If mode is ‘python’, the output may contain non-JSON-serializable Python objects.

  • include (Union[set[int], set[str], Mapping[int, Union[set[int], set[str], Mapping[int, Union[IncEx, bool]], Mapping[str, Union[IncEx, bool]], bool]], Mapping[str, Union[set[int], set[str], Mapping[int, Union[IncEx, bool]], Mapping[str, Union[IncEx, bool]], bool]], None]) – A set of fields to include in the output.

  • exclude (Union[set[int], set[str], Mapping[int, Union[set[int], set[str], Mapping[int, Union[IncEx, bool]], Mapping[str, Union[IncEx, bool]], bool]], Mapping[str, Union[set[int], set[str], Mapping[int, Union[IncEx, bool]], Mapping[str, Union[IncEx, bool]], bool]], None]) – A set of fields to exclude from the output.

  • context (Any | None) – Additional context to pass to the serializer.

  • by_alias (bool | None) – Whether to use the field’s alias in the dictionary key if defined.

  • exclude_unset (bool) – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults (bool) – Whether to exclude fields that are set to their default value.

  • exclude_none (bool) – Whether to exclude fields that have a value of None.

  • exclude_computed_fields (bool) – Whether to exclude computed fields. While this can be useful for round-tripping, it is usually recommended to use the dedicated round_trip parameter instead.

  • round_trip (bool) – If True, dumped values should be valid as input for non-idempotent types such as Json[T].

  • warnings (Union[bool, Literal['none', 'warn', 'error']]) – How to handle serialization errors. False/”none” ignores them, True/”warn” logs errors, “error” raises a [PydanticSerializationError][pydantic_core.PydanticSerializationError].

  • fallback (Optional[Callable[[Any], Any]]) – A function to call when an unknown value is encountered. If not provided, a [PydanticSerializationError][pydantic_core.PydanticSerializationError] error is raised.

  • serialize_as_any (bool) – Whether to serialize fields with duck-typing serialization behavior.

  • polymorphic_serialization (bool | None) – Whether to use model and dataclass polymorphic serialization for this call.

Return type:

dict[str, Any]

Returns:

A dictionary representation of the model.

model_dump_json(*, indent=None, ensure_ascii=False, include=None, exclude=None, context=None, by_alias=None, exclude_unset=False, exclude_defaults=False, exclude_none=False, exclude_computed_fields=False, round_trip=False, warnings=True, fallback=None, serialize_as_any=False, polymorphic_serialization=None)[source]
!!! abstract “Usage Documentation”

[model_dump_json](../concepts/serialization.md#json-mode)

Generates a JSON representation of the model using Pydantic’s to_json method.

Parameters:
  • indent (int | None) – Indentation to use in the JSON output. If None is passed, the output will be compact.

  • ensure_ascii (bool) – If True, the output is guaranteed to have all incoming non-ASCII characters escaped. If False (the default), these characters will be output as-is.

  • include (Union[set[int], set[str], Mapping[int, Union[set[int], set[str], Mapping[int, Union[IncEx, bool]], Mapping[str, Union[IncEx, bool]], bool]], Mapping[str, Union[set[int], set[str], Mapping[int, Union[IncEx, bool]], Mapping[str, Union[IncEx, bool]], bool]], None]) – Field(s) to include in the JSON output.

  • exclude (Union[set[int], set[str], Mapping[int, Union[set[int], set[str], Mapping[int, Union[IncEx, bool]], Mapping[str, Union[IncEx, bool]], bool]], Mapping[str, Union[set[int], set[str], Mapping[int, Union[IncEx, bool]], Mapping[str, Union[IncEx, bool]], bool]], None]) – Field(s) to exclude from the JSON output.

  • context (Any | None) – Additional context to pass to the serializer.

  • by_alias (bool | None) – Whether to serialize using field aliases.

  • exclude_unset (bool) – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults (bool) – Whether to exclude fields that are set to their default value.

  • exclude_none (bool) – Whether to exclude fields that have a value of None.

  • exclude_computed_fields (bool) – Whether to exclude computed fields. While this can be useful for round-tripping, it is usually recommended to use the dedicated round_trip parameter instead.

  • round_trip (bool) – If True, dumped values should be valid as input for non-idempotent types such as Json[T].

  • warnings (Union[bool, Literal['none', 'warn', 'error']]) – How to handle serialization errors. False/”none” ignores them, True/”warn” logs errors, “error” raises a [PydanticSerializationError][pydantic_core.PydanticSerializationError].

  • fallback (Optional[Callable[[Any], Any]]) – A function to call when an unknown value is encountered. If not provided, a [PydanticSerializationError][pydantic_core.PydanticSerializationError] error is raised.

  • serialize_as_any (bool) – Whether to serialize fields with duck-typing serialization behavior.

  • polymorphic_serialization (bool | None) – Whether to use model and dataclass polymorphic serialization for this call.

Return type:

str

Returns:

A JSON string representation of the model.

classmethod model_json_schema(by_alias=True, ref_template='#/$defs/{model}', schema_generator=<class 'pydantic.json_schema.GenerateJsonSchema'>, mode='validation', *, union_format='any_of')[source]

Generates a JSON schema for a model class.

Parameters:
  • by_alias (bool) – Whether to use attribute aliases or not.

  • ref_template (str) – The reference template.

  • union_format (Literal['any_of', 'primitive_type_array']) –

    The format to use when combining schemas from unions together. Can be one of:

    keyword to combine schemas (the default). - ‘primitive_type_array’: Use the [type](https://json-schema.org/understanding-json-schema/reference/type) keyword as an array of strings, containing each type of the combination. If any of the schemas is not a primitive type (string, boolean, null, integer or number) or contains constraints/metadata, falls back to any_of.

  • schema_generator (type[GenerateJsonSchema]) – To override the logic used to generate the JSON schema, as a subclass of GenerateJsonSchema with your desired modifications

  • mode (Literal['validation', 'serialization']) – The mode in which to generate the schema.

Return type:

dict[str, Any]

Returns:

The JSON schema for the given model class.

classmethod model_parametrized_name(params)[source]

Compute the class name for parametrizations of generic classes.

This method can be overridden to achieve a custom naming scheme for generic BaseModels.

Parameters:

params (tuple[type[Any], ...]) – Tuple of types of the class. Given a generic class Model with 2 type variables and a concrete model Model[str, int], the value (str, int) would be passed to params.

Return type:

str

Returns:

String representing the new class where params are passed to cls as type variables.

Raises:

TypeError – Raised when trying to generate concrete names for non-generic models.

model_post_init(context, /)[source]

Override this method to perform additional initialization after __init__ and model_construct. This is useful if you want to do some validation that requires the entire model to be initialized.

Return type:

None

classmethod model_rebuild(*, force=False, raise_errors=True, _parent_namespace_depth=2, _types_namespace=None)[source]

Try to rebuild the pydantic-core schema for the model.

This may be necessary when one of the annotations is a ForwardRef which could not be resolved during the initial attempt to build the schema, and automatic rebuilding fails.

Parameters:
  • force (bool) – Whether to force the rebuilding of the model schema, defaults to False.

  • raise_errors (bool) – Whether to raise errors, defaults to True.

  • _parent_namespace_depth (int) – The depth level of the parent namespace, defaults to 2.

  • _types_namespace (Mapping[str, Any] | None) – The types namespace, defaults to None.

Return type:

bool | None

Returns:

Returns None if the schema is already “complete” and rebuilding was not required. If rebuilding _was_ required, returns True if rebuilding was successful, otherwise False.

classmethod model_validate(obj, *, strict=None, extra=None, from_attributes=None, context=None, by_alias=None, by_name=None)[source]

Validate a pydantic model instance.

Parameters:
  • obj (Any) – The object to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • extra (Optional[Literal['allow', 'ignore', 'forbid']]) – Whether to ignore, allow, or forbid extra data during model validation. See the [extra configuration value][pydantic.ConfigDict.extra] for details.

  • from_attributes (bool | None) – Whether to extract data from object attributes.

  • context (Any | None) – Additional context to pass to the validator.

  • by_alias (bool | None) – Whether to use the field’s alias when validating against the provided input data.

  • by_name (bool | None) – Whether to use the field’s name when validating against the provided input data.

Raises:

ValidationError – If the object could not be validated.

Return type:

Self

Returns:

The validated model instance.

classmethod model_validate_json(json_data, *, strict=None, extra=None, context=None, by_alias=None, by_name=None)[source]
!!! abstract “Usage Documentation”

[JSON Parsing](../concepts/json.md#json-parsing)

Validate the given JSON data against the Pydantic model.

Parameters:
  • json_data (str | bytes | bytearray) – The JSON data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • extra (Optional[Literal['allow', 'ignore', 'forbid']]) – Whether to ignore, allow, or forbid extra data during model validation. See the [extra configuration value][pydantic.ConfigDict.extra] for details.

  • context (Any | None) – Extra variables to pass to the validator.

  • by_alias (bool | None) – Whether to use the field’s alias when validating against the provided input data.

  • by_name (bool | None) – Whether to use the field’s name when validating against the provided input data.

Return type:

Self

Returns:

The validated Pydantic model.

Raises:

ValidationError – If json_data is not a JSON string or the object could not be validated.

classmethod model_validate_strings(obj, *, strict=None, extra=None, context=None, by_alias=None, by_name=None)[source]

Validate the given object with string data against the Pydantic model.

Parameters:
  • obj (Any) – The object containing string data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • extra (Optional[Literal['allow', 'ignore', 'forbid']]) – Whether to ignore, allow, or forbid extra data during model validation. See the [extra configuration value][pydantic.ConfigDict.extra] for details.

  • context (Any | None) – Extra variables to pass to the validator.

  • by_alias (bool | None) – Whether to use the field’s alias when validating against the provided input data.

  • by_name (bool | None) – Whether to use the field’s name when validating against the provided input data.

Return type:

Self

Returns:

The validated Pydantic model.

classmethod parse_file(path, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Self

classmethod parse_obj(obj)[source]
Return type:

Self

classmethod parse_raw(b, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Self

classmethod schema(by_alias=True, ref_template='#/$defs/{model}')[source]
Return type:

Dict[str, Any]

classmethod schema_json(*, by_alias=True, ref_template='#/$defs/{model}', **dumps_kwargs)[source]
Return type:

str

classmethod update_forward_refs(**localns)[source]
Return type:

None

classmethod validate(value)[source]
Return type:

Self

property model_extra: dict[str, Any] | None

Get extra fields set during validation.

Returns:

A dictionary of extra fields, or None if config.extra is not set to “allow”.

property model_fields_set: set[str]

Returns the set of fields that have been explicitly set on this model instance.

Returns:

A set of strings representing the fields that have been set,

i.e. that were not filled from defaults.

pydantic model tibiapy.models.BaseAnnouncement[source]

Base class for all announcement classes.

Implement common properties and methods for announcements.

The following implement this class:

Show JSON schema
{
   "title": "BaseAnnouncement",
   "description": "Base class for all announcement classes.\n\nImplement common properties and methods for announcements.\n\nThe following implement this class:\n\n- :class:`.ForumAnnouncement`\n- :class:`.AnnouncementEntry`",
   "type": "object",
   "properties": {
      "announcementId": {
         "description": "The ID of the announcement.",
         "title": "Announcementid",
         "type": "integer"
      }
   },
   "required": [
      "announcementId"
   ]
}

Config:
  • populate_by_name: bool = True

  • alias_generator: function = <function to_camel at 0x73beb93f7e20>

  • use_attribute_docstrings: bool = True

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
  • announcement_id (int)

field announcement_id: int [Required] (alias 'announcementId')

The ID of the announcement.

property url: str

Get the URL to this announcement.

pydantic model tibiapy.models.BaseBoard[source]

Base class for all board classes.

Implements common properties and methods for boards.

The following implement this class:

Show JSON schema
{
   "title": "BaseBoard",
   "description": "Base class for all board classes.\n\nImplements common properties and methods for boards.\n\nThe following implement this class:\n\n- :class:`.ForumBoard`\n- :class:`.BoardEntry`",
   "type": "object",
   "properties": {
      "boardId": {
         "description": "The ID of the board.",
         "title": "Boardid",
         "type": "integer"
      }
   },
   "required": [
      "boardId"
   ]
}

Config:
  • populate_by_name: bool = True

  • alias_generator: function = <function to_camel at 0x73beb93f7e20>

  • use_attribute_docstrings: bool = True

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
  • board_id (int)

field board_id: int [Required] (alias 'boardId')

The ID of the board.

property url: str

The URL of this board.

pydantic model tibiapy.models.BaseCharacter[source]

Base class for all character classes.

The following implement this class:

Show JSON schema
{
   "title": "BaseCharacter",
   "description": "Base class for all character classes.\n\nThe following implement this class:\n\n- :class:`.Character`\n- :class:`.GuildInvite`\n- :class:`.GuildMember`\n- :class:`.HighscoresEntry`\n- :class:`.TournamentLeaderboardEntry`\n- :class:`.OnlineCharacter`\n- :class:`.OtherCharacter`\n- :class:`.Auction`",
   "type": "object",
   "properties": {
      "name": {
         "description": "The name of the character.",
         "title": "Name",
         "type": "string"
      }
   },
   "required": [
      "name"
   ]
}

Config:
  • populate_by_name: bool = True

  • alias_generator: function = <function to_camel at 0x73beb93f7e20>

  • use_attribute_docstrings: bool = True

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
  • name (str)

field name: str [Required]

The name of the character.

property url: str

The URL of the character’s information page on Tibia.com.

pydantic model tibiapy.models.BaseGuild[source]

Base class for Guild classes.

The following implement this class:

Show JSON schema
{
   "title": "BaseGuild",
   "description": "Base class for Guild classes.\n\nThe following implement this class:\n\n- :class:`.Guild`\n- :class:`.GuildMembership`\n- :class:`.GuildEntry`",
   "type": "object",
   "properties": {
      "name": {
         "description": "The name of the guild.",
         "title": "Name",
         "type": "string"
      }
   },
   "required": [
      "name"
   ]
}

Config:
  • populate_by_name: bool = True

  • alias_generator: function = <function to_camel at 0x73beb93f7e20>

  • use_attribute_docstrings: bool = True

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
  • name (str)

field name: str [Required]

The name of the guild.

property url: str

The URL to the guild’s information page on Tibia.com.

property url_wars: str

The URL to the guild’s wars page on Tibia.com.

Added in version 3.0.0.

pydantic model tibiapy.models.BaseHouse[source]

Base class for all house classes.

The following implement this class:

Show JSON schema
{
   "title": "BaseHouse",
   "description": "Base class for all house classes.\n\nThe following implement this class:\n\n- :class:`.House`\n- :class:`.GuildHouse`\n- :class:`.CharacterHouse`\n- :class:`.HouseEntry`",
   "type": "object",
   "properties": {
      "name": {
         "description": "The name of the house.",
         "title": "Name",
         "type": "string"
      }
   },
   "required": [
      "name"
   ]
}

Config:
  • populate_by_name: bool = True

  • alias_generator: function = <function to_camel at 0x73beb93f7e20>

  • use_attribute_docstrings: bool = True

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
  • name (str)

field name: str [Required]

The name of the house.

pydantic model tibiapy.models.HouseWithId[source]

Base classes for houses with an ID.

Show JSON schema
{
   "title": "HouseWithId",
   "description": "Base classes for houses with an ID.",
   "type": "object",
   "properties": {
      "name": {
         "description": "The name of the house.",
         "title": "Name",
         "type": "string"
      },
      "id": {
         "description": "The internal ID of the house. This is used on the website to identify houses.",
         "title": "Id",
         "type": "integer"
      },
      "world": {
         "description": "The name of the world the house belongs to.",
         "title": "World",
         "type": "string"
      }
   },
   "required": [
      "name",
      "id",
      "world"
   ]
}

Config:
  • populate_by_name: bool = True

  • alias_generator: function = <function to_camel at 0x73beb93f7e20>

  • use_attribute_docstrings: bool = True

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
  • id (int)

  • name ()

  • world (str)

field id: int [Required]

The internal ID of the house. This is used on the website to identify houses.

field name: str [Required]

The name of the house.

field world: str [Required]

The name of the world the house belongs to.

property url: str

The URL to the Tibia.com page of the house.

pydantic model tibiapy.models.BaseNews[source]

Base class for all news classes.

Implements the id attribute and common properties.

The following implement this class:

Show JSON schema
{
   "title": "BaseNews",
   "description": "Base class for all news classes.\n\nImplements the :py:attr:`id` attribute and common properties.\n\nThe following implement this class:\n\n- :class:`.News`\n- :class:`.NewsEntry`",
   "type": "object",
   "properties": {
      "id": {
         "description": "The internal ID of the news entry.",
         "title": "Id",
         "type": "integer"
      },
      "category": {
         "description": "The category this belongs to.",
         "enum": [
            "cipsoft",
            "community",
            "development",
            "support",
            "technical"
         ],
         "title": "Category",
         "type": "string"
      }
   },
   "required": [
      "id",
      "category"
   ]
}

Config:
  • populate_by_name: bool = True

  • alias_generator: function = <function to_camel at 0x73beb93f7e20>

  • use_attribute_docstrings: bool = True

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
  • category (tibiapy.enums.NewsCategory)

  • id (int)

field category: NewsCategory [Required]

The category this belongs to.

field id: int [Required]

The internal ID of the news entry.

property url: str

The URL to the Tibia.com page of the news entry.

pydantic model tibiapy.models.BasePost[source]

Base class for post classes.

The following implement this class:

Show JSON schema
{
   "title": "BasePost",
   "description": "Base class for post classes.\n\nThe following implement this class:\n\n- :class:`.CMPost`\n- :class:`.ForumPost`\n- :class:`.LastPost`",
   "type": "object",
   "properties": {
      "postId": {
         "description": "The internal ID of the post.",
         "title": "Postid",
         "type": "integer"
      }
   },
   "required": [
      "postId"
   ]
}

Config:
  • populate_by_name: bool = True

  • alias_generator: function = <function to_camel at 0x73beb93f7e20>

  • use_attribute_docstrings: bool = True

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
  • post_id (int)

field post_id: int [Required] (alias 'postId')

The internal ID of the post.

property url: str

Get the URL to this specific post.

pydantic model tibiapy.models.BaseThread[source]

Base class for thread classes.

The following implement this class:

Show JSON schema
{
   "title": "BaseThread",
   "description": "Base class for thread classes.\n\nThe following implement this class:\n\n- :class:`.ThreadEntry`\n- :class:`.ForumThread`",
   "type": "object",
   "properties": {
      "threadId": {
         "description": "The internal ID of the thread.",
         "title": "Threadid",
         "type": "integer"
      }
   },
   "required": [
      "threadId"
   ]
}

Config:
  • populate_by_name: bool = True

  • alias_generator: function = <function to_camel at 0x73beb93f7e20>

  • use_attribute_docstrings: bool = True

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
  • thread_id (int)

field thread_id: int [Required] (alias 'threadId')

The internal ID of the thread.

property url: str

The URL to the thread in Tibia.com.

Type:

str

pydantic model tibiapy.models.BaseWorld[source]

Base class for all World classes.

Show JSON schema
{
   "title": "BaseWorld",
   "description": "Base class for all World classes.",
   "type": "object",
   "properties": {
      "name": {
         "description": "The name of the world.",
         "title": "Name",
         "type": "string"
      },
      "isOnline": {
         "description": "Whether the world is online or not.",
         "title": "Isonline",
         "type": "boolean"
      },
      "onlineCount": {
         "description": "The number of currently online players in the world.",
         "title": "Onlinecount",
         "type": "integer"
      },
      "location": {
         "description": "The physical location of the game servers.",
         "enum": [
            "Europe",
            "North America",
            "Oceania",
            "South America"
         ],
         "title": "Location",
         "type": "string"
      },
      "pvpType": {
         "description": "The type of PvP in the world.",
         "enum": [
            "Open PvP",
            "Optional PvP",
            "Retro Open PvP",
            "Retro Hardcore PvP",
            "Hardcore PvP"
         ],
         "title": "Pvptype",
         "type": "string"
      },
      "transferType": {
         "description": "The type of transfer restrictions this world has.",
         "enum": [
            "regular",
            "blocked",
            "locked"
         ],
         "title": "Transfertype",
         "type": "string"
      },
      "isPremiumOnly": {
         "description": "Whether only premium account players are allowed to play in this server.",
         "title": "Ispremiumonly",
         "type": "boolean"
      },
      "battleyeSince": {
         "anyOf": [
            {
               "format": "date",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The date when BattlEye was added to this world.",
         "title": "Battleyesince"
      },
      "battleyeType": {
         "description": "The type of BattlEye protection this world has.",
         "enum": [
            "UNPROTECTED",
            "PROTECTED",
            "INITIALLY_PROTECTED"
         ],
         "title": "Battleyetype",
         "type": "string"
      },
      "isExperimental": {
         "description": "Whether the world is experimental or not.",
         "title": "Isexperimental",
         "type": "boolean"
      }
   },
   "required": [
      "name",
      "isOnline",
      "onlineCount",
      "location",
      "pvpType",
      "transferType",
      "isPremiumOnly",
      "battleyeType",
      "isExperimental"
   ]
}

Config:
  • populate_by_name: bool = True

  • alias_generator: function = <function to_camel at 0x73beb93f7e20>

  • use_attribute_docstrings: bool = True

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
  • battleye_since (datetime.date | None)

  • battleye_type (tibiapy.enums.BattlEyeType)

  • is_experimental (bool)

  • is_online (bool)

  • is_premium_only (bool)

  • location (tibiapy.enums.WorldLocation)

  • name (str)

  • online_count (int)

  • pvp_type (tibiapy.enums.PvpType)

  • transfer_type (tibiapy.enums.TransferType)

field battleye_since: Optional[date] = None (alias 'battleyeSince')

The date when BattlEye was added to this world.

field battleye_type: BattlEyeType [Required] (alias 'battleyeType')

The type of BattlEye protection this world has.

field is_experimental: bool [Required] (alias 'isExperimental')

Whether the world is experimental or not.

field is_online: bool [Required] (alias 'isOnline')

Whether the world is online or not.

field is_premium_only: bool [Required] (alias 'isPremiumOnly')

Whether only premium account players are allowed to play in this server.

field location: WorldLocation [Required]

The physical location of the game servers.

field name: str [Required]

The name of the world.

field online_count: int [Required] (alias 'onlineCount')

The number of currently online players in the world.

field pvp_type: PvpType [Required] (alias 'pvpType')

The type of PvP in the world.

field transfer_type: TransferType [Required] (alias 'transferType')

The type of transfer restrictions this world has.

property is_battleye_protected: bool

Whether the server is currently protected with BattlEye or not.

Changed in version 4.0.0: Now a calculated property instead of a field.

property url: str

URL to the world’s information page on Tibia.com.

pydantic model tibiapy.models.pagination.Paginated[source]

An entity made of multiple pages.

Show JSON schema
{
   "title": "Paginated",
   "description": "An entity made of multiple pages.",
   "type": "object",
   "properties": {
      "currentPage": {
         "default": 1,
         "description": "The currently viewed page.",
         "title": "Currentpage",
         "type": "integer"
      },
      "totalPages": {
         "default": 1,
         "description": "The total number of pages.",
         "title": "Totalpages",
         "type": "integer"
      },
      "resultsCount": {
         "default": 0,
         "description": "The total number of entries across all pages.",
         "title": "Resultscount",
         "type": "integer"
      },
      "entries": {
         "default": [],
         "description": "The entries in this page.",
         "items": {},
         "title": "Entries",
         "type": "array"
      }
   }
}

Config:
  • populate_by_name: bool = True

  • alias_generator: function = <function to_camel at 0x73beb93f7e20>

  • use_attribute_docstrings: bool = True

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
field current_page: int = 1 (alias 'currentPage')

The currently viewed page.

field entries: list[TypeVar(T)] = []

The entries in this page.

field results_count: int = 0 (alias 'resultsCount')

The total number of entries across all pages.

field total_pages: int = 1 (alias 'totalPages')

The total number of pages.

pydantic model tibiapy.models.pagination.PaginatedWithUrl[source]

An entity made of multiple pages with URLs.

Show JSON schema
{
   "title": "PaginatedWithUrl",
   "description": "An entity made of multiple pages with URLs.",
   "type": "object",
   "properties": {
      "currentPage": {
         "default": 1,
         "description": "The currently viewed page.",
         "title": "Currentpage",
         "type": "integer"
      },
      "totalPages": {
         "default": 1,
         "description": "The total number of pages.",
         "title": "Totalpages",
         "type": "integer"
      },
      "resultsCount": {
         "default": 0,
         "description": "The total number of entries across all pages.",
         "title": "Resultscount",
         "type": "integer"
      },
      "entries": {
         "default": [],
         "description": "The entries in this page.",
         "items": {},
         "title": "Entries",
         "type": "array"
      }
   }
}

Config:
  • populate_by_name: bool = True

  • alias_generator: function = <function to_camel at 0x73beb93f7e20>

  • use_attribute_docstrings: bool = True

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
field current_page: int = 1 (alias 'currentPage')

The currently viewed page.

field entries: list[T] = []

The entries in this page.

field results_count: int = 0 (alias 'resultsCount')

The total number of entries across all pages.

field total_pages: int = 1 (alias 'totalPages')

The total number of pages.

abstract get_page_url(page)[source]

Get the URL to a specific page of the results.

Return type:

str

property next_page_url: str | None

The URL to the next page of the results, if available.

property previous_page_url: str | None

The URL to the previous page of the results, if available.

pydantic model tibiapy.models.pagination.AjaxPaginator[source]

A paginator that can be fetched via AJAX requests.

Show JSON schema
{
   "title": "AjaxPaginator",
   "description": "A paginator that can be fetched via AJAX requests.",
   "type": "object",
   "properties": {
      "currentPage": {
         "default": 1,
         "description": "The currently viewed page.",
         "title": "Currentpage",
         "type": "integer"
      },
      "totalPages": {
         "default": 1,
         "description": "The total number of pages.",
         "title": "Totalpages",
         "type": "integer"
      },
      "resultsCount": {
         "default": 0,
         "description": "The total number of entries across all pages.",
         "title": "Resultscount",
         "type": "integer"
      },
      "entries": {
         "default": [],
         "description": "The entries in this page.",
         "items": {},
         "title": "Entries",
         "type": "array"
      },
      "isFullyFetched": {
         "default": false,
         "description": "Whether this result set was fully fetched or not.",
         "title": "Isfullyfetched",
         "type": "boolean"
      }
   }
}

Config:
  • populate_by_name: bool = True

  • alias_generator: function = <function to_camel at 0x73beb93f7e20>

  • use_attribute_docstrings: bool = True

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
field current_page: int = 1 (alias 'currentPage')

The currently viewed page.

field entries: list[T] = []

The entries in this page.

field is_fully_fetched: bool = False (alias 'isFullyFetched')

Whether this result set was fully fetched or not.

field results_count: int = 0 (alias 'resultsCount')

The total number of entries across all pages.

field total_pages: int = 1 (alias 'totalPages')

The total number of pages.

Parsers

Parsers are used to convert to extract information from the HTML content of pages in Tibia.com.

The majority of users do not need to interact with these classes, but they can be used to provide alternate clients using other network libraries.

Most of the parsers support parsing the page displayed for no results (e.g. trying to parse the page for non-existent world Fidera) by returning None instead of raising an exception. Additionally, parsers attempt to detect when the HTML belongs to a different section by raising a InvalidContent exception.

class tibiapy.parsers.AuctionParser[source]

Parser for Tibia.com character auctions.

classmethod from_content(content, auction_id=0, skip_details=False)[source]

Parse an auction detail page from Tibia.com and extracts its data.

Parameters:
  • content (str) – The HTML content of the auction detail page in Tibia.com

  • auction_id (int) –

    The ID of the auction.

    It is not possible to extract the ID from the page’s content, so it may be passed to assign it manually.

  • skip_details (bool) –

    Whether to skip parsing the entire auction and only parse the information shown in lists. False by default.

    This allows fetching basic information like name, level, vocation, world, bid and status, shaving off some parsing time.

Return type:

Optional[Auction]

Returns:

The auction details if found, None otherwise.

Raises:

InvalidContent – If the content does not belong to an auction detail’s page.

class tibiapy.parsers.CharacterBazaarParser[source]

Parser for the character bazaar in Tibia.com.

classmethod from_content(content)[source]

Get the bazaar’s information and list of auctions from Tibia.com.

Parameters:

content (str) – The HTML content of the bazaar section at Tibia.com.

Return type:

CharacterBazaar

Returns:

The character bazaar with the entries found.

class tibiapy.parsers.CharacterParser[source]

A parser for characters from Tibia.com.

classmethod from_content(content)[source]

Create an instance of the class from the html content of the character’s page.

Parameters:

content (str) – The HTML content of the page.

Return type:

Optional[Character]

Returns:

The character contained in the page, or None if the character doesn’t exist

Raises:

InvalidContent – If content is not the HTML of a character’s page.

class tibiapy.parsers.BoostableBossesParser[source]

Parser for the boostable bosses section of Tibia.com.

classmethod from_content(content)[source]

Create an instance of the class from the html content of the boostable bosses library’s page.

Parameters:

content (str) – The HTML content of the page.

Return type:

BoostableBosses

Returns:

The Boostable Bosses section.

Raises:

InvalidContent – If content is not the HTML of a creature library’s page.

classmethod boosted_boss_from_header(content)[source]

Get the boosted boss from any Tibia.com page.

Parameters:

content (str) – The HTML content of a Tibia.com page.

Return type:

BossEntry

Returns:

The boosted boss of the day.

Raises:

InvalidContent – If content is not the HTML of a Tibia.com’s page.

class tibiapy.parsers.BoostedCreaturesParser[source]

Parser for boosted creatures and bosses.

classmethod from_header(content)[source]

Parse both boosted creature and boss from the content of any section in Tibia.com.

Parameters:

content (str) – The HTML content of the page.

Return type:

BoostedCreatures

Returns:

The boosted creature and boss.

Raises:

InvalidContent – If content is not the HTML of a Tibia.com page.

class tibiapy.parsers.CreatureParser[source]

Parser for creatures.

classmethod from_content(content)[source]

Create an instance of the class from the html content of the creature library’s page.

Parameters:

content (str) – The HTML content of the page.

Return type:

Optional[Creature]

Returns:

The creature contained in the page.

class tibiapy.parsers.CreaturesSectionParser[source]

Parser for the creatures section in the library from Tibia.com.

classmethod boosted_creature_from_header(content)[source]

Get the boosted creature from any Tibia.com page.

Parameters:

content (str) – The HTML content of a Tibia.com page.

Return type:

CreatureEntry

Returns:

The boosted creature of the day.

Raises:

InvalidContent – If content is not the HTML of a Tibia.com’s page.

classmethod from_content(content)[source]

Create an instance of the class from the html content of the creature library’s page.

Parameters:

content (str) – The HTML content of the page.

Return type:

CreaturesSection

Returns:

The creatures section from Tibia.com.

Raises:

InvalidContent – If content is not the HTML of a creature library’s page.

class tibiapy.parsers.EventScheduleParser[source]

Parser for the event schedule from Tibia.com.

classmethod from_content(content)[source]

Create an instance of the class from the html content of the event’s calendar.

Parameters:

content (str) – The HTML content of the page.

Return type:

EventSchedule

Returns:

The event calendar contained in the page

Raises:

InvalidContent – If content is not the HTML of the event’s schedule page.

class tibiapy.parsers.CMPostArchiveParser[source]

Parser for the content of the CM Post Archive page in Tibia.com.

classmethod from_content(content)[source]

Parse the content of the CM Post Archive page from Tibia.com.

Parameters:

content (str) – The HTML content of the CM Post Archive in Tibia.com

Return type:

CMPostArchive

Returns:

The CM Post archive found in the page.

Raises:

InvalidContent – If content is not the HTML content of the CM Post Archive in Tibia.com

class tibiapy.parsers.FansitesSectionParser[source]

Parser for the fansites section.

classmethod from_content(content)[source]

Get the list of available fansites from the HTML of the Tibia.com fansites section.

Parameters:

content (str) – The HTML content of the page.

Return type:

FansitesSection

Returns:

The fansites section.

Raises:

InvalidContent – If content is not the HTML of the fansites section’s page.

class tibiapy.parsers.ForumAnnouncementParser[source]

Parser for forum announcements posted by CipSoft.

classmethod from_content(content, announcement_id=0)[source]

Parse the content of an announcement’s page from Tibia.com.

Parameters:
  • content (str) – The HTML content of an announcement in Tibia.com

  • announcement_id (int) – The id of the announcement. Since there is no way to obtain the id from the page, the id may be passed to assign.

Return type:

Optional[ForumAnnouncement]

Returns:

The announcement contained in the page or None if not found.

Raises:

InvalidContent – If content is not the HTML content of an announcement page in Tibia.com

class tibiapy.parsers.ForumBoardParser[source]

A parser for forum boards from Tibia.com.

classmethod from_content(content)[source]

Parse the board’s HTML content from Tibia.com.

Parameters:

content (str) – The HTML content of the board.

Return type:

Optional[ForumBoard]

Returns:

The forum board contained.

Raises:

InvalidContent` – Content is not a board in Tibia.com

class tibiapy.parsers.ForumSectionParser[source]

Parser for forum sections, such as world boards, trade boards, etcetera.

classmethod from_content(content)[source]

Parse a forum section from Tibia.com.

Parameters:

content (str) – The HTML content from Tibia.com

Return type:

ForumSection

Returns:

The forum section found in the page.

class tibiapy.parsers.ForumThreadParser[source]

A parser for forum threads from Tibia.com.

classmethod from_content(content)[source]

Create an instance of the class from the html content of the thread’s page.

Parameters:

content (str) – The HTML content of the page.

Return type:

Optional[ForumThread]

Returns:

The thread contained in the page, or None if the thread doesn’t exist

Raises:

InvalidContent – If content is not the HTML of a thread’s page.

class tibiapy.parsers.GuildParser[source]

Parser for guild pages in Tibia.com.

classmethod from_content(content)[source]

Create an instance of the class from the HTML content of the guild’s page.

Parameters:

content (str) – The HTML content of the page.

Return type:

Optional[Guild]

Returns:

The guild contained in the page or None if it doesn’t exist.

Raises:

InvalidContent – If content is not the HTML of a guild’s page.

class tibiapy.parsers.GuildsSectionParser[source]

Parser for the guild sections in Tibia.com.

classmethod from_content(content)[source]

Get a list of guilds from the HTML content of the world guilds’ page.

Parameters:

content (str) – The HTML content of the page.

Return type:

Optional[GuildsSection]

Returns:

List of guilds in the current world. None if it’s the list of a world that doesn’t exist.

Raises:

InvalidContent – If content is not the HTML of a guild’s page.

class tibiapy.parsers.GuildWarsParser[source]

Parser for guild war history from Tibia.com.

classmethod from_content(content)[source]

Get a guild’s war information from Tibia.com’s content.

Parameters:

content (str) – The HTML content of a guild’s war section in Tibia.com

Return type:

GuildWars

Returns:

The guild’s war information.

class tibiapy.parsers.HighscoresParser[source]

Represents the highscores of a world.

classmethod from_content(content)[source]

Create an instance of the class from the html content of a highscores page.

Notes

Tibia.com only shows up to 50 entries per page, so to obtain the full highscores, all pages must be obtained individually and merged into one.

Parameters:

content (str) – The HTML content of the page.

Return type:

Optional[Highscores]

Returns:

The highscores results contained in the page.

Raises:

InvalidContent – If content is not the HTML of a highscore’s page.

class tibiapy.parsers.HousesSectionParser[source]

Parser for the houses section from Tibia.com.

classmethod from_content(content)[source]

Parse the content of a house list from Tibia.com into a list of houses.

Parameters:

content (str) – The raw HTML response from the house list.

Return type:

HousesSection

Returns:

The houses found in the page.

Raises:

InvalidContent – Content is not the house list from Tibia.com

class tibiapy.parsers.HouseParser[source]

Parser for Houses information.

classmethod from_content(content)[source]

Parse a Tibia.com response into a House object.

Parameters:

content (str) – HTML content of the page.

Return type:

Optional[House]

Returns:

The house contained in the page, or None if the house doesn’t exist.

Raises:

InvalidContent – If the content is not the house section on Tibia.com

class tibiapy.parsers.KillStatisticsParser[source]

Parser for kill statistics.

classmethod from_content(content)[source]

Create an instance of the class from the HTML content of the kill statistics’ page.

Parameters:

content (str) – The HTML content of the page.

Return type:

Optional[KillStatistics]

Returns:

The kill statistics contained in the page or None if it doesn’t exist.

Raises:

InvalidContent – If content is not the HTML of a kill statistics’ page.

class tibiapy.parsers.LeaderboardParser[source]

Parser for leaderboards.

classmethod from_content(content)[source]

Parse the content of the leaderboards page.

Parameters:

content (str) – The HTML content of the leaderboards page.

Return type:

Optional[Leaderboard]

Returns:

The leaderboard, if found.

class tibiapy.parsers.NewsArchiveParser[source]

Parse Tibia.com content from the news archive section.

classmethod get_form_data(start_date, end_date, categories=None, types=None)[source]

Get the form data attributes to search news with specific parameters.

Parameters:
  • start_date (date) – The beginning date to search dates in.

  • end_date (date) – The end date to search dates in.

  • categories (set[NewsCategory]) – The allowed categories to show. If left blank, all categories will be searched.

  • types (set[NewsType]) – The allowed news types to show. if unused, all types will be searched.

Return type:

dict[str, Union[str, int]]

Returns:

A dictionary with the required form data to search news in the archive.

classmethod from_content(content)[source]

Get a list of news from the HTML content of the news search page.

Parameters:

content (str) – The HTML content of the page.

Return type:

NewsArchive

Returns:

The news archive with the news found.

Raises:

InvalidContent – If content is not the HTML of a news search’s page.

class tibiapy.parsers.NewsParser[source]

Parser for news articles from Tibia.com.

classmethod from_content(content, news_id=0)[source]

Get a news entry by its HTML content from Tibia.com.

Notes

Since there’s no way to obtain the entry’s ID from the page contents, it will always be 0. A news_id can be passed to set the news_id of the resulting object.

Parameters:
  • content (str) – The HTML content of the page.

  • news_id (int) – The news_id belonging to the content being parsed.

Return type:

Optional[News]

Returns:

The news article found in the page.

Raises:

InvalidContent – If content is not the HTML of a news’ page.

class tibiapy.parsers.SpellsSectionParser[source]

Parses Tibia.com content from the Spells Section.

classmethod from_content(content)[source]

Parse the content of the spells section.

Parameters:

content (str) – The HTML content of the page.

Return type:

SpellsSection

Returns:

The spells contained and the filtering information.

Raises:

InvalidContent – If content is not the HTML of the spells section.

class tibiapy.parsers.SpellParser[source]

Parses Tibia.com from a spell’s information page.

classmethod from_content(content)[source]

Parse the content of a spells page.

Parameters:

content (str) – The HTML content of the page.

Return type:

Optional[Spell]

Returns:

The spell data. If the spell doesn’t exist, this will be None.

Raises:

InvalidContent – If content is not the HTML of the spells section.

class tibiapy.parsers.WorldParser[source]

Parses Tibia.com content into worlds.

classmethod from_content(content)[source]

Parse a Tibia.com response into a World.

Parameters:

content (str) – The raw HTML from the server’s information page.

Return type:

Optional[World]

Returns:

The World described in the page, or None.

Raises:

InvalidContent – If the provided content is not the HTML content of the world section in Tibia.com

class tibiapy.parsers.WorldOverviewParser[source]

Parses Tibia.com content from the World Overview section.

classmethod from_content(content)[source]

Parse the content of the World Overview section from Tibia.com into an object of this class.

Parameters:

content (str) – The HTML content of the World Overview page in Tibia.com

Return type:

WorldOverview

Returns:

An instance of this class containing all the information.

Raises:

InvalidContent – If the provided content is not the HTML content of the worlds section in Tibia.com

Exceptions

class tibiapy.TibiapyException(**kwargs)[source]

Deprecated, use TibiapyError instead.

class tibiapy.InvalidContent(message, original=None)[source]

Deprecated, use InvalidContentError instead.

class tibiapy.NetworkError(message, original=None, fetching_time=0.0)[source]

Exception thrown when there was a network error trying to fetch a resource from the web.

original

The original exception that caused this exception.

Type:

Exception

fetching_time

The time between the request and the response.

Type:

float

class tibiapy.SiteMaintenanceError(message, original=None, fetching_time=0.0)[source]

A subclass of NetworkError thrown when Tibia.com is down for maintenance.

When Tibia.com is under maintenance, all sections of the website redirect to maintenance.tibia.com.

class tibiapy.Forbidden(message, original=None, fetching_time=0.0)[source]

Deprecated, use ForbiddenError instead.

Utility functions

These are functions used thorough the module that may not be intended for public use.

pydantic model tibiapy.utils.FormData[source]

Represents data in a HTML form.

Show JSON schema
{
   "title": "FormData",
   "description": "Represents data in a HTML form.",
   "type": "object",
   "properties": {
      "values": {
         "additionalProperties": {
            "type": "string"
         },
         "default": {},
         "title": "Values",
         "type": "object"
      },
      "values_multiple": {
         "additionalProperties": {
            "items": {
               "type": "string"
            },
            "type": "array"
         },
         "title": "Values Multiple",
         "type": "object"
      },
      "available_options": {
         "additionalProperties": {
            "additionalProperties": {
               "type": "string"
            },
            "type": "object"
         },
         "title": "Available Options",
         "type": "object"
      },
      "action": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Action"
      },
      "method": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Method"
      }
   }
}

Fields:
field action: Optional[str] = None

The form’s action URL.

field available_options: dict[str, dict[str, str]] = {}

The available options in select fields, radios and check boxes.

field method: Optional[str] = None

The form’s method.

field values: dict[str, str] = {}

The values in the form.

This contains text fields, select fields and radios.

field values_multiple: dict[str, list[str]] = {}

The selected values in the form of inputs that allow multiple selections.

This contains the values of check boxes.

tibiapy.utils.clean_text(tag)[source]

Get the tag’s text, removing non-breaking, leading and trailing spaces.

Parameters:

tag (bs4.Tag, str) – The tax to get the clean content of. Strings are also accepted.

Return type:

str

Returns:

The tag’s cleaned text content.

tibiapy.utils.convert_line_breaks(element)[source]

Convert the <br> tags in a HTML elements to actual line breaks.

Parameters:

element (bs4.Tag) – A BeautifulSoup object.

Return type:

None

tibiapy.utils.get_rows(table_tag)[source]

Get all the row tags inside the container.

A very simple shortcut function used for better code semantics.

Parameters:

table_tag (bs4.Tag) – The tag where row tags will be search in. Not necessarily a table tag.

Returns:

A result set with all the found rows.

tibiapy.utils.parse_form_data(form)[source]

Parse the currently selected values in a form.

This should correspond to all the data the form would send if submitted.

Parameters:

form (bs4.Tag) – A form tag.

Return type:

FormData

Returns:

The values and data of the form.

tibiapy.utils.parse_integer(number, default=0)[source]

Parse a string representing an integer, ignoring commas or periods.

Parameters:
  • number (str) – A string representing a number.

  • default (int) – The default value to use if the string is not numeric. By default, 0 is used.

Returns:

The represented integer, or the default value if invalid.

Return type:

int

class tibiapy.utils.LinkInfo[source]

Represent the dictionary containing link information.

Parse the information of a link tag.

It will parse the link’s content, target URL as well as the query parameters where applicable.

Parameters:

link_tag (bs4.Tag) – The link tag object.

Returns:

A dictionary containing the link’s data.

Return type:

dict

Examples

>>> # <a href="https://www.tibia.com/community/?subtopic=houses&page=view&houseid=55302&world=Gladera">House</>
>>> parse_link_info(link_tag)
{
    "text": "House",
    "url": "https://www.tibia.com/community/?subtopic=houses&page=view&houseid=55302&world=Gladera"
    "query": {
        "subtopic": "houses",
        "page": "view",
        "houseid": "55302",
        "world": "Gladera"
    }
}

When parsing links that have multiple query parameters, they are displayed as a list. Empty parameters are omitted.

>>> # <a href="https://example.com/?world=&beprotection=-1&worldtypes[]=0&worldtypes[]=3">Link</a>
>>> parse_link_info(link_tag)
{
    "text": "Link",
    "url": "https://example.com/?world=&beprotection=-1&worldtypes[]=0&worldtypes[]=3"
    "query": {
        "beprotection": "-1",
        "worldtypes": ["0", "3"]
    }
}
tibiapy.utils.parse_tibia_datetime(datetime_str)[source]

Parse date and time from the format used in Tibia.com.

Accepted format:

  • MMM DD YYYY, HH:mm:ss ZZZ, e.g. Dec 10 2018, 21:53:37 CET.

  • MMM DD YYYY, HH:mm ZZZ, e.g. Dec 10 2018, 21:53 CET.

Parameters:

datetime_str (str) – The date and time as represented in Tibia.com

Returns:

The represented datetime, in UTC (timezone aware).

Return type:

datetime.datetime, optional

tibiapy.utils.parse_tibia_date(date_str)[source]

Parse a date from the format used in Tibia.com.

Accepted format:

  • MMM DD YYYY, e.g. Jul 23 2015

Parameters:

date_str (str) – The date as represented in Tibia.com

Returns:

The represented date, in UTC (timezone aware).

Return type:

datetime.date, optional

tibiapy.utils.parse_tibia_forum_datetime(datetime_str, utc_offset=1)[source]

Parse a date in the format used in the Tibia.com forums.

Accepted format:

  • DD.MM.YY HH:mm:ss, e.g. 23.07.2015 21:30:30

Parameters:
  • datetime_str (str) – The string containing the date and time.

  • utc_offset (int) –

    The UTC offset to apply to the parsed datetime.

    Since the timestamps contain no timezone information, it can be passed as an additional parameter.

    By default CET (+1) is considered.

Returns:

The represented datetime, in UTC (timezone aware).

Return type:

datetime.datetime

tibiapy.utils.parse_tibia_full_date(date_str)[source]

Parse a date in the fuller format used in Tibia.com.

Accepted format:

  • MMMM DD, YYYY, e.g. July 23, 2015

Parameters:

date_str (str) – The date as represented in Tibia.com

Returns:

The represented date, in UTC (timezone aware).

Return type:

datetime.date, optional

tibiapy.utils.parse_number_words(text_num)[source]

Parse the word representation of a number to a integer.

Parameters:

text_num (str) – The text representation of a number.

Returns:

The number represented by the string.

Return type:

int

tibiapy.utils.try_datetime(obj)[source]

Attempt to convert an object into a datetime.

If the date format is known, it’s recommended to use the corresponding function This is meant to be used in constructors.

Parameters:

obj (str, dict, datetime.datetime) – The object to convert.

Returns:

The represented datetime, in UTC (timezone aware), or None if conversion wasn’t possible.

Return type:

datetime.datetime, optional

tibiapy.utils.try_date(obj)[source]

Attempt to convert an object into a date.

If the date format is known, it’s recommended to use the corresponding function This is meant to be used in constructors.

Parameters:

obj (str, datetime.datetime, datetime.date) – The object to convert.

Returns:

The represented date, in UTC (timezone aware).

Return type:

datetime.date, optional

tibiapy.utils.parse_tables_map(parsed_content, selector='div.TableContentContainer')[source]

Parse Tibia.com style tables, building a map with their title as key.

Return type:

dict[str, Tag]

tibiapy.utils.parse_tibiacom_content(content, *, html_class='BoxContent', tag='div', builder='lxml')[source]

Parse HTML content from Tibia.com into a BeautifulSoup object.

Parameters:
  • content (str) – The raw HTML content from Tibia.com

  • html_class (str) – The HTML class of the parsed element. The default value is BoxContent.

  • tag (str) – The HTML tag select. The default value is div.

  • builder (str) – The builder to use. The default value is lxml.

Returns:

The parsed content.

Return type:

bs4.BeautifulSoup, optional

tibiapy.utils.parse_tibiacom_tables(parsed_content)[source]

Parse tables from Tibia.com into a mapping by the tables title.

This is used for the table style used in Tibia.com, where a table is wrapped in a container with a title.

Parameters:

parsed_content (bs4.BeautifulSoup) – The content to find the tables in.

Returns:

A dictionary mapping the container titles and the contained table.

Return type:

dict

tibiapy.utils.try_enum(cls, val, default=None)[source]

Attempt to convert a value into their enum value.

Parameters:
  • cls (Enum) – The enum to convert to.

  • val (Any) – The value to try to convert to Enum

  • default (optional) – The value to return if no enum value is found.

Returns:

The enum value if found, otherwise None.

Return type:

obj

tibiapy.utils.parse_tibia_money(argument)[source]

Parse a string that may contain ‘k’ as thousands suffix.

Parameters:

argument (str) – A numeric string using k as a prefix for thousands.

Returns:

The value represented by the string.

Return type:

int

tibiapy.utils.split_list(items, separator=',', last_separator=' and ')[source]

Split a string listing elements into an actual list.

Parameters:
  • items (str) – A string listing elements.

  • separator (str) – The separator between each item. A comma by default.

  • last_separator (str) – The separator used for the last item. ‘ and ‘ by default.

Returns:

A list containing each one of the items.

Return type:

list of str

tibiapy.utils.parse_popup(popup_content)[source]

Parse the information popups used through Tibia.com.

Parameters:

popup_content (str) – The raw content of the javascript function that creates the popup.

Return type:

tuple[str, BeautifulSoup]

Returns:

tibiapy.utils.parse_pagination(pagination_block)[source]

Parse a pagination section in Tibia.com and extracts its information.

Parameters:

pagination_block (bs4.Tag) – The HTML containing the pagination information.

Return type:

tuple[int, int, int]

Returns:

  • page (int) – The current page.

  • total_pages (int) – The total number of pages.

  • results_count (int) – The total number of results.

tibiapy.utils.take_while(iterable, predicate)[source]

Go through items in an iterable until the predicate function is not True.

Return type:

Iterable[TypeVar(T)]

URL functions

Functions to generate urls to Tibia.com.

tibiapy.urls.get_tibia_url(section, subtopic=None, *args, anchor=None, test=False, **kwargs)[source]

Build a URL to Tibia.com with the given parameters.

Parameters:
  • section (str) – The desired section (e.g., community, abouttibia, manual, library)

  • subtopic (str, optional) – The desired subtopic (e.g., characters, guilds, houses, etc.)

  • anchor (str) – A link anchor to add to the link.

  • args (tuple[str, Union[str, int]]) – A list of key-value pairs to add as query parameters. This allows passing multiple parameters with the same name.

  • kwargs (Union[str, int]) – Additional parameters to pass to the url as query parameters (e.g., name, world, houseid, etc.)

  • test (bool) – Whether to use the test website or not.

Returns:

The generated Tibia.com URL.

Return type:

str

Examples

>>> get_tibia_url("community", "houses", page="view", houseid=55302, world="Gladera")
https://www.tibia.com/community/?subtopic=houses&page=view&houseid=55302&world=Gladera

You can also build a dictionary and pass it like:

>>> params = {'world': "Gladera"}
>>> get_tibia_url("community", "worlds", **params)
https://www.tibia.com/community/?subtopic=worlds&world=Gladera
tibiapy.urls.get_static_file_url(*path)[source]

Build a URL to a static file in Tibia.com.

Parameters:

path (str) – The path to the static file.

Return type:

str

Examples

>>> get_static_file_url("images", "global", "content", "newsicon_community_big.gif")
https://static.tibia.com/images/global/content/newsicon_community_big.gif
tibiapy.urls.get_character_url(name)[source]

Get the URL to a character in Tibia.com.

Parameters:

name (str) – The name of the character.

Returns:

The URL to the character’s page in Tibia.com.

Return type:

str

tibiapy.urls.get_world_guilds_url(world)[source]

Get the URL to the guild list of a specific world.

Parameters:

world (str) – The name of the world.

Returns:

The URL to the guild list’s page in Tibia.com.

Return type:

str

tibiapy.urls.get_guild_url(name)[source]

Get the URL to a guild’s page.

Parameters:

name (str) – The name of the guild.

Returns:

The URL to the guild’s page in Tibia.com.

Return type:

str

tibiapy.urls.get_guild_wars_url(name)[source]

Get the Tibia.com URL for the guild wars of a guild with a given name.

Parameters:

name (str) – The name of the guild.

Returns:

The URL to the guild’s wars’ page.

Return type:

str

tibiapy.urls.get_house_url(world, house_id)[source]

Get the URL to a house’s page in Tibia.com.

Parameters:
  • world (str) – The world where the house is located.

  • house_id (int) – The ID of the house.

Returns:

The URL to the house’s page in Tibia.com.

Return type:

str

tibiapy.urls.get_fansites_url()[source]

Get the Tibia.com URL for the fansites section.

Returns:

The URL to the fansites section.

Return type:

str

tibiapy.urls.get_world_overview_url()[source]

Get the URL to world overview section in Tibia.com.

Returns:

The URL to the world overview section in Tibia.com.

Return type:

str

tibiapy.urls.get_world_url(name)[source]

Get the URL to the World’s information page on Tibia.com.

Parameters:

name (str) – The name of the world.

Returns:

The URL to the world’s information page.

Return type:

str

tibiapy.urls.get_news_archive_url()[source]

Get the URL to Tibia.com’s news archive page.

Notes

It is not possible to perform a search using query parameters. News searches can only be performed using POST requests sending the parameters as form-data.

Returns:

The URL to the news archive page.

Return type:

str

tibiapy.urls.get_news_url(news_id)[source]

Get the URL to a news article.

Parameters:

news_id (int) – The ID of the article.

Returns:

The URL to the article’s page on Tibia.com

Return type:

str

tibiapy.urls.get_forum_section_url(section_id)[source]

Get the URL to a forum section in Tibia.com.

Parameters:

section_id (int) – The ID of the section.

Returns:

The URL to forum section.

Return type:

str

tibiapy.urls.get_forum_section_url_by_name(section_name)[source]

Get the URL to a forum section in Tibia.com by its name.

Parameters:

section_name (str) – The name of the section.

Returns:

The URL to forum section.

Return type:

str

tibiapy.urls.get_world_boards_url()[source]

Get the URL to the World Boards section in Tibia.com.

Returns:

The URL to the World Boards.

Return type:

str

tibiapy.urls.get_trade_boards_url()[source]

Get the URL to the Trade Boards section in Tibia.com.

Returns:

The URL to the Trade Boards.

Return type:

str

tibiapy.urls.get_community_boards_url()[source]

Get the URL to the Community Boards section in Tibia.com.

Returns:

The URL to the Community Boards.

Return type:

str

tibiapy.urls.get_support_boards_url()[source]

Get the URL to the Support Boards section in Tibia.com.

Returns:

The URL to the Support Boards.

Return type:

str

tibiapy.urls.get_forum_board_url(board_id, page=1, thread_age=None)[source]

Get the URL to a forum board.

Parameters:
  • board_id (int) – The ID of the board.

  • page (int) – The page to display.

  • thread_age (int) –

    The maximum age in days for the threads to be shown.

    -1 means any age.

Returns:

The URL to forum board.

Return type:

str

tibiapy.urls.get_forum_announcement_url(announcement_id)[source]

Get the URL to a forum announcement.

Parameters:

announcement_id (int) – The ID of the announcement.

Returns:

The URL to forum announcement.

Return type:

str

tibiapy.urls.get_forum_thread_url(thread_id, page=1)[source]

Get the URL to a forum board.

Parameters:
  • thread_id (int) – The ID of the thread.

  • page (int) – The page to display.

Returns:

The URL to forum thread.

Return type:

str

tibiapy.urls.get_forum_post_url(post_id)[source]

Get the URL to a specific post.

Parameters:

post_id (int) – The ID of the desired post.

Returns:

The URL to the post.

Return type:

str

tibiapy.urls.get_highscores_url(world=None, category=None, vocation=None, page=1, battleye_type=None, pvp_types=None)[source]

Get the Tibia.com URL of the highscores for the given parameters.

Parameters:
  • world (str) – The game world of the desired highscores. If no world is passed, ALL worlds are shown.

  • category (HighscoresCategory) – The desired highscores category.

  • vocation (HighscoresProfession) – The vocation filter to apply. By default, all vocations will be shown.

  • page (int) – The page of highscores to show.

  • battleye_type (HighscoresBattlEyeType) – The battleEye filters to use.

  • pvp_types (set[PvpTypeFilter]) – The list of PvP types to filter the results for.

Return type:

str

Returns:

The URL to the Tibia.com highscores.

tibiapy.urls.get_kill_statistics_url(world)[source]

Get the Tibia.com URL of the kill statistics of a world.

Parameters:

world (str) – The game world of the desired kill statistics.

Returns:

The URL to the Tibia.com kill statistics for this world.

Return type:

str

tibiapy.urls.get_event_schedule_url(month=None, year=None)[source]

Get the URL to the Event Schedule or Event Calendar on Tibia.com.

Notes

If no parameters are passed, it will show the calendar for the current month and year.

Tibia.com limits the dates that the calendar displays, passing a month and year far from the current ones may result in the response being for the current month and year instead.

Parameters:
  • month (int, optional) – The desired month.

  • year (int, optional) – The desired year.

Returns:

The URL to the calendar with the given parameters.

Return type:

str

tibiapy.urls.get_houses_section_url(world, town, house_type, status=None, order=None)[source]

Get the URL to the house list on Tibia.com with the specified filters.

Parameters:
  • world (str) – The world to search in.

  • town (str) – The town to show results for.

  • house_type (HouseType) – The type of houses to show.

  • status (HouseStatus) – The status of the houses to show.

  • order (HouseOrder) – The sorting parameter to use for the results.

Returns:

The URL to the list matching the parameters.

Return type:

str

tibiapy.urls.get_auction_url(auction_id)[source]

Get the URL to the Tibia.com detail page of an auction with a given id.

Parameters:

auction_id (int) – The ID of the auction.

Returns:

The URL to the auction’s detail page.

Return type:

str

tibiapy.urls.get_bazaar_url(type, page=1, filters=None)[source]

Get the URL to the list of current auctions in Tibia.com.

Parameters:
  • type (BazaarType) – The type of bazaar to show.

  • page (int) – The page to show the URL for.

  • filters (AuctionFilters) – The filtering criteria to use.

Returns:

The URL to the current auctions section in Tibia.com

Return type:

str

tibiapy.urls.get_cm_post_archive_url(from_date, to_date, page=1)[source]

Get the URL to the CM Post Archive for the given date range.

Parameters:
  • from_date (date) – The start date to display.

  • to_date (date) – The end date to display.

  • page (int) – The desired page to display.

Returns:

The URL to the CM Post Archive

Return type:

str

Raises:
  • TypeError: – Either of the dates is not an instance of datetime.date

  • ValueError: – If start_date is more recent than end_date.

tibiapy.urls.get_leaderboards_url(world, rotation_id=None, page=1)[source]

Get the URL to the leaderboards of a world.

Parameters:
  • world (str) – The desired world.

  • rotation_id (int) – The ID of the desired rotation. If undefined, the current rotation is shown.

  • page (int) – The desired page. By default, the first page is returned.

Returns:

The URL to the leaderboard with the desired parameters.

Return type:

str

Raises:

ValueError – If the specified page is zer or less.

tibiapy.urls.get_creatures_section_url()[source]

Get the URL to the Tibia.com library section.

Returns:

The URL to the Tibia.com library section.

Return type:

str

tibiapy.urls.get_creature_url(identifier)[source]

Get the URL to the creature’s detail page on Tibia.com.

Parameters:

identifier (str) – The race’s internal name.

Returns:

The URL to the detail page.

Return type:

str

tibiapy.urls.get_boostable_bosses_url()[source]

Get the URL to the Tibia.com boostable bosses.

Returns:

The URL to the Tibia.com library section.

Return type:

str

tibiapy.urls.get_spells_section_url(vocation=None, group=None, spell_type=None, is_premium=None, sort=None)[source]

Get the URL to the spells section with the desired filtering parameters.

Parameters:
  • vocation (SpellVocationFilter, optional) – The vocation to filter in spells for.

  • group (SpellGroup, optional) – The spell’s primary cooldown group.

  • spell_type (SpellType, optional) – The type of spells to show.

  • is_premium (bool, optional) – The type of premium requirement to filter. None means any premium requirement.

  • sort (SpellSorting, optional) – The field to sort spells by.

Returns:

The URL to the spells section with the provided filtering parameters.

Return type:

str

tibiapy.urls.get_spell_url(identifier)[source]

Get the URL to a spell in the Tibia.com spells section.

Parameters:

identifier (str) – The identifier of the spell.

Returns:

The URL to the spell.

Return type:

str