API Reference

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

These objects are generally obtained from their respective from_content methods. It is possible to create and edit these objects as desired, but it may lead to unexpected behaviour if not done properly.

Client

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": {
         "format": "date-time",
         "title": "Timestamp",
         "type": "string"
      },
      "cached": {
         "title": "Cached",
         "type": "boolean"
      },
      "age": {
         "title": "Age",
         "type": "integer"
      },
      "fetchingTime": {
         "title": "Fetchingtime",
         "type": "number"
      },
      "parsingTime": {
         "title": "Parsingtime",
         "type": "number"
      },
      "data": {
         "title": "Data"
      }
   },
   "required": [
      "timestamp",
      "cached",
      "age",
      "fetchingTime",
      "parsingTime",
      "data"
   ]
}

Config:
  • populate_by_name: bool = True

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

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]
property seconds_left

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

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.

New 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.

New 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 – 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.

New in version 5.3.0.

Parameters:

test – 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.

New in version 5.3.0.

Parameters:

test – 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 – The beginning date to search dates in.

  • to_date – The end date to search dates in.

  • categories – The allowed categories to show. If left blank, all categories will be searched.

  • types – The allowed news types to show. if unused, all types will be searched.

  • test – 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 – The number of days to search, by default 30.

  • categories – The allowed categories to show. If left blank, all categories will be searched.

  • types – The allowed news types to show. if unused, all types will be searched.

  • test – 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 – The ID of the news entry.

  • test – 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.

New in version 3.0.0.

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

  • year – The year of the events to display.

  • test – 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.

New in version 4.0.0.

Parameters:

test – 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.

New in version 4.0.0.

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

  • test – 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.

New in version 4.0.0.

Parameters:

test – 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:
  • vocation – The vocation to filter in spells for.

  • group – The spell’s primary cooldown group.

  • spell_type – The type of spells to show.

  • is_premium – The type of premium requirement to filter. None means any premium requirement.

  • sort – The field to sort spells by.

  • test – Whether to request the test website instead.

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 – The spell’s identifier. This is usually the name of the spell in lowercase and with no spaces.

  • test – 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 – The name of the character.

  • test – 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 – 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 – 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 – The world to search the highscores in.

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

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

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

  • battleye_type – The type of BattlEye protection to display results from.

  • pvp_types – The list of PvP types to filter the results for.

  • test – 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.

New 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 – 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 – The name of the world.

  • test – 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 – The name of the world.

  • town – The name of the town.

  • house_type – The type of building. House by default.

  • status – The house status to filter results. By default, no filters will be applied.

  • order – The ordering to use for the results. By default, they are sorted by name.

  • test – 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 – The house’s internal id.

  • world – The name of the world to look for.

  • test – 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 – The name of the world.

  • test – 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 – The name of the guild. The case must match exactly.

  • test – 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.

New in version 3.0.0.

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

  • test – 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_forum_section(section_id, *, test=False)[source]

Fetch a forum’s section by its ID.

Parameters:
  • section_id – The ID of the section.

  • test – 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.

New in version 3.0.0.

Parameters:

test – 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.

New in version 3.0.0.

Parameters:

test – 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.

New in version 3.0.0.

Parameters:

test – 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.

New in version 3.0.0.

Parameters:

test – 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.

New in version 3.0.0.

Parameters:
  • board_id – The id of the board.

  • page – The page number to show.

  • age

    The maximum age in days of the threads to display.

    To show threads of all ages, use -1.

  • test – 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.

New in version 3.0.0.

Parameters:
  • thread_id – The id of the thread.

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

  • test – 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.

New in version 3.1.0.

Parameters:
  • post_id – The id of the post.

  • test – 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.

New in version 3.0.0.

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

  • test – 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.

New in version 3.0.0.

Parameters:
  • start_date – The start date to display.

  • end_date – The end date to display.

  • page – The desired page to display.

  • test – 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.

New in version 3.3.0.

Parameters:
  • page – The desired page to display.

  • filters – The filtering criteria to use.

  • test – 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.

New in version 3.3.0.

Parameters:
  • page – The page to display.

  • filters – The filtering criteria to use.

  • test – 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.

New in version 3.3.0.

Parameters:
  • auction_id – The ID of the auction.

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

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

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

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

  • skip_details

    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 – 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.

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.AuctionBattlEyeFilter(value)[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.

New in version 4.0.0.

GREEN = 1

Alias for initially protected worlds.

New in version 4.0.0.

class tibiapy.AuctionOrderBy(value)[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.AuctionOrderDirection(value)[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.AuctionSearchType(value)[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.AuctionSkillFilter(value)[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.AuctionStatus(value)[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.AuctionVocationFilter(value)[source]

The possible vocation filters for auctions.

NONE = 1
DRUID = 2
KNIGHT = 3
PALADIN = 4
SORCERER = 5
class tibiapy.AvailableForumSection(value)[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.BattlEyeType(value)[source]

The possible BattlEye statuses a world can have.

New 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.BazaarType(value)[source]

The possible bazaar types.

CURRENT = 'Current Auctions'
HISTORY = 'Auction History'
property subtopic
class tibiapy.BidType(value)[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.HighscoresBattlEyeType(value)[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.

New in version 4.0.0.

GREEN = 2

Alias for initially protected worlds.

New in version 4.0.0.

class tibiapy.HighscoresCategory(value)[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.HighscoresProfession(value)[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.HouseOrder(value)[source]

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

NAME = 'name'
SIZE = 'size'
RENT = 'rent'
BID = 'bid'
AUCTION_END = 'end'
class tibiapy.HouseStatus(value)[source]

Renting statuses of a house.

RENTED = 'rented'
AUCTIONED = 'auctioned'
class tibiapy.HouseType(value)[source]

The types of house available.

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

The plural for the house type.

Type:

str

class tibiapy.NewsCategory(value)[source]

The different news categories.

CIPSOFT = 'cipsoft'
COMMUNITY = 'community'
DEVELOPMENT = 'development'
SUPPORT = 'support'
TECHNICAL_ISSUES = 'technical'
property filter_name
property big_icon_url
property small_icon_url
class tibiapy.NewsType(value)[source]

The different types of new entries.

NEWS_TICKER = 'News Ticker'
FEATURED_ARTICLE = 'Featured Article'
NEWS = 'News'
property filter_name
property filter_value
class tibiapy.PvpType(value)[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.PvpTypeFilter(value)[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.Sex(value)[source]

Possible character sexes.

MALE = 'male'
FEMALE = 'female'
class tibiapy.SpellGroup(value)[source]

The possible cooldown groups.

Note that secondary groups are not enumerated.

ATTACK = 'Attack'
HEALING = 'Healing'
SUPPORT = 'Support'
class tibiapy.SpellSorting(value)[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.SpellType(value)[source]

The possible spell types.

INSTANT = 'Instant'
RUNE = 'Rune'
class tibiapy.SpellVocationFilter(value)[source]

The possible vocation types to filter out spells.

DRUID = 'Druid'
KNIGHT = 'Knight'
PALADIN = 'Paladin'
SORCERER = 'Sorcerer'
class tibiapy.ThreadStatus(value)[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.TransferType(value)[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.Vocation(value)[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
class tibiapy.WorldLocation(value)[source]

The possible physical locations for servers.

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

Characters

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

The entry points for this are:

Character

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": {
         "title": "Name",
         "type": "string"
      },
      "isTraded": {
         "title": "Istraded",
         "type": "boolean"
      },
      "deletionDate": {
         "anyOf": [
            {
               "format": "date-time",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Deletiondate"
      },
      "formerNames": {
         "items": {
            "type": "string"
         },
         "title": "Formernames",
         "type": "array"
      },
      "title": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Title"
      },
      "unlockedTitles": {
         "default": 0,
         "title": "Unlockedtitles",
         "type": "integer"
      },
      "sex": {
         "enum": [
            "male",
            "female"
         ],
         "title": "Sex",
         "type": "string"
      },
      "vocation": {
         "enum": [
            "None",
            "Druid",
            "Knight",
            "Paladin",
            "Sorcerer",
            "Elder Druid",
            "Elite Knight",
            "Royal Paladin",
            "Master Sorcerer"
         ],
         "title": "Vocation",
         "type": "string"
      },
      "level": {
         "default": 2,
         "title": "Level",
         "type": "integer"
      },
      "achievementPoints": {
         "title": "Achievementpoints",
         "type": "integer"
      },
      "world": {
         "title": "World",
         "type": "string"
      },
      "formerWorld": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Formerworld"
      },
      "residence": {
         "title": "Residence",
         "type": "string"
      },
      "marriedTo": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Marriedto"
      },
      "houses": {
         "items": {
            "$ref": "#/$defs/CharacterHouse"
         },
         "title": "Houses",
         "type": "array"
      },
      "guildMembership": {
         "anyOf": [
            {
               "$ref": "#/$defs/GuildMembership"
            },
            {
               "type": "null"
            }
         ],
         "default": null
      },
      "lastLogin": {
         "anyOf": [
            {
               "format": "date-time",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Lastlogin"
      },
      "position": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Position"
      },
      "comment": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Comment"
      },
      "isPremium": {
         "title": "Ispremium",
         "type": "boolean"
      },
      "accountBadges": {
         "items": {
            "$ref": "#/$defs/AccountBadge"
         },
         "title": "Accountbadges",
         "type": "array"
      },
      "achievements": {
         "items": {
            "$ref": "#/$defs/Achievement"
         },
         "title": "Achievements",
         "type": "array"
      },
      "deaths": {
         "items": {
            "$ref": "#/$defs/Death"
         },
         "title": "Deaths",
         "type": "array"
      },
      "deathsTruncated": {
         "title": "Deathstruncated",
         "type": "boolean"
      },
      "accountInformation": {
         "anyOf": [
            {
               "$ref": "#/$defs/AccountInformation"
            },
            {
               "type": "null"
            }
         ],
         "default": null
      },
      "otherCharacters": {
         "items": {
            "$ref": "#/$defs/OtherCharacter"
         },
         "title": "Othercharacters",
         "type": "array"
      }
   },
   "$defs": {
      "AccountBadge": {
         "description": "A displayed account badge in the character's information.",
         "properties": {
            "name": {
               "title": "Name",
               "type": "string"
            },
            "iconUrl": {
               "title": "Iconurl",
               "type": "string"
            },
            "description": {
               "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": {
               "format": "date-time",
               "title": "Created",
               "type": "string"
            },
            "position": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Position"
            },
            "loyaltyTitle": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Loyaltytitle"
            }
         },
         "required": [
            "created"
         ],
         "title": "AccountInformation",
         "type": "object"
      },
      "Achievement": {
         "description": "Represents an achievement listed on a character\u2019s page.",
         "properties": {
            "name": {
               "title": "Name",
               "type": "string"
            },
            "grade": {
               "title": "Grade",
               "type": "integer"
            },
            "isSecret": {
               "title": "Issecret",
               "type": "boolean"
            }
         },
         "required": [
            "name",
            "grade",
            "isSecret"
         ],
         "title": "Achievement",
         "type": "object"
      },
      "CharacterHouse": {
         "description": "A house owned by a character.",
         "properties": {
            "name": {
               "title": "Name",
               "type": "string"
            },
            "id": {
               "title": "Id",
               "type": "integer"
            },
            "world": {
               "title": "World",
               "type": "string"
            },
            "town": {
               "title": "Town",
               "type": "string"
            },
            "paidUntil": {
               "format": "date",
               "title": "Paiduntil",
               "type": "string"
            }
         },
         "required": [
            "name",
            "id",
            "world",
            "town",
            "paidUntil"
         ],
         "title": "CharacterHouse",
         "type": "object"
      },
      "Death": {
         "description": "A character's death.",
         "properties": {
            "level": {
               "title": "Level",
               "type": "integer"
            },
            "killers": {
               "items": {
                  "$ref": "#/$defs/DeathParticipant"
               },
               "title": "Killers",
               "type": "array"
            },
            "assists": {
               "items": {
                  "$ref": "#/$defs/DeathParticipant"
               },
               "title": "Assists",
               "type": "array"
            },
            "time": {
               "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": {
               "title": "Name",
               "type": "string"
            },
            "isPlayer": {
               "title": "Isplayer",
               "type": "boolean"
            },
            "summon": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Summon"
            },
            "isTraded": {
               "default": false,
               "title": "Istraded",
               "type": "boolean"
            }
         },
         "required": [
            "name",
            "isPlayer"
         ],
         "title": "DeathParticipant",
         "type": "object"
      },
      "GuildMembership": {
         "description": "The guild information of a character.",
         "properties": {
            "name": {
               "title": "Name",
               "type": "string"
            },
            "rank": {
               "title": "Rank",
               "type": "string"
            },
            "title": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "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": {
               "title": "Name",
               "type": "string"
            },
            "world": {
               "title": "World",
               "type": "string"
            },
            "isOnline": {
               "title": "Isonline",
               "type": "boolean"
            },
            "isDeleted": {
               "title": "Isdeleted",
               "type": "boolean"
            },
            "isTraded": {
               "title": "Istraded",
               "type": "boolean"
            },
            "isMain": {
               "title": "Ismain",
               "type": "boolean"
            },
            "position": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "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 0x7f9812b78670>

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.

Auxiliary Classes

AccountBadge

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": {
         "title": "Name",
         "type": "string"
      },
      "iconUrl": {
         "title": "Iconurl",
         "type": "string"
      },
      "description": {
         "title": "Description",
         "type": "string"
      }
   },
   "required": [
      "name",
      "iconUrl",
      "description"
   ]
}

Config:
  • populate_by_name: bool = True

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

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.

AccountInformation

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": {
         "format": "date-time",
         "title": "Created",
         "type": "string"
      },
      "position": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Position"
      },
      "loyaltyTitle": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Loyaltytitle"
      }
   },
   "required": [
      "created"
   ]
}

Config:
  • populate_by_name: bool = True

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

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.

Achievement

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\u2019s page.",
   "type": "object",
   "properties": {
      "name": {
         "title": "Name",
         "type": "string"
      },
      "grade": {
         "title": "Grade",
         "type": "integer"
      },
      "isSecret": {
         "title": "Issecret",
         "type": "boolean"
      }
   },
   "required": [
      "name",
      "grade",
      "isSecret"
   ]
}

Config:
  • populate_by_name: bool = True

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

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.

CharacterHouse

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": {
         "title": "Name",
         "type": "string"
      },
      "id": {
         "title": "Id",
         "type": "integer"
      },
      "world": {
         "title": "World",
         "type": "string"
      },
      "town": {
         "title": "Town",
         "type": "string"
      },
      "paidUntil": {
         "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 0x7f9812b78670>

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.

Death

pydantic model tibiapy.models.Death[source]

A character’s death.

Show JSON schema
{
   "title": "Death",
   "description": "A character's death.",
   "type": "object",
   "properties": {
      "level": {
         "title": "Level",
         "type": "integer"
      },
      "killers": {
         "items": {
            "$ref": "#/$defs/DeathParticipant"
         },
         "title": "Killers",
         "type": "array"
      },
      "assists": {
         "items": {
            "$ref": "#/$defs/DeathParticipant"
         },
         "title": "Assists",
         "type": "array"
      },
      "time": {
         "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": {
               "title": "Name",
               "type": "string"
            },
            "isPlayer": {
               "title": "Isplayer",
               "type": "boolean"
            },
            "summon": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Summon"
            },
            "isTraded": {
               "default": false,
               "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 0x7f9812b78670>

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.

GuildMembership

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": {
         "title": "Name",
         "type": "string"
      },
      "rank": {
         "title": "Rank",
         "type": "string"
      },
      "title": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Title"
      }
   },
   "required": [
      "name",
      "rank"
   ]
}

Config:
  • populate_by_name: bool = True

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

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.

New in version 3.0.0.

DeathParticipant

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": {
         "title": "Name",
         "type": "string"
      },
      "isPlayer": {
         "title": "Isplayer",
         "type": "boolean"
      },
      "summon": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Summon"
      },
      "isTraded": {
         "default": false,
         "title": "Istraded",
         "type": "boolean"
      }
   },
   "required": [
      "name",
      "isPlayer"
   ]
}

Config:
  • populate_by_name: bool = True

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

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.

OtherCharacter

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": {
         "title": "Name",
         "type": "string"
      },
      "world": {
         "title": "World",
         "type": "string"
      },
      "isOnline": {
         "title": "Isonline",
         "type": "boolean"
      },
      "isDeleted": {
         "title": "Isdeleted",
         "type": "boolean"
      },
      "isTraded": {
         "title": "Istraded",
         "type": "boolean"
      },
      "isMain": {
         "title": "Ismain",
         "type": "boolean"
      },
      "position": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Position"
      }
   },
   "required": [
      "name",
      "world",
      "isOnline",
      "isDeleted",
      "isTraded",
      "isMain"
   ]
}

Config:
  • populate_by_name: bool = True

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

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.

WorldOverview

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": {
         "title": "Recordcount",
         "type": "integer"
      },
      "recordDate": {
         "format": "date-time",
         "title": "Recorddate",
         "type": "string"
      },
      "worlds": {
         "default": [],
         "items": {
            "$ref": "#/$defs/WorldEntry"
         },
         "title": "Worlds",
         "type": "array"
      }
   },
   "$defs": {
      "WorldEntry": {
         "description": "Represents a game server listed in the World Overview section.",
         "properties": {
            "name": {
               "title": "Name",
               "type": "string"
            },
            "isOnline": {
               "title": "Isonline",
               "type": "boolean"
            },
            "onlineCount": {
               "title": "Onlinecount",
               "type": "integer"
            },
            "location": {
               "enum": [
                  "Europe",
                  "North America",
                  "South America"
               ],
               "title": "Location",
               "type": "string"
            },
            "pvpType": {
               "enum": [
                  "Open PvP",
                  "Optional PvP",
                  "Retro Open PvP",
                  "Retro Hardcore PvP",
                  "Hardcore PvP"
               ],
               "title": "Pvptype",
               "type": "string"
            },
            "transferType": {
               "enum": [
                  "regular",
                  "blocked",
                  "locked"
               ],
               "title": "Transfertype",
               "type": "string"
            },
            "isPremiumOnly": {
               "title": "Ispremiumonly",
               "type": "boolean"
            },
            "battleyeSince": {
               "anyOf": [
                  {
                     "format": "date",
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Battleyesince"
            },
            "battleyeType": {
               "enum": [
                  "UNPROTECTED",
                  "PROTECTED",
                  "INITIALLY_PROTECTED"
               ],
               "title": "Battleyetype",
               "type": "string"
            },
            "isExperimental": {
               "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 0x7f9812b78670>

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.

WorldEntry

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": {
         "title": "Name",
         "type": "string"
      },
      "isOnline": {
         "title": "Isonline",
         "type": "boolean"
      },
      "onlineCount": {
         "title": "Onlinecount",
         "type": "integer"
      },
      "location": {
         "enum": [
            "Europe",
            "North America",
            "South America"
         ],
         "title": "Location",
         "type": "string"
      },
      "pvpType": {
         "enum": [
            "Open PvP",
            "Optional PvP",
            "Retro Open PvP",
            "Retro Hardcore PvP",
            "Hardcore PvP"
         ],
         "title": "Pvptype",
         "type": "string"
      },
      "transferType": {
         "enum": [
            "regular",
            "blocked",
            "locked"
         ],
         "title": "Transfertype",
         "type": "string"
      },
      "isPremiumOnly": {
         "title": "Ispremiumonly",
         "type": "boolean"
      },
      "battleyeSince": {
         "anyOf": [
            {
               "format": "date",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Battleyesince"
      },
      "battleyeType": {
         "enum": [
            "UNPROTECTED",
            "PROTECTED",
            "INITIALLY_PROTECTED"
         ],
         "title": "Battleyetype",
         "type": "string"
      },
      "isExperimental": {
         "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 0x7f9812b78670>

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.

World

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": {
         "title": "Name",
         "type": "string"
      },
      "isOnline": {
         "title": "Isonline",
         "type": "boolean"
      },
      "onlineCount": {
         "title": "Onlinecount",
         "type": "integer"
      },
      "location": {
         "enum": [
            "Europe",
            "North America",
            "South America"
         ],
         "title": "Location",
         "type": "string"
      },
      "pvpType": {
         "enum": [
            "Open PvP",
            "Optional PvP",
            "Retro Open PvP",
            "Retro Hardcore PvP",
            "Hardcore PvP"
         ],
         "title": "Pvptype",
         "type": "string"
      },
      "transferType": {
         "enum": [
            "regular",
            "blocked",
            "locked"
         ],
         "title": "Transfertype",
         "type": "string"
      },
      "isPremiumOnly": {
         "title": "Ispremiumonly",
         "type": "boolean"
      },
      "battleyeSince": {
         "anyOf": [
            {
               "format": "date",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Battleyesince"
      },
      "battleyeType": {
         "enum": [
            "UNPROTECTED",
            "PROTECTED",
            "INITIALLY_PROTECTED"
         ],
         "title": "Battleyetype",
         "type": "string"
      },
      "isExperimental": {
         "title": "Isexperimental",
         "type": "boolean"
      },
      "recordCount": {
         "title": "Recordcount",
         "type": "integer"
      },
      "recordDate": {
         "format": "date-time",
         "title": "Recorddate",
         "type": "string"
      },
      "creationDate": {
         "title": "Creationdate",
         "type": "string"
      },
      "worldQuestTitles": {
         "items": {
            "type": "string"
         },
         "title": "Worldquesttitles",
         "type": "array"
      },
      "onlinePlayers": {
         "items": {
            "$ref": "#/$defs/OnlineCharacter"
         },
         "title": "Onlineplayers",
         "type": "array"
      }
   },
   "$defs": {
      "OnlineCharacter": {
         "description": "An online character in the world's page.",
         "properties": {
            "name": {
               "title": "Name",
               "type": "string"
            },
            "vocation": {
               "enum": [
                  "None",
                  "Druid",
                  "Knight",
                  "Paladin",
                  "Sorcerer",
                  "Elder Druid",
                  "Elite Knight",
                  "Royal Paladin",
                  "Master Sorcerer"
               ],
               "title": "Vocation",
               "type": "string"
            },
            "level": {
               "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 0x7f9812b78670>

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)

  • 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.

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

The date when the online record was achieved.

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.

OnlineCharacter

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": {
         "title": "Name",
         "type": "string"
      },
      "vocation": {
         "enum": [
            "None",
            "Druid",
            "Knight",
            "Paladin",
            "Sorcerer",
            "Elder Druid",
            "Elite Knight",
            "Royal Paladin",
            "Master Sorcerer"
         ],
         "title": "Vocation",
         "type": "string"
      },
      "level": {
         "title": "Level",
         "type": "integer"
      }
   },
   "required": [
      "name",
      "vocation",
      "level"
   ]
}

Config:
  • populate_by_name: bool = True

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

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.

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,
         "title": "World"
      },
      "entries": {
         "default": [],
         "items": {
            "$ref": "#/$defs/GuildEntry"
         },
         "title": "Entries",
         "type": "array"
      },
      "availableWorlds": {
         "items": {
            "type": "string"
         },
         "title": "Availableworlds",
         "type": "array"
      }
   },
   "$defs": {
      "GuildEntry": {
         "description": "Represents a Tibia guild in the guild list of a world.",
         "properties": {
            "name": {
               "title": "Name",
               "type": "string"
            },
            "logoUrl": {
               "title": "Logourl",
               "type": "string"
            },
            "description": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Description"
            },
            "world": {
               "title": "World",
               "type": "string"
            },
            "active": {
               "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 0x7f9812b78670>

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.

Guild

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": {
         "title": "Name",
         "type": "string"
      },
      "logoUrl": {
         "title": "Logourl",
         "type": "string"
      },
      "description": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Description"
      },
      "world": {
         "title": "World",
         "type": "string"
      },
      "founded": {
         "format": "date",
         "title": "Founded",
         "type": "string"
      },
      "active": {
         "title": "Active",
         "type": "boolean"
      },
      "guildhall": {
         "anyOf": [
            {
               "$ref": "#/$defs/GuildHouse"
            },
            {
               "type": "null"
            }
         ],
         "default": null
      },
      "openApplications": {
         "default": false,
         "title": "Openapplications",
         "type": "boolean"
      },
      "activeWar": {
         "title": "Activewar",
         "type": "boolean"
      },
      "disbandDate": {
         "anyOf": [
            {
               "format": "date",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Disbanddate"
      },
      "disbandCondition": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Disbandcondition"
      },
      "homepage": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Homepage"
      },
      "members": {
         "items": {
            "$ref": "#/$defs/GuildMember"
         },
         "title": "Members",
         "type": "array"
      },
      "invites": {
         "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": {
               "title": "Name",
               "type": "string"
            },
            "paidUntil": {
               "format": "date",
               "title": "Paiduntil",
               "type": "string"
            }
         },
         "required": [
            "name",
            "paidUntil"
         ],
         "title": "GuildHouse",
         "type": "object"
      },
      "GuildInvite": {
         "description": "Represents an invited character.",
         "properties": {
            "name": {
               "title": "Name",
               "type": "string"
            },
            "invitedOn": {
               "format": "date",
               "title": "Invitedon",
               "type": "string"
            }
         },
         "required": [
            "name",
            "invitedOn"
         ],
         "title": "GuildInvite",
         "type": "object"
      },
      "GuildMember": {
         "description": "Represents a guild member.",
         "properties": {
            "name": {
               "title": "Name",
               "type": "string"
            },
            "rank": {
               "title": "Rank",
               "type": "string"
            },
            "title": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Title"
            },
            "level": {
               "title": "Level",
               "type": "integer"
            },
            "vocation": {
               "enum": [
                  "None",
                  "Druid",
                  "Knight",
                  "Paladin",
                  "Sorcerer",
                  "Elder Druid",
                  "Elite Knight",
                  "Royal Paladin",
                  "Master Sorcerer"
               ],
               "title": "Vocation",
               "type": "string"
            },
            "joinedOn": {
               "format": "date",
               "title": "Joinedon",
               "type": "string"
            },
            "isOnline": {
               "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 0x7f9812b78670>

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.

New in version 3.0.0.

property vice_leaders: List[GuildMember]

The vice leader of the guilds.

GuildEntry

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": {
         "title": "Name",
         "type": "string"
      },
      "logoUrl": {
         "title": "Logourl",
         "type": "string"
      },
      "description": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Description"
      },
      "world": {
         "title": "World",
         "type": "string"
      },
      "active": {
         "title": "Active",
         "type": "boolean"
      }
   },
   "required": [
      "name",
      "logoUrl",
      "world",
      "active"
   ]
}

Config:
  • populate_by_name: bool = True

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

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.

New in version 3.0.0.

Auxiliary Classes

GuildInvite

pydantic model tibiapy.models.GuildInvite[source]

Represents an invited character.

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

Config:
  • populate_by_name: bool = True

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

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.

GuildHouse

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": {
         "title": "Name",
         "type": "string"
      },
      "paidUntil": {
         "format": "date",
         "title": "Paiduntil",
         "type": "string"
      }
   },
   "required": [
      "name",
      "paidUntil"
   ]
}

Config:
  • populate_by_name: bool = True

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

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.

GuildMember

pydantic model tibiapy.models.GuildMember[source]

Represents a guild member.

Show JSON schema
{
   "title": "GuildMember",
   "description": "Represents a guild member.",
   "type": "object",
   "properties": {
      "name": {
         "title": "Name",
         "type": "string"
      },
      "rank": {
         "title": "Rank",
         "type": "string"
      },
      "title": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Title"
      },
      "level": {
         "title": "Level",
         "type": "integer"
      },
      "vocation": {
         "enum": [
            "None",
            "Druid",
            "Knight",
            "Paladin",
            "Sorcerer",
            "Elder Druid",
            "Elite Knight",
            "Royal Paladin",
            "Master Sorcerer"
         ],
         "title": "Vocation",
         "type": "string"
      },
      "joinedOn": {
         "format": "date",
         "title": "Joinedon",
         "type": "string"
      },
      "isOnline": {
         "title": "Isonline",
         "type": "boolean"
      }
   },
   "required": [
      "name",
      "rank",
      "level",
      "vocation",
      "joinedOn",
      "isOnline"
   ]
}

Config:
  • populate_by_name: bool = True

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

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.

GuildWars

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,
         "title": "Name"
      },
      "isCurrent": {
         "anyOf": [
            {
               "$ref": "#/$defs/GuildWarEntry"
            },
            {
               "type": "null"
            }
         ],
         "default": null
      },
      "history": {
         "items": {
            "$ref": "#/$defs/GuildWarEntry"
         },
         "title": "History",
         "type": "array"
      }
   },
   "$defs": {
      "GuildWarEntry": {
         "description": "Represents a guild war entry.",
         "properties": {
            "guildName": {
               "title": "Guildname",
               "type": "string"
            },
            "guildScore": {
               "title": "Guildscore",
               "type": "integer"
            },
            "guildFee": {
               "title": "Guildfee",
               "type": "integer"
            },
            "opponentName": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Opponentname"
            },
            "opponentScore": {
               "title": "Opponentscore",
               "type": "integer"
            },
            "opponentFee": {
               "title": "Opponentfee",
               "type": "integer"
            },
            "startDate": {
               "anyOf": [
                  {
                     "format": "date",
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Startdate"
            },
            "scoreLimit": {
               "title": "Scorelimit",
               "type": "integer"
            },
            "duration": {
               "anyOf": [
                  {
                     "format": "duration",
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Duration"
            },
            "endDate": {
               "anyOf": [
                  {
                     "format": "date",
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Enddate"
            },
            "winner": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Winner"
            },
            "surrender": {
               "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 0x7f9812b78670>

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.

GuildWarEntry

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": {
         "title": "Guildname",
         "type": "string"
      },
      "guildScore": {
         "title": "Guildscore",
         "type": "integer"
      },
      "guildFee": {
         "title": "Guildfee",
         "type": "integer"
      },
      "opponentName": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Opponentname"
      },
      "opponentScore": {
         "title": "Opponentscore",
         "type": "integer"
      },
      "opponentFee": {
         "title": "Opponentfee",
         "type": "integer"
      },
      "startDate": {
         "anyOf": [
            {
               "format": "date",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Startdate"
      },
      "scoreLimit": {
         "title": "Scorelimit",
         "type": "integer"
      },
      "duration": {
         "anyOf": [
            {
               "format": "duration",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Duration"
      },
      "endDate": {
         "anyOf": [
            {
               "format": "date",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Enddate"
      },
      "winner": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Winner"
      },
      "surrender": {
         "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 0x7f9812b78670>

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.

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.

Highscores

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,
         "title": "Currentpage",
         "type": "integer"
      },
      "totalPages": {
         "default": 1,
         "title": "Totalpages",
         "type": "integer"
      },
      "resultsCount": {
         "default": 0,
         "title": "Resultscount",
         "type": "integer"
      },
      "entries": {
         "default": [],
         "items": {
            "$ref": "#/$defs/HighscoresEntry"
         },
         "title": "Entries",
         "type": "array"
      },
      "world": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "World"
      },
      "category": {
         "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": {
         "enum": [
            "ALL",
            "NONE",
            "KNIGHTS",
            "PALADINS",
            "SORCERERS",
            "DRUIDS"
         ],
         "title": "Vocation",
         "type": "string"
      },
      "battleyeFilter": {
         "anyOf": [
            {
               "enum": [
                  "ANY_WORLD",
                  "INITIALLY_PROTECTED",
                  "PROTECTED",
                  "UNPROTECTED"
               ],
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "title": "Battleyefilter"
      },
      "pvpTypesFilter": {
         "items": {
            "enum": [
               "OPEN_PVP",
               "OPTIONAL_PVP",
               "HARDCORE_PVP",
               "RETRO_OPEN_PVP",
               "RETRO_HARDCORE_PVP"
            ],
            "type": "string"
         },
         "title": "Pvptypesfilter",
         "type": "array",
         "uniqueItems": true
      },
      "lastUpdated": {
         "format": "date-time",
         "title": "Lastupdated",
         "type": "string"
      },
      "availableWorlds": {
         "items": {
            "type": "string"
         },
         "title": "Availableworlds",
         "type": "array"
      }
   },
   "$defs": {
      "HighscoresEntry": {
         "description": "Represents an entry for the highscores.",
         "properties": {
            "name": {
               "title": "Name",
               "type": "string"
            },
            "rank": {
               "title": "Rank",
               "type": "integer"
            },
            "vocation": {
               "enum": [
                  "None",
                  "Druid",
                  "Knight",
                  "Paladin",
                  "Sorcerer",
                  "Elder Druid",
                  "Elite Knight",
                  "Royal Paladin",
                  "Master Sorcerer"
               ],
               "title": "Vocation",
               "type": "string"
            },
            "world": {
               "title": "World",
               "type": "string"
            },
            "level": {
               "title": "Level",
               "type": "integer"
            },
            "value": {
               "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 0x7f9812b78670>

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.

HighscoresEntry

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": {
         "title": "Name",
         "type": "string"
      },
      "rank": {
         "title": "Rank",
         "type": "integer"
      },
      "vocation": {
         "enum": [
            "None",
            "Druid",
            "Knight",
            "Paladin",
            "Sorcerer",
            "Elder Druid",
            "Elite Knight",
            "Royal Paladin",
            "Master Sorcerer"
         ],
         "title": "Vocation",
         "type": "string"
      },
      "world": {
         "title": "World",
         "type": "string"
      },
      "level": {
         "title": "Level",
         "type": "integer"
      },
      "value": {
         "title": "Value",
         "type": "integer"
      }
   },
   "required": [
      "name",
      "rank",
      "vocation",
      "world",
      "level",
      "value"
   ]
}

Config:
  • populate_by_name: bool = True

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

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.

LoyaltyHighscoresEntry

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": {
         "title": "Name",
         "type": "string"
      },
      "rank": {
         "title": "Rank",
         "type": "integer"
      },
      "vocation": {
         "enum": [
            "None",
            "Druid",
            "Knight",
            "Paladin",
            "Sorcerer",
            "Elder Druid",
            "Elite Knight",
            "Royal Paladin",
            "Master Sorcerer"
         ],
         "title": "Vocation",
         "type": "string"
      },
      "world": {
         "title": "World",
         "type": "string"
      },
      "level": {
         "title": "Level",
         "type": "integer"
      },
      "value": {
         "title": "Value",
         "type": "integer"
      },
      "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 0x7f9812b78670>

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.

HousesSection

pydantic model tibiapy.models.HousesSection[source]

Represents the house section.

Show JSON schema
{
   "title": "HousesSection",
   "description": "Represents the house section.",
   "type": "object",
   "properties": {
      "world": {
         "title": "World",
         "type": "string"
      },
      "town": {
         "title": "Town",
         "type": "string"
      },
      "status": {
         "anyOf": [
            {
               "enum": [
                  "rented",
                  "auctioned"
               ],
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Status"
      },
      "houseType": {
         "enum": [
            "house",
            "guildhall"
         ],
         "title": "Housetype",
         "type": "string"
      },
      "order": {
         "enum": [
            "name",
            "size",
            "rent",
            "bid",
            "end"
         ],
         "title": "Order",
         "type": "string"
      },
      "entries": {
         "items": {
            "$ref": "#/$defs/HouseEntry"
         },
         "title": "Entries",
         "type": "array"
      },
      "availableWorlds": {
         "items": {
            "type": "string"
         },
         "title": "Availableworlds",
         "type": "array"
      },
      "availableTowns": {
         "items": {
            "type": "string"
         },
         "title": "Availabletowns",
         "type": "array"
      }
   },
   "$defs": {
      "HouseEntry": {
         "description": "Represents a house from the house list in Tibia.com.",
         "properties": {
            "name": {
               "title": "Name",
               "type": "string"
            },
            "id": {
               "title": "Id",
               "type": "integer"
            },
            "world": {
               "title": "World",
               "type": "string"
            },
            "status": {
               "enum": [
                  "rented",
                  "auctioned"
               ],
               "title": "Status",
               "type": "string"
            },
            "type": {
               "enum": [
                  "house",
                  "guildhall"
               ],
               "title": "Type",
               "type": "string"
            },
            "town": {
               "title": "Town",
               "type": "string"
            },
            "size": {
               "title": "Size",
               "type": "integer"
            },
            "rent": {
               "title": "Rent",
               "type": "integer"
            },
            "timeLeft": {
               "anyOf": [
                  {
                     "format": "duration",
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Timeleft"
            },
            "highestBid": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "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 0x7f9812b78670>

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.

House

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": {
         "title": "Name",
         "type": "string"
      },
      "id": {
         "title": "Id",
         "type": "integer"
      },
      "world": {
         "title": "World",
         "type": "string"
      },
      "status": {
         "enum": [
            "rented",
            "auctioned"
         ],
         "title": "Status",
         "type": "string"
      },
      "type": {
         "enum": [
            "house",
            "guildhall"
         ],
         "title": "Type",
         "type": "string"
      },
      "imageUrl": {
         "title": "Imageurl",
         "type": "string"
      },
      "beds": {
         "title": "Beds",
         "type": "integer"
      },
      "size": {
         "title": "Size",
         "type": "integer"
      },
      "rent": {
         "title": "Rent",
         "type": "integer"
      },
      "owner": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Owner"
      },
      "ownerSex": {
         "anyOf": [
            {
               "enum": [
                  "male",
                  "female"
               ],
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Ownersex"
      },
      "paidUntil": {
         "anyOf": [
            {
               "format": "date-time",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Paiduntil"
      },
      "transferDate": {
         "anyOf": [
            {
               "format": "date-time",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Transferdate"
      },
      "transferRecipient": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Transferrecipient"
      },
      "transferPrice": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Transferprice"
      },
      "transferAccepted": {
         "anyOf": [
            {
               "type": "boolean"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Transferaccepted"
      },
      "highestBid": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Highestbid"
      },
      "highestBidder": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Highestbidder"
      },
      "auctionEnd": {
         "anyOf": [
            {
               "format": "date-time",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "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 0x7f9812b78670>

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.

HouseEntry

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": {
         "title": "Name",
         "type": "string"
      },
      "id": {
         "title": "Id",
         "type": "integer"
      },
      "world": {
         "title": "World",
         "type": "string"
      },
      "status": {
         "enum": [
            "rented",
            "auctioned"
         ],
         "title": "Status",
         "type": "string"
      },
      "type": {
         "enum": [
            "house",
            "guildhall"
         ],
         "title": "Type",
         "type": "string"
      },
      "town": {
         "title": "Town",
         "type": "string"
      },
      "size": {
         "title": "Size",
         "type": "integer"
      },
      "rent": {
         "title": "Rent",
         "type": "integer"
      },
      "timeLeft": {
         "anyOf": [
            {
               "format": "duration",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Timeleft"
      },
      "highestBid": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Highestbid"
      }
   },
   "required": [
      "name",
      "id",
      "world",
      "status",
      "type",
      "town",
      "size",
      "rent"
   ]
}

Config:
  • populate_by_name: bool = True

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

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.

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.

Leaderboard

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,
         "title": "Currentpage",
         "type": "integer"
      },
      "totalPages": {
         "default": 1,
         "title": "Totalpages",
         "type": "integer"
      },
      "resultsCount": {
         "default": 0,
         "title": "Resultscount",
         "type": "integer"
      },
      "entries": {
         "default": [],
         "items": {
            "$ref": "#/$defs/LeaderboardEntry"
         },
         "title": "Entries",
         "type": "array"
      },
      "world": {
         "title": "World",
         "type": "string"
      },
      "availableWorlds": {
         "items": {
            "type": "string"
         },
         "title": "Availableworlds",
         "type": "array"
      },
      "rotation": {
         "$ref": "#/$defs/LeaderboardRotation"
      },
      "availableRotations": {
         "items": {
            "$ref": "#/$defs/LeaderboardRotation"
         },
         "title": "Availablerotations",
         "type": "array"
      },
      "lastUpdated": {
         "anyOf": [
            {
               "format": "date-time",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Lastupdated"
      }
   },
   "$defs": {
      "LeaderboardEntry": {
         "description": "Represents a character in the Tibiadrome leaderboards.",
         "properties": {
            "name": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Name"
            },
            "rank": {
               "title": "Rank",
               "type": "integer"
            },
            "dromeLevel": {
               "title": "Dromelevel",
               "type": "integer"
            }
         },
         "required": [
            "rank",
            "dromeLevel"
         ],
         "title": "LeaderboardEntry",
         "type": "object"
      },
      "LeaderboardRotation": {
         "description": "A Tibiadrome leaderboards rotation.",
         "properties": {
            "rotationId": {
               "title": "Rotationid",
               "type": "integer"
            },
            "isCurrent": {
               "title": "Iscurrent",
               "type": "boolean"
            },
            "endDate": {
               "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 0x7f9812b78670>

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.

Auxiliary Classes

LeaderboardRotation

pydantic model tibiapy.models.LeaderboardRotation[source]

A Tibiadrome leaderboards rotation.

Show JSON schema
{
   "title": "LeaderboardRotation",
   "description": "A Tibiadrome leaderboards rotation.",
   "type": "object",
   "properties": {
      "rotationId": {
         "title": "Rotationid",
         "type": "integer"
      },
      "isCurrent": {
         "title": "Iscurrent",
         "type": "boolean"
      },
      "endDate": {
         "format": "date-time",
         "title": "Enddate",
         "type": "string"
      }
   },
   "required": [
      "rotationId",
      "isCurrent",
      "endDate"
   ]
}

Config:
  • populate_by_name: bool = True

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

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.

LeaderboardEntry

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,
         "title": "Name"
      },
      "rank": {
         "title": "Rank",
         "type": "integer"
      },
      "dromeLevel": {
         "title": "Dromelevel",
         "type": "integer"
      }
   },
   "required": [
      "rank",
      "dromeLevel"
   ]
}

Config:
  • populate_by_name: bool = True

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

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

Forums

Models related to Tibia.com’s Forum section.

CMPostArchive

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,
         "title": "Currentpage",
         "type": "integer"
      },
      "totalPages": {
         "default": 1,
         "title": "Totalpages",
         "type": "integer"
      },
      "resultsCount": {
         "default": 0,
         "title": "Resultscount",
         "type": "integer"
      },
      "entries": {
         "default": [],
         "items": {
            "$ref": "#/$defs/CMPost"
         },
         "title": "Entries",
         "type": "array"
      },
      "fromDate": {
         "format": "date",
         "title": "Fromdate",
         "type": "string"
      },
      "toDate": {
         "format": "date",
         "title": "Todate",
         "type": "string"
      }
   },
   "$defs": {
      "CMPost": {
         "description": "Represents a CM Post entry.",
         "properties": {
            "postId": {
               "title": "Postid",
               "type": "integer"
            },
            "postedOn": {
               "format": "date-time",
               "title": "Postedon",
               "type": "string"
            },
            "board": {
               "title": "Board",
               "type": "string"
            },
            "threadTitle": {
               "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 0x7f9812b78670>

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.

ForumSection

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": {
         "title": "Sectionid",
         "type": "integer"
      },
      "entries": {
         "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": {
               "title": "Boardid",
               "type": "integer"
            },
            "name": {
               "title": "Name",
               "type": "string"
            },
            "description": {
               "title": "Description",
               "type": "string"
            },
            "posts": {
               "title": "Posts",
               "type": "integer"
            },
            "threads": {
               "title": "Threads",
               "type": "integer"
            },
            "lastPost": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/LastPost"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null
            }
         },
         "required": [
            "boardId",
            "name",
            "description",
            "posts",
            "threads"
         ],
         "title": "BoardEntry",
         "type": "object"
      },
      "LastPost": {
         "description": "Represents a forum thread.",
         "properties": {
            "postId": {
               "title": "Postid",
               "type": "integer"
            },
            "author": {
               "title": "Author",
               "type": "string"
            },
            "postedOn": {
               "format": "date-time",
               "title": "Postedon",
               "type": "string"
            },
            "isAuthorDeleted": {
               "title": "Isauthordeleted",
               "type": "boolean"
            },
            "isAuthorTraded": {
               "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 0x7f9812b78670>

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

ForumAnnouncement

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": {
         "title": "Announcementid",
         "type": "integer"
      },
      "board": {
         "title": "Board",
         "type": "string"
      },
      "section": {
         "title": "Section",
         "type": "string"
      },
      "boardId": {
         "title": "Boardid",
         "type": "integer"
      },
      "sectionId": {
         "title": "Sectionid",
         "type": "integer"
      },
      "author": {
         "$ref": "#/$defs/ForumAuthor"
      },
      "title": {
         "title": "Title",
         "type": "string"
      },
      "content": {
         "title": "Content",
         "type": "string"
      },
      "startDate": {
         "format": "date-time",
         "title": "Startdate",
         "type": "string"
      },
      "endDate": {
         "format": "date-time",
         "title": "Enddate",
         "type": "string"
      }
   },
   "$defs": {
      "ForumAuthor": {
         "description": "Represents a post's author.",
         "properties": {
            "name": {
               "title": "Name",
               "type": "string"
            },
            "level": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Level"
            },
            "world": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "World"
            },
            "position": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Position"
            },
            "title": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Title"
            },
            "vocation": {
               "anyOf": [
                  {
                     "enum": [
                        "None",
                        "Druid",
                        "Knight",
                        "Paladin",
                        "Sorcerer",
                        "Elder Druid",
                        "Elite Knight",
                        "Royal Paladin",
                        "Master Sorcerer"
                     ],
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Vocation"
            },
            "guild": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/GuildMembership"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null
            },
            "posts": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Posts"
            },
            "isAuthorDeleted": {
               "default": false,
               "title": "Isauthordeleted",
               "type": "boolean"
            },
            "isAuthorTraded": {
               "default": false,
               "title": "Isauthortraded",
               "type": "boolean"
            }
         },
         "required": [
            "name"
         ],
         "title": "ForumAuthor",
         "type": "object"
      },
      "GuildMembership": {
         "description": "The guild information of a character.",
         "properties": {
            "name": {
               "title": "Name",
               "type": "string"
            },
            "rank": {
               "title": "Rank",
               "type": "string"
            },
            "title": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "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 0x7f9812b78670>

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.

ForumBoard

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": {
         "title": "Boardid",
         "type": "integer"
      },
      "currentPage": {
         "default": 1,
         "title": "Currentpage",
         "type": "integer"
      },
      "totalPages": {
         "default": 1,
         "title": "Totalpages",
         "type": "integer"
      },
      "resultsCount": {
         "default": 0,
         "title": "Resultscount",
         "type": "integer"
      },
      "entries": {
         "items": {
            "$ref": "#/$defs/ThreadEntry"
         },
         "title": "Entries",
         "type": "array"
      },
      "name": {
         "title": "Name",
         "type": "string"
      },
      "section": {
         "title": "Section",
         "type": "string"
      },
      "sectionId": {
         "title": "Sectionid",
         "type": "integer"
      },
      "age": {
         "title": "Age",
         "type": "integer"
      },
      "announcements": {
         "items": {
            "$ref": "#/$defs/AnnouncementEntry"
         },
         "title": "Announcements",
         "type": "array"
      }
   },
   "$defs": {
      "AnnouncementEntry": {
         "description": "Represents an announcement in the forum boards.",
         "properties": {
            "announcementId": {
               "title": "Announcementid",
               "type": "integer"
            },
            "title": {
               "title": "Title",
               "type": "string"
            },
            "announcementAuthor": {
               "title": "Announcementauthor",
               "type": "string"
            }
         },
         "required": [
            "announcementId",
            "title",
            "announcementAuthor"
         ],
         "title": "AnnouncementEntry",
         "type": "object"
      },
      "ForumEmoticon": {
         "description": "Represents a forum's emoticon.",
         "properties": {
            "name": {
               "title": "Name",
               "type": "string"
            },
            "url": {
               "title": "Url",
               "type": "string"
            }
         },
         "required": [
            "name",
            "url"
         ],
         "title": "ForumEmoticon",
         "type": "object"
      },
      "LastPost": {
         "description": "Represents a forum thread.",
         "properties": {
            "postId": {
               "title": "Postid",
               "type": "integer"
            },
            "author": {
               "title": "Author",
               "type": "string"
            },
            "postedOn": {
               "format": "date-time",
               "title": "Postedon",
               "type": "string"
            },
            "isAuthorDeleted": {
               "title": "Isauthordeleted",
               "type": "boolean"
            },
            "isAuthorTraded": {
               "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": {
               "title": "Threadid",
               "type": "integer"
            },
            "title": {
               "title": "Title",
               "type": "string"
            },
            "threadStarter": {
               "title": "Threadstarter",
               "type": "string"
            },
            "threadStarterTraded": {
               "title": "Threadstartertraded",
               "type": "boolean"
            },
            "threadStarterDeleted": {
               "title": "Threadstarterdeleted",
               "type": "boolean"
            },
            "replies": {
               "title": "Replies",
               "type": "integer"
            },
            "views": {
               "title": "Views",
               "type": "integer"
            },
            "lastPost": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/LastPost"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null
            },
            "status": {
               "$ref": "#/$defs/ThreadStatus"
            },
            "statusIcon": {
               "title": "Statusicon",
               "type": "string"
            },
            "emoticon": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/ForumEmoticon"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null
            },
            "totalPages": {
               "title": "Totalpages",
               "type": "integer"
            },
            "goldenFrame": {
               "default": false,
               "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 0x7f9812b78670>

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.

ForumPost

pydantic model tibiapy.models.ForumPost[source]

Represents a forum post.

Show JSON schema
{
   "title": "ForumPost",
   "description": "Represents a forum post.",
   "type": "object",
   "properties": {
      "postId": {
         "title": "Postid",
         "type": "integer"
      },
      "author": {
         "$ref": "#/$defs/ForumAuthor"
      },
      "emoticon": {
         "anyOf": [
            {
               "$ref": "#/$defs/ForumEmoticon"
            },
            {
               "type": "null"
            }
         ],
         "default": null
      },
      "title": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Title"
      },
      "content": {
         "title": "Content",
         "type": "string"
      },
      "signature": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Signature"
      },
      "postedDate": {
         "format": "date-time",
         "title": "Posteddate",
         "type": "string"
      },
      "editedDate": {
         "anyOf": [
            {
               "format": "date-time",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Editeddate"
      },
      "editedBy": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Editedby"
      },
      "goldenFrame": {
         "default": false,
         "title": "Goldenframe",
         "type": "boolean"
      }
   },
   "$defs": {
      "ForumAuthor": {
         "description": "Represents a post's author.",
         "properties": {
            "name": {
               "title": "Name",
               "type": "string"
            },
            "level": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Level"
            },
            "world": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "World"
            },
            "position": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Position"
            },
            "title": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Title"
            },
            "vocation": {
               "anyOf": [
                  {
                     "enum": [
                        "None",
                        "Druid",
                        "Knight",
                        "Paladin",
                        "Sorcerer",
                        "Elder Druid",
                        "Elite Knight",
                        "Royal Paladin",
                        "Master Sorcerer"
                     ],
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Vocation"
            },
            "guild": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/GuildMembership"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null
            },
            "posts": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Posts"
            },
            "isAuthorDeleted": {
               "default": false,
               "title": "Isauthordeleted",
               "type": "boolean"
            },
            "isAuthorTraded": {
               "default": false,
               "title": "Isauthortraded",
               "type": "boolean"
            }
         },
         "required": [
            "name"
         ],
         "title": "ForumAuthor",
         "type": "object"
      },
      "ForumEmoticon": {
         "description": "Represents a forum's emoticon.",
         "properties": {
            "name": {
               "title": "Name",
               "type": "string"
            },
            "url": {
               "title": "Url",
               "type": "string"
            }
         },
         "required": [
            "name",
            "url"
         ],
         "title": "ForumEmoticon",
         "type": "object"
      },
      "GuildMembership": {
         "description": "The guild information of a character.",
         "properties": {
            "name": {
               "title": "Name",
               "type": "string"
            },
            "rank": {
               "title": "Rank",
               "type": "string"
            },
            "title": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "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 0x7f9812b78670>

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.

ForumThread

pydantic model tibiapy.models.ForumThread[source]

Represents a forum thread.

Show JSON schema
{
   "title": "ForumThread",
   "description": "Represents a forum thread.",
   "type": "object",
   "properties": {
      "threadId": {
         "title": "Threadid",
         "type": "integer"
      },
      "currentPage": {
         "default": 1,
         "title": "Currentpage",
         "type": "integer"
      },
      "totalPages": {
         "default": 1,
         "title": "Totalpages",
         "type": "integer"
      },
      "resultsCount": {
         "default": 0,
         "title": "Resultscount",
         "type": "integer"
      },
      "entries": {
         "default": [],
         "items": {
            "$ref": "#/$defs/ForumPost"
         },
         "title": "Entries",
         "type": "array"
      },
      "title": {
         "title": "Title",
         "type": "string"
      },
      "board": {
         "title": "Board",
         "type": "string"
      },
      "boardId": {
         "title": "Boardid",
         "type": "integer"
      },
      "section": {
         "title": "Section",
         "type": "string"
      },
      "sectionId": {
         "title": "Sectionid",
         "type": "integer"
      },
      "previousTopicNumber": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Previoustopicnumber"
      },
      "nextTopicNumber": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Nexttopicnumber"
      },
      "goldenFrame": {
         "default": false,
         "title": "Goldenframe",
         "type": "boolean"
      },
      "anchoredPost": {
         "anyOf": [
            {
               "$ref": "#/$defs/ForumPost"
            },
            {
               "type": "null"
            }
         ],
         "default": null
      }
   },
   "$defs": {
      "ForumAuthor": {
         "description": "Represents a post's author.",
         "properties": {
            "name": {
               "title": "Name",
               "type": "string"
            },
            "level": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Level"
            },
            "world": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "World"
            },
            "position": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Position"
            },
            "title": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Title"
            },
            "vocation": {
               "anyOf": [
                  {
                     "enum": [
                        "None",
                        "Druid",
                        "Knight",
                        "Paladin",
                        "Sorcerer",
                        "Elder Druid",
                        "Elite Knight",
                        "Royal Paladin",
                        "Master Sorcerer"
                     ],
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Vocation"
            },
            "guild": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/GuildMembership"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null
            },
            "posts": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Posts"
            },
            "isAuthorDeleted": {
               "default": false,
               "title": "Isauthordeleted",
               "type": "boolean"
            },
            "isAuthorTraded": {
               "default": false,
               "title": "Isauthortraded",
               "type": "boolean"
            }
         },
         "required": [
            "name"
         ],
         "title": "ForumAuthor",
         "type": "object"
      },
      "ForumEmoticon": {
         "description": "Represents a forum's emoticon.",
         "properties": {
            "name": {
               "title": "Name",
               "type": "string"
            },
            "url": {
               "title": "Url",
               "type": "string"
            }
         },
         "required": [
            "name",
            "url"
         ],
         "title": "ForumEmoticon",
         "type": "object"
      },
      "ForumPost": {
         "description": "Represents a forum post.",
         "properties": {
            "postId": {
               "title": "Postid",
               "type": "integer"
            },
            "author": {
               "$ref": "#/$defs/ForumAuthor"
            },
            "emoticon": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/ForumEmoticon"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null
            },
            "title": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Title"
            },
            "content": {
               "title": "Content",
               "type": "string"
            },
            "signature": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Signature"
            },
            "postedDate": {
               "format": "date-time",
               "title": "Posteddate",
               "type": "string"
            },
            "editedDate": {
               "anyOf": [
                  {
                     "format": "date-time",
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Editeddate"
            },
            "editedBy": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "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": {
               "title": "Name",
               "type": "string"
            },
            "rank": {
               "title": "Rank",
               "type": "string"
            },
            "title": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "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 0x7f9812b78670>

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

The URL to the thread in Tibia.com.

Type:

str

AnnouncementEntry

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": {
         "title": "Announcementid",
         "type": "integer"
      },
      "title": {
         "title": "Title",
         "type": "string"
      },
      "announcementAuthor": {
         "title": "Announcementauthor",
         "type": "string"
      }
   },
   "required": [
      "announcementId",
      "title",
      "announcementAuthor"
   ]
}

Config:
  • populate_by_name: bool = True

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

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.

BoardEntry

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": {
         "title": "Boardid",
         "type": "integer"
      },
      "name": {
         "title": "Name",
         "type": "string"
      },
      "description": {
         "title": "Description",
         "type": "string"
      },
      "posts": {
         "title": "Posts",
         "type": "integer"
      },
      "threads": {
         "title": "Threads",
         "type": "integer"
      },
      "lastPost": {
         "anyOf": [
            {
               "$ref": "#/$defs/LastPost"
            },
            {
               "type": "null"
            }
         ],
         "default": null
      }
   },
   "$defs": {
      "LastPost": {
         "description": "Represents a forum thread.",
         "properties": {
            "postId": {
               "title": "Postid",
               "type": "integer"
            },
            "author": {
               "title": "Author",
               "type": "string"
            },
            "postedOn": {
               "format": "date-time",
               "title": "Postedon",
               "type": "string"
            },
            "isAuthorDeleted": {
               "title": "Isauthordeleted",
               "type": "boolean"
            },
            "isAuthorTraded": {
               "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 0x7f9812b78670>

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.

ThreadEntry

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": {
         "title": "Threadid",
         "type": "integer"
      },
      "title": {
         "title": "Title",
         "type": "string"
      },
      "threadStarter": {
         "title": "Threadstarter",
         "type": "string"
      },
      "threadStarterTraded": {
         "title": "Threadstartertraded",
         "type": "boolean"
      },
      "threadStarterDeleted": {
         "title": "Threadstarterdeleted",
         "type": "boolean"
      },
      "replies": {
         "title": "Replies",
         "type": "integer"
      },
      "views": {
         "title": "Views",
         "type": "integer"
      },
      "lastPost": {
         "anyOf": [
            {
               "$ref": "#/$defs/LastPost"
            },
            {
               "type": "null"
            }
         ],
         "default": null
      },
      "status": {
         "$ref": "#/$defs/ThreadStatus"
      },
      "statusIcon": {
         "title": "Statusicon",
         "type": "string"
      },
      "emoticon": {
         "anyOf": [
            {
               "$ref": "#/$defs/ForumEmoticon"
            },
            {
               "type": "null"
            }
         ],
         "default": null
      },
      "totalPages": {
         "title": "Totalpages",
         "type": "integer"
      },
      "goldenFrame": {
         "default": false,
         "title": "Goldenframe",
         "type": "boolean"
      }
   },
   "$defs": {
      "ForumEmoticon": {
         "description": "Represents a forum's emoticon.",
         "properties": {
            "name": {
               "title": "Name",
               "type": "string"
            },
            "url": {
               "title": "Url",
               "type": "string"
            }
         },
         "required": [
            "name",
            "url"
         ],
         "title": "ForumEmoticon",
         "type": "object"
      },
      "LastPost": {
         "description": "Represents a forum thread.",
         "properties": {
            "postId": {
               "title": "Postid",
               "type": "integer"
            },
            "author": {
               "title": "Author",
               "type": "string"
            },
            "postedOn": {
               "format": "date-time",
               "title": "Postedon",
               "type": "string"
            },
            "isAuthorDeleted": {
               "title": "Isauthordeleted",
               "type": "boolean"
            },
            "isAuthorTraded": {
               "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 0x7f9812b78670>

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

The URL to the thread in Tibia.com.

Type:

str

Auxiliary Classes

CMPost

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": {
         "title": "Postid",
         "type": "integer"
      },
      "postedOn": {
         "format": "date-time",
         "title": "Postedon",
         "type": "string"
      },
      "board": {
         "title": "Board",
         "type": "string"
      },
      "threadTitle": {
         "title": "Threadtitle",
         "type": "string"
      }
   },
   "required": [
      "postId",
      "postedOn",
      "board",
      "threadTitle"
   ]
}

Config:
  • populate_by_name: bool = True

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

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.

ForumAuthor

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": {
         "title": "Name",
         "type": "string"
      },
      "level": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Level"
      },
      "world": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "World"
      },
      "position": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Position"
      },
      "title": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Title"
      },
      "vocation": {
         "anyOf": [
            {
               "enum": [
                  "None",
                  "Druid",
                  "Knight",
                  "Paladin",
                  "Sorcerer",
                  "Elder Druid",
                  "Elite Knight",
                  "Royal Paladin",
                  "Master Sorcerer"
               ],
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Vocation"
      },
      "guild": {
         "anyOf": [
            {
               "$ref": "#/$defs/GuildMembership"
            },
            {
               "type": "null"
            }
         ],
         "default": null
      },
      "posts": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Posts"
      },
      "isAuthorDeleted": {
         "default": false,
         "title": "Isauthordeleted",
         "type": "boolean"
      },
      "isAuthorTraded": {
         "default": false,
         "title": "Isauthortraded",
         "type": "boolean"
      }
   },
   "$defs": {
      "GuildMembership": {
         "description": "The guild information of a character.",
         "properties": {
            "name": {
               "title": "Name",
               "type": "string"
            },
            "rank": {
               "title": "Rank",
               "type": "string"
            },
            "title": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Title"
            }
         },
         "required": [
            "name",
            "rank"
         ],
         "title": "GuildMembership",
         "type": "object"
      }
   },
   "required": [
      "name"
   ]
}

Config:
  • populate_by_name: bool = True

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

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.

ForumEmoticon

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": {
         "title": "Name",
         "type": "string"
      },
      "url": {
         "title": "Url",
         "type": "string"
      }
   },
   "required": [
      "name",
      "url"
   ]
}

Config:
  • populate_by_name: bool = True

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

Fields:
  • name (str)

  • url (str)

field name: str [Required]

The emoticon’s name.

field url: str [Required]

The URL to the emoticon’s image.

LastPost

pydantic model tibiapy.models.LastPost[source]

Represents a forum thread.

Show JSON schema
{
   "title": "LastPost",
   "description": "Represents a forum thread.",
   "type": "object",
   "properties": {
      "postId": {
         "title": "Postid",
         "type": "integer"
      },
      "author": {
         "title": "Author",
         "type": "string"
      },
      "postedOn": {
         "format": "date-time",
         "title": "Postedon",
         "type": "string"
      },
      "isAuthorDeleted": {
         "title": "Isauthordeleted",
         "type": "boolean"
      },
      "isAuthorTraded": {
         "title": "Isauthortraded",
         "type": "boolean"
      }
   },
   "required": [
      "postId",
      "author",
      "postedOn",
      "isAuthorDeleted",
      "isAuthorTraded"
   ]
}

Config:
  • populate_by_name: bool = True

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

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

NewsArchive

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": {
         "format": "date",
         "title": "Fromdate",
         "type": "string"
      },
      "toDate": {
         "format": "date",
         "title": "Todate",
         "type": "string"
      },
      "types": {
         "items": {
            "enum": [
               "News Ticker",
               "Featured Article",
               "News"
            ],
            "type": "string"
         },
         "title": "Types",
         "type": "array",
         "uniqueItems": true
      },
      "categories": {
         "items": {
            "enum": [
               "cipsoft",
               "community",
               "development",
               "support",
               "technical"
            ],
            "type": "string"
         },
         "title": "Categories",
         "type": "array",
         "uniqueItems": true
      },
      "entries": {
         "items": {
            "$ref": "#/$defs/NewsEntry"
         },
         "title": "Entries",
         "type": "array"
      }
   },
   "$defs": {
      "NewsEntry": {
         "description": "Represents a news article listed in the News Archive.",
         "properties": {
            "id": {
               "title": "Id",
               "type": "integer"
            },
            "category": {
               "enum": [
                  "cipsoft",
                  "community",
                  "development",
                  "support",
                  "technical"
               ],
               "title": "Category",
               "type": "string"
            },
            "title": {
               "title": "Title",
               "type": "string"
            },
            "publishedOn": {
               "format": "date",
               "title": "Publishedon",
               "type": "string"
            },
            "type": {
               "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 0x7f9812b78670>

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.

News

pydantic model tibiapy.models.News[source]

Represents a news article.

Show JSON schema
{
   "title": "News",
   "description": "Represents a news article.",
   "type": "object",
   "properties": {
      "id": {
         "title": "Id",
         "type": "integer"
      },
      "category": {
         "enum": [
            "cipsoft",
            "community",
            "development",
            "support",
            "technical"
         ],
         "title": "Category",
         "type": "string"
      },
      "title": {
         "title": "Title",
         "type": "string"
      },
      "publishedOn": {
         "format": "date",
         "title": "Publishedon",
         "type": "string"
      },
      "content": {
         "title": "Content",
         "type": "string"
      },
      "threadId": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Threadid"
      }
   },
   "required": [
      "id",
      "category",
      "title",
      "publishedOn",
      "content"
   ]
}

Config:
  • populate_by_name: bool = True

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

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.

NewsEntry

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": {
         "title": "Id",
         "type": "integer"
      },
      "category": {
         "enum": [
            "cipsoft",
            "community",
            "development",
            "support",
            "technical"
         ],
         "title": "Category",
         "type": "string"
      },
      "title": {
         "title": "Title",
         "type": "string"
      },
      "publishedOn": {
         "format": "date",
         "title": "Publishedon",
         "type": "string"
      },
      "type": {
         "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 0x7f9812b78670>

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.

EventSchedule

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": {
         "title": "Month",
         "type": "integer"
      },
      "year": {
         "title": "Year",
         "type": "integer"
      },
      "events": {
         "default": [],
         "items": {
            "$ref": "#/$defs/EventEntry"
         },
         "title": "Events",
         "type": "array"
      }
   },
   "$defs": {
      "EventEntry": {
         "description": "Represents an event's entry in the calendar.",
         "properties": {
            "title": {
               "title": "Title",
               "type": "string"
            },
            "description": {
               "title": "Description",
               "type": "string"
            },
            "startDate": {
               "anyOf": [
                  {
                     "format": "date",
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Startdate"
            },
            "endDate": {
               "anyOf": [
                  {
                     "format": "date",
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Enddate"
            },
            "color": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "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 0x7f9812b78670>

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.

EventEntry

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": {
         "title": "Title",
         "type": "string"
      },
      "description": {
         "title": "Description",
         "type": "string"
      },
      "startDate": {
         "anyOf": [
            {
               "format": "date",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Startdate"
      },
      "endDate": {
         "anyOf": [
            {
               "format": "date",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Enddate"
      },
      "color": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Color"
      }
   },
   "required": [
      "title",
      "description"
   ]
}

Config:
  • populate_by_name: bool = True

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

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.

CharacterBazaar

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,
         "title": "Currentpage",
         "type": "integer"
      },
      "totalPages": {
         "default": 1,
         "title": "Totalpages",
         "type": "integer"
      },
      "resultsCount": {
         "default": 0,
         "title": "Resultscount",
         "type": "integer"
      },
      "entries": {
         "default": [],
         "items": {
            "$ref": "#/$defs/Auction"
         },
         "title": "Entries",
         "type": "array"
      },
      "type": {
         "enum": [
            "Current Auctions",
            "Auction History"
         ],
         "title": "Type",
         "type": "string"
      },
      "filters": {
         "anyOf": [
            {
               "$ref": "#/$defs/AuctionFilters"
            },
            {
               "type": "null"
            }
         ],
         "default": null
      }
   },
   "$defs": {
      "AchievementEntry": {
         "description": "An unlocked achievement by the character.",
         "properties": {
            "name": {
               "title": "Name",
               "type": "string"
            },
            "isSecret": {
               "title": "Issecret",
               "type": "boolean"
            }
         },
         "required": [
            "name",
            "isSecret"
         ],
         "title": "AchievementEntry",
         "type": "object"
      },
      "Auction": {
         "description": "Represents an auction in the list, containing the summary.",
         "properties": {
            "auctionId": {
               "title": "Auctionid",
               "type": "integer"
            },
            "name": {
               "title": "Name",
               "type": "string"
            },
            "level": {
               "title": "Level",
               "type": "integer"
            },
            "world": {
               "title": "World",
               "type": "string"
            },
            "vocation": {
               "enum": [
                  "None",
                  "Druid",
                  "Knight",
                  "Paladin",
                  "Sorcerer",
                  "Elder Druid",
                  "Elite Knight",
                  "Royal Paladin",
                  "Master Sorcerer"
               ],
               "title": "Vocation",
               "type": "string"
            },
            "sex": {
               "enum": [
                  "male",
                  "female"
               ],
               "title": "Sex",
               "type": "string"
            },
            "outfit": {
               "$ref": "#/$defs/OutfitImage"
            },
            "displayedItems": {
               "items": {
                  "$ref": "#/$defs/ItemEntry"
               },
               "title": "Displayeditems",
               "type": "array"
            },
            "salesArguments": {
               "items": {
                  "$ref": "#/$defs/SalesArgument"
               },
               "title": "Salesarguments",
               "type": "array"
            },
            "auctionStart": {
               "format": "date-time",
               "title": "Auctionstart",
               "type": "string"
            },
            "auctionEnd": {
               "format": "date-time",
               "title": "Auctionend",
               "type": "string"
            },
            "bid": {
               "title": "Bid",
               "type": "integer"
            },
            "bidType": {
               "enum": [
                  "Minimum Bid",
                  "Current Bid",
                  "Winning Bid"
               ],
               "title": "Bidtype",
               "type": "string"
            },
            "status": {
               "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
            }
         },
         "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": {
               "title": "Hitpoints",
               "type": "integer"
            },
            "mana": {
               "title": "Mana",
               "type": "integer"
            },
            "capacity": {
               "title": "Capacity",
               "type": "integer"
            },
            "speed": {
               "title": "Speed",
               "type": "integer"
            },
            "blessingsCount": {
               "title": "Blessingscount",
               "type": "integer"
            },
            "mountsCount": {
               "title": "Mountscount",
               "type": "integer"
            },
            "outfitsCount": {
               "title": "Outfitscount",
               "type": "integer"
            },
            "titlesCount": {
               "title": "Titlescount",
               "type": "integer"
            },
            "skills": {
               "items": {
                  "$ref": "#/$defs/SkillEntry"
               },
               "title": "Skills",
               "type": "array"
            },
            "creationDate": {
               "format": "date-time",
               "title": "Creationdate",
               "type": "string"
            },
            "experience": {
               "title": "Experience",
               "type": "integer"
            },
            "gold": {
               "title": "Gold",
               "type": "integer"
            },
            "achievementPoints": {
               "title": "Achievementpoints",
               "type": "integer"
            },
            "regularWorldTransferAvailableDate": {
               "anyOf": [
                  {
                     "format": "date-time",
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Regularworldtransferavailabledate"
            },
            "charmExpansion": {
               "title": "Charmexpansion",
               "type": "boolean"
            },
            "availableCharmPoints": {
               "title": "Availablecharmpoints",
               "type": "integer"
            },
            "spentCharmPoints": {
               "title": "Spentcharmpoints",
               "type": "integer"
            },
            "preyWildcards": {
               "title": "Preywildcards",
               "type": "integer"
            },
            "dailyRewardStreak": {
               "title": "Dailyrewardstreak",
               "type": "integer"
            },
            "huntingTaskPoints": {
               "title": "Huntingtaskpoints",
               "type": "integer"
            },
            "permanentHuntingTaskSlots": {
               "title": "Permanenthuntingtaskslots",
               "type": "integer"
            },
            "permanentPreySlots": {
               "title": "Permanentpreyslots",
               "type": "integer"
            },
            "hirelings": {
               "title": "Hirelings",
               "type": "integer"
            },
            "hirelingJobs": {
               "title": "Hirelingjobs",
               "type": "integer"
            },
            "hirelingOutfits": {
               "title": "Hirelingoutfits",
               "type": "integer"
            },
            "exaltedDust": {
               "title": "Exalteddust",
               "type": "integer"
            },
            "exaltedDustLimit": {
               "title": "Exalteddustlimit",
               "type": "integer"
            },
            "bossPoints": {
               "title": "Bosspoints",
               "type": "integer"
            },
            "bonusPromotionPoints": {
               "title": "Bonuspromotionpoints",
               "type": "integer"
            },
            "items": {
               "$ref": "#/$defs/ItemSummary"
            },
            "storeItems": {
               "$ref": "#/$defs/ItemSummary"
            },
            "mounts": {
               "$ref": "#/$defs/Mounts"
            },
            "storeMounts": {
               "$ref": "#/$defs/Mounts"
            },
            "outfits": {
               "$ref": "#/$defs/Outfits"
            },
            "storeOutfits": {
               "$ref": "#/$defs/Outfits"
            },
            "familiars": {
               "$ref": "#/$defs/Familiars"
            },
            "blessings": {
               "items": {
                  "$ref": "#/$defs/BlessingEntry"
               },
               "title": "Blessings",
               "type": "array"
            },
            "imbuements": {
               "items": {
                  "type": "string"
               },
               "title": "Imbuements",
               "type": "array"
            },
            "charms": {
               "items": {
                  "$ref": "#/$defs/CharmEntry"
               },
               "title": "Charms",
               "type": "array"
            },
            "completedCyclopediaMapAreas": {
               "items": {
                  "type": "string"
               },
               "title": "Completedcyclopediamapareas",
               "type": "array"
            },
            "completedQuestLines": {
               "items": {
                  "type": "string"
               },
               "title": "Completedquestlines",
               "type": "array"
            },
            "titles": {
               "items": {
                  "type": "string"
               },
               "title": "Titles",
               "type": "array"
            },
            "achievements": {
               "items": {
                  "$ref": "#/$defs/AchievementEntry"
               },
               "title": "Achievements",
               "type": "array"
            },
            "bestiaryProgress": {
               "items": {
                  "$ref": "#/$defs/BestiaryEntry"
               },
               "title": "Bestiaryprogress",
               "type": "array"
            },
            "bosstiaryProgress": {
               "items": {
                  "$ref": "#/$defs/BestiaryEntry"
               },
               "title": "Bosstiaryprogress",
               "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"
         ],
         "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,
               "title": "World"
            },
            "pvpType": {
               "anyOf": [
                  {
                     "enum": [
                        "OPEN_PVP",
                        "OPTIONAL_PVP",
                        "HARDCORE_PVP",
                        "RETRO_OPEN_PVP",
                        "RETRO_HARDCORE_PVP"
                     ],
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Pvptype"
            },
            "battleye": {
               "anyOf": [
                  {
                     "enum": [
                        "INITIALLY_PROTECTED",
                        "PROTECTED",
                        "NOT_PROTECTED"
                     ],
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Battleye"
            },
            "vocation": {
               "anyOf": [
                  {
                     "enum": [
                        "NONE",
                        "DRUID",
                        "KNIGHT",
                        "PALADIN",
                        "SORCERER"
                     ],
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Vocation"
            },
            "minLevel": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Minlevel"
            },
            "maxLevel": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "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,
               "title": "Skill"
            },
            "minSkillLevel": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Minskilllevel"
            },
            "maxSkillLevel": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "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,
               "title": "Orderby"
            },
            "order": {
               "anyOf": [
                  {
                     "enum": [
                        "HIGHEST_LATEST",
                        "LOWEST_EARLIEST"
                     ],
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Order"
            },
            "searchString": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Searchstring"
            },
            "searchType": {
               "anyOf": [
                  {
                     "enum": [
                        "ITEM_DEFAULT",
                        "ITEM_WILDCARD",
                        "CHARACTER_NAME"
                     ],
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Searchtype"
            },
            "availableWorlds": {
               "default": [],
               "items": {
                  "type": "string"
               },
               "title": "Availableworlds",
               "type": "array"
            }
         },
         "title": "AuctionFilters",
         "type": "object"
      },
      "BestiaryEntry": {
         "description": "The bestiary progress for a specific creature.",
         "properties": {
            "name": {
               "title": "Name",
               "type": "string"
            },
            "kills": {
               "title": "Kills",
               "type": "integer"
            },
            "step": {
               "title": "Step",
               "type": "integer"
            }
         },
         "required": [
            "name",
            "kills",
            "step"
         ],
         "title": "BestiaryEntry",
         "type": "object"
      },
      "BlessingEntry": {
         "description": "A character's blessings.",
         "properties": {
            "name": {
               "title": "Name",
               "type": "string"
            },
            "amount": {
               "title": "Amount",
               "type": "integer"
            }
         },
         "required": [
            "name",
            "amount"
         ],
         "title": "BlessingEntry",
         "type": "object"
      },
      "CharmEntry": {
         "description": "An unlocked charm by the character.",
         "properties": {
            "name": {
               "title": "Name",
               "type": "string"
            },
            "cost": {
               "title": "Cost",
               "type": "integer"
            }
         },
         "required": [
            "name",
            "cost"
         ],
         "title": "CharmEntry",
         "type": "object"
      },
      "FamiliarEntry": {
         "description": "Represents a familiar owned or unlocked by the character.",
         "properties": {
            "imageUrl": {
               "title": "Imageurl",
               "type": "string"
            },
            "name": {
               "title": "Name",
               "type": "string"
            },
            "familiarId": {
               "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,
               "title": "Currentpage",
               "type": "integer"
            },
            "totalPages": {
               "default": 1,
               "title": "Totalpages",
               "type": "integer"
            },
            "resultsCount": {
               "default": 0,
               "title": "Resultscount",
               "type": "integer"
            },
            "entries": {
               "default": [],
               "items": {
                  "$ref": "#/$defs/FamiliarEntry"
               },
               "title": "Entries",
               "type": "array"
            },
            "isFullyFetched": {
               "default": false,
               "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": {
               "title": "Imageurl",
               "type": "string"
            },
            "name": {
               "title": "Name",
               "type": "string"
            },
            "description": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Description"
            },
            "count": {
               "default": 1,
               "title": "Count",
               "type": "integer"
            },
            "itemId": {
               "title": "Itemid",
               "type": "integer"
            },
            "tier": {
               "default": 0,
               "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,
               "title": "Currentpage",
               "type": "integer"
            },
            "totalPages": {
               "default": 1,
               "title": "Totalpages",
               "type": "integer"
            },
            "resultsCount": {
               "default": 0,
               "title": "Resultscount",
               "type": "integer"
            },
            "entries": {
               "default": [],
               "items": {
                  "$ref": "#/$defs/ItemEntry"
               },
               "title": "Entries",
               "type": "array"
            },
            "isFullyFetched": {
               "default": false,
               "title": "Isfullyfetched",
               "type": "boolean"
            }
         },
         "title": "ItemSummary",
         "type": "object"
      },
      "MountEntry": {
         "description": "Represents a mount owned or unlocked by the character.",
         "properties": {
            "imageUrl": {
               "title": "Imageurl",
               "type": "string"
            },
            "name": {
               "title": "Name",
               "type": "string"
            },
            "mountId": {
               "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,
               "title": "Currentpage",
               "type": "integer"
            },
            "totalPages": {
               "default": 1,
               "title": "Totalpages",
               "type": "integer"
            },
            "resultsCount": {
               "default": 0,
               "title": "Resultscount",
               "type": "integer"
            },
            "entries": {
               "default": [],
               "items": {
                  "$ref": "#/$defs/MountEntry"
               },
               "title": "Entries",
               "type": "array"
            },
            "isFullyFetched": {
               "default": false,
               "title": "Isfullyfetched",
               "type": "boolean"
            }
         },
         "title": "Mounts",
         "type": "object"
      },
      "OutfitEntry": {
         "description": "Represents a outfit owned or unlocked by the character.",
         "properties": {
            "outfitId": {
               "title": "Outfitid",
               "type": "integer"
            },
            "addons": {
               "title": "Addons",
               "type": "integer"
            },
            "imageUrl": {
               "title": "Imageurl",
               "type": "string"
            },
            "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": {
               "title": "Outfitid",
               "type": "integer"
            },
            "addons": {
               "title": "Addons",
               "type": "integer"
            },
            "imageUrl": {
               "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,
               "title": "Currentpage",
               "type": "integer"
            },
            "totalPages": {
               "default": 1,
               "title": "Totalpages",
               "type": "integer"
            },
            "resultsCount": {
               "default": 0,
               "title": "Resultscount",
               "type": "integer"
            },
            "entries": {
               "default": [],
               "items": {
                  "$ref": "#/$defs/OutfitEntry"
               },
               "title": "Entries",
               "type": "array"
            },
            "isFullyFetched": {
               "default": false,
               "title": "Isfullyfetched",
               "type": "boolean"
            }
         },
         "title": "Outfits",
         "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": {
               "title": "Categoryimage",
               "type": "string"
            },
            "content": {
               "title": "Content",
               "type": "string"
            }
         },
         "required": [
            "categoryId",
            "categoryImage",
            "content"
         ],
         "title": "SalesArgument",
         "type": "object"
      },
      "SkillEntry": {
         "description": "Represents the character's skills.",
         "properties": {
            "name": {
               "title": "Name",
               "type": "string"
            },
            "level": {
               "title": "Level",
               "type": "integer"
            },
            "progress": {
               "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 0x7f9812b78670>

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 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.

property url: str

The URL to the Character Bazaar with the current parameters.

Auction

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": {
         "title": "Auctionid",
         "type": "integer"
      },
      "name": {
         "title": "Name",
         "type": "string"
      },
      "level": {
         "title": "Level",
         "type": "integer"
      },
      "world": {
         "title": "World",
         "type": "string"
      },
      "vocation": {
         "enum": [
            "None",
            "Druid",
            "Knight",
            "Paladin",
            "Sorcerer",
            "Elder Druid",
            "Elite Knight",
            "Royal Paladin",
            "Master Sorcerer"
         ],
         "title": "Vocation",
         "type": "string"
      },
      "sex": {
         "enum": [
            "male",
            "female"
         ],
         "title": "Sex",
         "type": "string"
      },
      "outfit": {
         "$ref": "#/$defs/OutfitImage"
      },
      "displayedItems": {
         "items": {
            "$ref": "#/$defs/ItemEntry"
         },
         "title": "Displayeditems",
         "type": "array"
      },
      "salesArguments": {
         "items": {
            "$ref": "#/$defs/SalesArgument"
         },
         "title": "Salesarguments",
         "type": "array"
      },
      "auctionStart": {
         "format": "date-time",
         "title": "Auctionstart",
         "type": "string"
      },
      "auctionEnd": {
         "format": "date-time",
         "title": "Auctionend",
         "type": "string"
      },
      "bid": {
         "title": "Bid",
         "type": "integer"
      },
      "bidType": {
         "enum": [
            "Minimum Bid",
            "Current Bid",
            "Winning Bid"
         ],
         "title": "Bidtype",
         "type": "string"
      },
      "status": {
         "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
      }
   },
   "$defs": {
      "AchievementEntry": {
         "description": "An unlocked achievement by the character.",
         "properties": {
            "name": {
               "title": "Name",
               "type": "string"
            },
            "isSecret": {
               "title": "Issecret",
               "type": "boolean"
            }
         },
         "required": [
            "name",
            "isSecret"
         ],
         "title": "AchievementEntry",
         "type": "object"
      },
      "AuctionDetails": {
         "description": "The details of an auction.",
         "properties": {
            "hitPoints": {
               "title": "Hitpoints",
               "type": "integer"
            },
            "mana": {
               "title": "Mana",
               "type": "integer"
            },
            "capacity": {
               "title": "Capacity",
               "type": "integer"
            },
            "speed": {
               "title": "Speed",
               "type": "integer"
            },
            "blessingsCount": {
               "title": "Blessingscount",
               "type": "integer"
            },
            "mountsCount": {
               "title": "Mountscount",
               "type": "integer"
            },
            "outfitsCount": {
               "title": "Outfitscount",
               "type": "integer"
            },
            "titlesCount": {
               "title": "Titlescount",
               "type": "integer"
            },
            "skills": {
               "items": {
                  "$ref": "#/$defs/SkillEntry"
               },
               "title": "Skills",
               "type": "array"
            },
            "creationDate": {
               "format": "date-time",
               "title": "Creationdate",
               "type": "string"
            },
            "experience": {
               "title": "Experience",
               "type": "integer"
            },
            "gold": {
               "title": "Gold",
               "type": "integer"
            },
            "achievementPoints": {
               "title": "Achievementpoints",
               "type": "integer"
            },
            "regularWorldTransferAvailableDate": {
               "anyOf": [
                  {
                     "format": "date-time",
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Regularworldtransferavailabledate"
            },
            "charmExpansion": {
               "title": "Charmexpansion",
               "type": "boolean"
            },
            "availableCharmPoints": {
               "title": "Availablecharmpoints",
               "type": "integer"
            },
            "spentCharmPoints": {
               "title": "Spentcharmpoints",
               "type": "integer"
            },
            "preyWildcards": {
               "title": "Preywildcards",
               "type": "integer"
            },
            "dailyRewardStreak": {
               "title": "Dailyrewardstreak",
               "type": "integer"
            },
            "huntingTaskPoints": {
               "title": "Huntingtaskpoints",
               "type": "integer"
            },
            "permanentHuntingTaskSlots": {
               "title": "Permanenthuntingtaskslots",
               "type": "integer"
            },
            "permanentPreySlots": {
               "title": "Permanentpreyslots",
               "type": "integer"
            },
            "hirelings": {
               "title": "Hirelings",
               "type": "integer"
            },
            "hirelingJobs": {
               "title": "Hirelingjobs",
               "type": "integer"
            },
            "hirelingOutfits": {
               "title": "Hirelingoutfits",
               "type": "integer"
            },
            "exaltedDust": {
               "title": "Exalteddust",
               "type": "integer"
            },
            "exaltedDustLimit": {
               "title": "Exalteddustlimit",
               "type": "integer"
            },
            "bossPoints": {
               "title": "Bosspoints",
               "type": "integer"
            },
            "bonusPromotionPoints": {
               "title": "Bonuspromotionpoints",
               "type": "integer"
            },
            "items": {
               "$ref": "#/$defs/ItemSummary"
            },
            "storeItems": {
               "$ref": "#/$defs/ItemSummary"
            },
            "mounts": {
               "$ref": "#/$defs/Mounts"
            },
            "storeMounts": {
               "$ref": "#/$defs/Mounts"
            },
            "outfits": {
               "$ref": "#/$defs/Outfits"
            },
            "storeOutfits": {
               "$ref": "#/$defs/Outfits"
            },
            "familiars": {
               "$ref": "#/$defs/Familiars"
            },
            "blessings": {
               "items": {
                  "$ref": "#/$defs/BlessingEntry"
               },
               "title": "Blessings",
               "type": "array"
            },
            "imbuements": {
               "items": {
                  "type": "string"
               },
               "title": "Imbuements",
               "type": "array"
            },
            "charms": {
               "items": {
                  "$ref": "#/$defs/CharmEntry"
               },
               "title": "Charms",
               "type": "array"
            },
            "completedCyclopediaMapAreas": {
               "items": {
                  "type": "string"
               },
               "title": "Completedcyclopediamapareas",
               "type": "array"
            },
            "completedQuestLines": {
               "items": {
                  "type": "string"
               },
               "title": "Completedquestlines",
               "type": "array"
            },
            "titles": {
               "items": {
                  "type": "string"
               },
               "title": "Titles",
               "type": "array"
            },
            "achievements": {
               "items": {
                  "$ref": "#/$defs/AchievementEntry"
               },
               "title": "Achievements",
               "type": "array"
            },
            "bestiaryProgress": {
               "items": {
                  "$ref": "#/$defs/BestiaryEntry"
               },
               "title": "Bestiaryprogress",
               "type": "array"
            },
            "bosstiaryProgress": {
               "items": {
                  "$ref": "#/$defs/BestiaryEntry"
               },
               "title": "Bosstiaryprogress",
               "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"
         ],
         "title": "AuctionDetails",
         "type": "object"
      },
      "BestiaryEntry": {
         "description": "The bestiary progress for a specific creature.",
         "properties": {
            "name": {
               "title": "Name",
               "type": "string"
            },
            "kills": {
               "title": "Kills",
               "type": "integer"
            },
            "step": {
               "title": "Step",
               "type": "integer"
            }
         },
         "required": [
            "name",
            "kills",
            "step"
         ],
         "title": "BestiaryEntry",
         "type": "object"
      },
      "BlessingEntry": {
         "description": "A character's blessings.",
         "properties": {
            "name": {
               "title": "Name",
               "type": "string"
            },
            "amount": {
               "title": "Amount",
               "type": "integer"
            }
         },
         "required": [
            "name",
            "amount"
         ],
         "title": "BlessingEntry",
         "type": "object"
      },
      "CharmEntry": {
         "description": "An unlocked charm by the character.",
         "properties": {
            "name": {
               "title": "Name",
               "type": "string"
            },
            "cost": {
               "title": "Cost",
               "type": "integer"
            }
         },
         "required": [
            "name",
            "cost"
         ],
         "title": "CharmEntry",
         "type": "object"
      },
      "FamiliarEntry": {
         "description": "Represents a familiar owned or unlocked by the character.",
         "properties": {
            "imageUrl": {
               "title": "Imageurl",
               "type": "string"
            },
            "name": {
               "title": "Name",
               "type": "string"
            },
            "familiarId": {
               "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,
               "title": "Currentpage",
               "type": "integer"
            },
            "totalPages": {
               "default": 1,
               "title": "Totalpages",
               "type": "integer"
            },
            "resultsCount": {
               "default": 0,
               "title": "Resultscount",
               "type": "integer"
            },
            "entries": {
               "default": [],
               "items": {
                  "$ref": "#/$defs/FamiliarEntry"
               },
               "title": "Entries",
               "type": "array"
            },
            "isFullyFetched": {
               "default": false,
               "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": {
               "title": "Imageurl",
               "type": "string"
            },
            "name": {
               "title": "Name",
               "type": "string"
            },
            "description": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Description"
            },
            "count": {
               "default": 1,
               "title": "Count",
               "type": "integer"
            },
            "itemId": {
               "title": "Itemid",
               "type": "integer"
            },
            "tier": {
               "default": 0,
               "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,
               "title": "Currentpage",
               "type": "integer"
            },
            "totalPages": {
               "default": 1,
               "title": "Totalpages",
               "type": "integer"
            },
            "resultsCount": {
               "default": 0,
               "title": "Resultscount",
               "type": "integer"
            },
            "entries": {
               "default": [],
               "items": {
                  "$ref": "#/$defs/ItemEntry"
               },
               "title": "Entries",
               "type": "array"
            },
            "isFullyFetched": {
               "default": false,
               "title": "Isfullyfetched",
               "type": "boolean"
            }
         },
         "title": "ItemSummary",
         "type": "object"
      },
      "MountEntry": {
         "description": "Represents a mount owned or unlocked by the character.",
         "properties": {
            "imageUrl": {
               "title": "Imageurl",
               "type": "string"
            },
            "name": {
               "title": "Name",
               "type": "string"
            },
            "mountId": {
               "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,
               "title": "Currentpage",
               "type": "integer"
            },
            "totalPages": {
               "default": 1,
               "title": "Totalpages",
               "type": "integer"
            },
            "resultsCount": {
               "default": 0,
               "title": "Resultscount",
               "type": "integer"
            },
            "entries": {
               "default": [],
               "items": {
                  "$ref": "#/$defs/MountEntry"
               },
               "title": "Entries",
               "type": "array"
            },
            "isFullyFetched": {
               "default": false,
               "title": "Isfullyfetched",
               "type": "boolean"
            }
         },
         "title": "Mounts",
         "type": "object"
      },
      "OutfitEntry": {
         "description": "Represents a outfit owned or unlocked by the character.",
         "properties": {
            "outfitId": {
               "title": "Outfitid",
               "type": "integer"
            },
            "addons": {
               "title": "Addons",
               "type": "integer"
            },
            "imageUrl": {
               "title": "Imageurl",
               "type": "string"
            },
            "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": {
               "title": "Outfitid",
               "type": "integer"
            },
            "addons": {
               "title": "Addons",
               "type": "integer"
            },
            "imageUrl": {
               "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,
               "title": "Currentpage",
               "type": "integer"
            },
            "totalPages": {
               "default": 1,
               "title": "Totalpages",
               "type": "integer"
            },
            "resultsCount": {
               "default": 0,
               "title": "Resultscount",
               "type": "integer"
            },
            "entries": {
               "default": [],
               "items": {
                  "$ref": "#/$defs/OutfitEntry"
               },
               "title": "Entries",
               "type": "array"
            },
            "isFullyFetched": {
               "default": false,
               "title": "Isfullyfetched",
               "type": "boolean"
            }
         },
         "title": "Outfits",
         "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": {
               "title": "Categoryimage",
               "type": "string"
            },
            "content": {
               "title": "Content",
               "type": "string"
            }
         },
         "required": [
            "categoryId",
            "categoryImage",
            "content"
         ],
         "title": "SalesArgument",
         "type": "object"
      },
      "SkillEntry": {
         "description": "Represents the character's skills.",
         "properties": {
            "name": {
               "title": "Name",
               "type": "string"
            },
            "level": {
               "title": "Level",
               "type": "integer"
            },
            "progress": {
               "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 0x7f9812b78670>

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.

AuctionDetails

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": {
         "title": "Hitpoints",
         "type": "integer"
      },
      "mana": {
         "title": "Mana",
         "type": "integer"
      },
      "capacity": {
         "title": "Capacity",
         "type": "integer"
      },
      "speed": {
         "title": "Speed",
         "type": "integer"
      },
      "blessingsCount": {
         "title": "Blessingscount",
         "type": "integer"
      },
      "mountsCount": {
         "title": "Mountscount",
         "type": "integer"
      },
      "outfitsCount": {
         "title": "Outfitscount",
         "type": "integer"
      },
      "titlesCount": {
         "title": "Titlescount",
         "type": "integer"
      },
      "skills": {
         "items": {
            "$ref": "#/$defs/SkillEntry"
         },
         "title": "Skills",
         "type": "array"
      },
      "creationDate": {
         "format": "date-time",
         "title": "Creationdate",
         "type": "string"
      },
      "experience": {
         "title": "Experience",
         "type": "integer"
      },
      "gold": {
         "title": "Gold",
         "type": "integer"
      },
      "achievementPoints": {
         "title": "Achievementpoints",
         "type": "integer"
      },
      "regularWorldTransferAvailableDate": {
         "anyOf": [
            {
               "format": "date-time",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Regularworldtransferavailabledate"
      },
      "charmExpansion": {
         "title": "Charmexpansion",
         "type": "boolean"
      },
      "availableCharmPoints": {
         "title": "Availablecharmpoints",
         "type": "integer"
      },
      "spentCharmPoints": {
         "title": "Spentcharmpoints",
         "type": "integer"
      },
      "preyWildcards": {
         "title": "Preywildcards",
         "type": "integer"
      },
      "dailyRewardStreak": {
         "title": "Dailyrewardstreak",
         "type": "integer"
      },
      "huntingTaskPoints": {
         "title": "Huntingtaskpoints",
         "type": "integer"
      },
      "permanentHuntingTaskSlots": {
         "title": "Permanenthuntingtaskslots",
         "type": "integer"
      },
      "permanentPreySlots": {
         "title": "Permanentpreyslots",
         "type": "integer"
      },
      "hirelings": {
         "title": "Hirelings",
         "type": "integer"
      },
      "hirelingJobs": {
         "title": "Hirelingjobs",
         "type": "integer"
      },
      "hirelingOutfits": {
         "title": "Hirelingoutfits",
         "type": "integer"
      },
      "exaltedDust": {
         "title": "Exalteddust",
         "type": "integer"
      },
      "exaltedDustLimit": {
         "title": "Exalteddustlimit",
         "type": "integer"
      },
      "bossPoints": {
         "title": "Bosspoints",
         "type": "integer"
      },
      "bonusPromotionPoints": {
         "title": "Bonuspromotionpoints",
         "type": "integer"
      },
      "items": {
         "$ref": "#/$defs/ItemSummary"
      },
      "storeItems": {
         "$ref": "#/$defs/ItemSummary"
      },
      "mounts": {
         "$ref": "#/$defs/Mounts"
      },
      "storeMounts": {
         "$ref": "#/$defs/Mounts"
      },
      "outfits": {
         "$ref": "#/$defs/Outfits"
      },
      "storeOutfits": {
         "$ref": "#/$defs/Outfits"
      },
      "familiars": {
         "$ref": "#/$defs/Familiars"
      },
      "blessings": {
         "items": {
            "$ref": "#/$defs/BlessingEntry"
         },
         "title": "Blessings",
         "type": "array"
      },
      "imbuements": {
         "items": {
            "type": "string"
         },
         "title": "Imbuements",
         "type": "array"
      },
      "charms": {
         "items": {
            "$ref": "#/$defs/CharmEntry"
         },
         "title": "Charms",
         "type": "array"
      },
      "completedCyclopediaMapAreas": {
         "items": {
            "type": "string"
         },
         "title": "Completedcyclopediamapareas",
         "type": "array"
      },
      "completedQuestLines": {
         "items": {
            "type": "string"
         },
         "title": "Completedquestlines",
         "type": "array"
      },
      "titles": {
         "items": {
            "type": "string"
         },
         "title": "Titles",
         "type": "array"
      },
      "achievements": {
         "items": {
            "$ref": "#/$defs/AchievementEntry"
         },
         "title": "Achievements",
         "type": "array"
      },
      "bestiaryProgress": {
         "items": {
            "$ref": "#/$defs/BestiaryEntry"
         },
         "title": "Bestiaryprogress",
         "type": "array"
      },
      "bosstiaryProgress": {
         "items": {
            "$ref": "#/$defs/BestiaryEntry"
         },
         "title": "Bosstiaryprogress",
         "type": "array"
      }
   },
   "$defs": {
      "AchievementEntry": {
         "description": "An unlocked achievement by the character.",
         "properties": {
            "name": {
               "title": "Name",
               "type": "string"
            },
            "isSecret": {
               "title": "Issecret",
               "type": "boolean"
            }
         },
         "required": [
            "name",
            "isSecret"
         ],
         "title": "AchievementEntry",
         "type": "object"
      },
      "BestiaryEntry": {
         "description": "The bestiary progress for a specific creature.",
         "properties": {
            "name": {
               "title": "Name",
               "type": "string"
            },
            "kills": {
               "title": "Kills",
               "type": "integer"
            },
            "step": {
               "title": "Step",
               "type": "integer"
            }
         },
         "required": [
            "name",
            "kills",
            "step"
         ],
         "title": "BestiaryEntry",
         "type": "object"
      },
      "BlessingEntry": {
         "description": "A character's blessings.",
         "properties": {
            "name": {
               "title": "Name",
               "type": "string"
            },
            "amount": {
               "title": "Amount",
               "type": "integer"
            }
         },
         "required": [
            "name",
            "amount"
         ],
         "title": "BlessingEntry",
         "type": "object"
      },
      "CharmEntry": {
         "description": "An unlocked charm by the character.",
         "properties": {
            "name": {
               "title": "Name",
               "type": "string"
            },
            "cost": {
               "title": "Cost",
               "type": "integer"
            }
         },
         "required": [
            "name",
            "cost"
         ],
         "title": "CharmEntry",
         "type": "object"
      },
      "FamiliarEntry": {
         "description": "Represents a familiar owned or unlocked by the character.",
         "properties": {
            "imageUrl": {
               "title": "Imageurl",
               "type": "string"
            },
            "name": {
               "title": "Name",
               "type": "string"
            },
            "familiarId": {
               "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,
               "title": "Currentpage",
               "type": "integer"
            },
            "totalPages": {
               "default": 1,
               "title": "Totalpages",
               "type": "integer"
            },
            "resultsCount": {
               "default": 0,
               "title": "Resultscount",
               "type": "integer"
            },
            "entries": {
               "default": [],
               "items": {
                  "$ref": "#/$defs/FamiliarEntry"
               },
               "title": "Entries",
               "type": "array"
            },
            "isFullyFetched": {
               "default": false,
               "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": {
               "title": "Imageurl",
               "type": "string"
            },
            "name": {
               "title": "Name",
               "type": "string"
            },
            "description": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Description"
            },
            "count": {
               "default": 1,
               "title": "Count",
               "type": "integer"
            },
            "itemId": {
               "title": "Itemid",
               "type": "integer"
            },
            "tier": {
               "default": 0,
               "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,
               "title": "Currentpage",
               "type": "integer"
            },
            "totalPages": {
               "default": 1,
               "title": "Totalpages",
               "type": "integer"
            },
            "resultsCount": {
               "default": 0,
               "title": "Resultscount",
               "type": "integer"
            },
            "entries": {
               "default": [],
               "items": {
                  "$ref": "#/$defs/ItemEntry"
               },
               "title": "Entries",
               "type": "array"
            },
            "isFullyFetched": {
               "default": false,
               "title": "Isfullyfetched",
               "type": "boolean"
            }
         },
         "title": "ItemSummary",
         "type": "object"
      },
      "MountEntry": {
         "description": "Represents a mount owned or unlocked by the character.",
         "properties": {
            "imageUrl": {
               "title": "Imageurl",
               "type": "string"
            },
            "name": {
               "title": "Name",
               "type": "string"
            },
            "mountId": {
               "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,
               "title": "Currentpage",
               "type": "integer"
            },
            "totalPages": {
               "default": 1,
               "title": "Totalpages",
               "type": "integer"
            },
            "resultsCount": {
               "default": 0,
               "title": "Resultscount",
               "type": "integer"
            },
            "entries": {
               "default": [],
               "items": {
                  "$ref": "#/$defs/MountEntry"
               },
               "title": "Entries",
               "type": "array"
            },
            "isFullyFetched": {
               "default": false,
               "title": "Isfullyfetched",
               "type": "boolean"
            }
         },
         "title": "Mounts",
         "type": "object"
      },
      "OutfitEntry": {
         "description": "Represents a outfit owned or unlocked by the character.",
         "properties": {
            "outfitId": {
               "title": "Outfitid",
               "type": "integer"
            },
            "addons": {
               "title": "Addons",
               "type": "integer"
            },
            "imageUrl": {
               "title": "Imageurl",
               "type": "string"
            },
            "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,
               "title": "Currentpage",
               "type": "integer"
            },
            "totalPages": {
               "default": 1,
               "title": "Totalpages",
               "type": "integer"
            },
            "resultsCount": {
               "default": 0,
               "title": "Resultscount",
               "type": "integer"
            },
            "entries": {
               "default": [],
               "items": {
                  "$ref": "#/$defs/OutfitEntry"
               },
               "title": "Entries",
               "type": "array"
            },
            "isFullyFetched": {
               "default": false,
               "title": "Isfullyfetched",
               "type": "boolean"
            }
         },
         "title": "Outfits",
         "type": "object"
      },
      "SkillEntry": {
         "description": "Represents the character's skills.",
         "properties": {
            "name": {
               "title": "Name",
               "type": "string"
            },
            "level": {
               "title": "Level",
               "type": "integer"
            },
            "progress": {
               "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"
   ]
}

Config:
  • populate_by_name: bool = True

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

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)

  • 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.

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.

Auxiliary Classes

AchievementEntry

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": {
         "title": "Name",
         "type": "string"
      },
      "isSecret": {
         "title": "Issecret",
         "type": "boolean"
      }
   },
   "required": [
      "name",
      "isSecret"
   ]
}

Config:
  • populate_by_name: bool = True

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

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.

AuctionFilters

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,
         "title": "World"
      },
      "pvpType": {
         "anyOf": [
            {
               "enum": [
                  "OPEN_PVP",
                  "OPTIONAL_PVP",
                  "HARDCORE_PVP",
                  "RETRO_OPEN_PVP",
                  "RETRO_HARDCORE_PVP"
               ],
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Pvptype"
      },
      "battleye": {
         "anyOf": [
            {
               "enum": [
                  "INITIALLY_PROTECTED",
                  "PROTECTED",
                  "NOT_PROTECTED"
               ],
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Battleye"
      },
      "vocation": {
         "anyOf": [
            {
               "enum": [
                  "NONE",
                  "DRUID",
                  "KNIGHT",
                  "PALADIN",
                  "SORCERER"
               ],
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Vocation"
      },
      "minLevel": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Minlevel"
      },
      "maxLevel": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "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,
         "title": "Skill"
      },
      "minSkillLevel": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Minskilllevel"
      },
      "maxSkillLevel": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "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,
         "title": "Orderby"
      },
      "order": {
         "anyOf": [
            {
               "enum": [
                  "HIGHEST_LATEST",
                  "LOWEST_EARLIEST"
               ],
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Order"
      },
      "searchString": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Searchstring"
      },
      "searchType": {
         "anyOf": [
            {
               "enum": [
                  "ITEM_DEFAULT",
                  "ITEM_WILDCARD",
                  "CHARACTER_NAME"
               ],
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Searchtype"
      },
      "availableWorlds": {
         "default": [],
         "items": {
            "type": "string"
         },
         "title": "Availableworlds",
         "type": "array"
      }
   }
}

Config:
  • populate_by_name: bool = True

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

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.

BestiaryEntry

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": {
         "title": "Name",
         "type": "string"
      },
      "kills": {
         "title": "Kills",
         "type": "integer"
      },
      "step": {
         "title": "Step",
         "type": "integer"
      }
   },
   "required": [
      "name",
      "kills",
      "step"
   ]
}

Config:
  • populate_by_name: bool = True

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

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.

BlessingEntry

pydantic model tibiapy.models.BlessingEntry[source]

A character’s blessings.

Show JSON schema
{
   "title": "BlessingEntry",
   "description": "A character's blessings.",
   "type": "object",
   "properties": {
      "name": {
         "title": "Name",
         "type": "string"
      },
      "amount": {
         "title": "Amount",
         "type": "integer"
      }
   },
   "required": [
      "name",
      "amount"
   ]
}

Config:
  • populate_by_name: bool = True

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

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.

CharmsEntry

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": {
         "title": "Name",
         "type": "string"
      },
      "cost": {
         "title": "Cost",
         "type": "integer"
      }
   },
   "required": [
      "name",
      "cost"
   ]
}

Config:
  • populate_by_name: bool = True

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

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.

FamiliarEntry

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": {
         "title": "Imageurl",
         "type": "string"
      },
      "name": {
         "title": "Name",
         "type": "string"
      },
      "familiarId": {
         "title": "Familiarid",
         "type": "integer"
      }
   },
   "required": [
      "imageUrl",
      "name",
      "familiarId"
   ]
}

Config:
  • populate_by_name: bool = True

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

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.

ItemEntry

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": {
         "title": "Imageurl",
         "type": "string"
      },
      "name": {
         "title": "Name",
         "type": "string"
      },
      "description": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Description"
      },
      "count": {
         "default": 1,
         "title": "Count",
         "type": "integer"
      },
      "itemId": {
         "title": "Itemid",
         "type": "integer"
      },
      "tier": {
         "default": 0,
         "title": "Tier",
         "type": "integer"
      }
   },
   "required": [
      "imageUrl",
      "name",
      "itemId"
   ]
}

Config:
  • populate_by_name: bool = True

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

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.

MountEntry

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": {
         "title": "Imageurl",
         "type": "string"
      },
      "name": {
         "title": "Name",
         "type": "string"
      },
      "mountId": {
         "title": "Mountid",
         "type": "integer"
      }
   },
   "required": [
      "imageUrl",
      "name",
      "mountId"
   ]
}

Config:
  • populate_by_name: bool = True

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

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.

OutfitEntry

pydantic model tibiapy.models.OutfitEntry[source]

Represents a outfit owned or unlocked by the character.

Show JSON schema
{
   "title": "OutfitEntry",
   "description": "Represents a outfit owned or unlocked by the character.",
   "type": "object",
   "properties": {
      "outfitId": {
         "title": "Outfitid",
         "type": "integer"
      },
      "addons": {
         "title": "Addons",
         "type": "integer"
      },
      "imageUrl": {
         "title": "Imageurl",
         "type": "string"
      },
      "name": {
         "title": "Name",
         "type": "string"
      }
   },
   "required": [
      "outfitId",
      "addons",
      "imageUrl",
      "name"
   ]
}

Config:
  • populate_by_name: bool = True

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

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.

Familiars

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,
         "title": "Currentpage",
         "type": "integer"
      },
      "totalPages": {
         "default": 1,
         "title": "Totalpages",
         "type": "integer"
      },
      "resultsCount": {
         "default": 0,
         "title": "Resultscount",
         "type": "integer"
      },
      "entries": {
         "default": [],
         "items": {
            "$ref": "#/$defs/FamiliarEntry"
         },
         "title": "Entries",
         "type": "array"
      },
      "isFullyFetched": {
         "default": false,
         "title": "Isfullyfetched",
         "type": "boolean"
      }
   },
   "$defs": {
      "FamiliarEntry": {
         "description": "Represents a familiar owned or unlocked by the character.",
         "properties": {
            "imageUrl": {
               "title": "Imageurl",
               "type": "string"
            },
            "name": {
               "title": "Name",
               "type": "string"
            },
            "familiarId": {
               "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 0x7f9812b78670>

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 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

ItemSummary

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,
         "title": "Currentpage",
         "type": "integer"
      },
      "totalPages": {
         "default": 1,
         "title": "Totalpages",
         "type": "integer"
      },
      "resultsCount": {
         "default": 0,
         "title": "Resultscount",
         "type": "integer"
      },
      "entries": {
         "default": [],
         "items": {
            "$ref": "#/$defs/ItemEntry"
         },
         "title": "Entries",
         "type": "array"
      },
      "isFullyFetched": {
         "default": false,
         "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": {
               "title": "Imageurl",
               "type": "string"
            },
            "name": {
               "title": "Name",
               "type": "string"
            },
            "description": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Description"
            },
            "count": {
               "default": 1,
               "title": "Count",
               "type": "integer"
            },
            "itemId": {
               "title": "Itemid",
               "type": "integer"
            },
            "tier": {
               "default": 0,
               "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 0x7f9812b78670>

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

Mounts

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,
         "title": "Currentpage",
         "type": "integer"
      },
      "totalPages": {
         "default": 1,
         "title": "Totalpages",
         "type": "integer"
      },
      "resultsCount": {
         "default": 0,
         "title": "Resultscount",
         "type": "integer"
      },
      "entries": {
         "default": [],
         "items": {
            "$ref": "#/$defs/MountEntry"
         },
         "title": "Entries",
         "type": "array"
      },
      "isFullyFetched": {
         "default": false,
         "title": "Isfullyfetched",
         "type": "boolean"
      }
   },
   "$defs": {
      "MountEntry": {
         "description": "Represents a mount owned or unlocked by the character.",
         "properties": {
            "imageUrl": {
               "title": "Imageurl",
               "type": "string"
            },
            "name": {
               "title": "Name",
               "type": "string"
            },
            "mountId": {
               "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 0x7f9812b78670>

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

OutfitImage

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": {
         "title": "Outfitid",
         "type": "integer"
      },
      "addons": {
         "title": "Addons",
         "type": "integer"
      },
      "imageUrl": {
         "title": "Imageurl",
         "type": "string"
      }
   },
   "required": [
      "outfitId",
      "addons",
      "imageUrl"
   ]
}

Config:
  • populate_by_name: bool = True

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

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.

Outfits

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,
         "title": "Currentpage",
         "type": "integer"
      },
      "totalPages": {
         "default": 1,
         "title": "Totalpages",
         "type": "integer"
      },
      "resultsCount": {
         "default": 0,
         "title": "Resultscount",
         "type": "integer"
      },
      "entries": {
         "default": [],
         "items": {
            "$ref": "#/$defs/OutfitEntry"
         },
         "title": "Entries",
         "type": "array"
      },
      "isFullyFetched": {
         "default": false,
         "title": "Isfullyfetched",
         "type": "boolean"
      }
   },
   "$defs": {
      "OutfitEntry": {
         "description": "Represents a outfit owned or unlocked by the character.",
         "properties": {
            "outfitId": {
               "title": "Outfitid",
               "type": "integer"
            },
            "addons": {
               "title": "Addons",
               "type": "integer"
            },
            "imageUrl": {
               "title": "Imageurl",
               "type": "string"
            },
            "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 0x7f9812b78670>

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

SalesArgument

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": {
         "title": "Categoryimage",
         "type": "string"
      },
      "content": {
         "title": "Content",
         "type": "string"
      }
   },
   "required": [
      "categoryId",
      "categoryImage",
      "content"
   ]
}

Config:
  • populate_by_name: bool = True

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

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.

SkillEntry

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": {
         "title": "Name",
         "type": "string"
      },
      "level": {
         "title": "Level",
         "type": "integer"
      },
      "progress": {
         "title": "Progress",
         "type": "number"
      }
   },
   "required": [
      "name",
      "level",
      "progress"
   ]
}

Config:
  • populate_by_name: bool = True

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

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.

Kill Statistics

KillStatistics

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": {
         "title": "World",
         "type": "string"
      },
      "entries": {
         "additionalProperties": {
            "$ref": "#/$defs/RaceEntry"
         },
         "title": "Entries",
         "type": "object"
      },
      "total": {
         "$ref": "#/$defs/RaceEntry"
      },
      "availableWorlds": {
         "items": {
            "type": "string"
         },
         "title": "Availableworlds",
         "type": "array"
      }
   },
   "$defs": {
      "RaceEntry": {
         "description": "Represents the statistics of a race.",
         "properties": {
            "lastDayKilled": {
               "title": "Lastdaykilled",
               "type": "integer"
            },
            "lastDayPlayersKilled": {
               "title": "Lastdayplayerskilled",
               "type": "integer"
            },
            "lastWeekKilled": {
               "title": "Lastweekkilled",
               "type": "integer"
            },
            "lastWeekPlayersKilled": {
               "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 0x7f9812b78670>

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.

RaceEntry

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": {
         "title": "Lastdaykilled",
         "type": "integer"
      },
      "lastDayPlayersKilled": {
         "title": "Lastdayplayerskilled",
         "type": "integer"
      },
      "lastWeekKilled": {
         "title": "Lastweekkilled",
         "type": "integer"
      },
      "lastWeekPlayersKilled": {
         "title": "Lastweekplayerskilled",
         "type": "integer"
      }
   },
   "required": [
      "lastDayKilled",
      "lastDayPlayersKilled",
      "lastWeekKilled",
      "lastWeekPlayersKilled"
   ]
}

Config:
  • populate_by_name: bool = True

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

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

CreaturesSection

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"
      },
      "creatures": {
         "items": {
            "$ref": "#/$defs/CreatureEntry"
         },
         "title": "Creatures",
         "type": "array"
      }
   },
   "$defs": {
      "CreatureEntry": {
         "description": "Represents a creature in the Library section.",
         "properties": {
            "name": {
               "title": "Name",
               "type": "string"
            },
            "identifier": {
               "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 0x7f9812b78670>

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.

Creature

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": {
         "title": "Name",
         "type": "string"
      },
      "identifier": {
         "title": "Identifier",
         "type": "string"
      },
      "description": {
         "title": "Description",
         "type": "string"
      },
      "hitpoints": {
         "title": "Hitpoints",
         "type": "integer"
      },
      "experience": {
         "title": "Experience",
         "type": "integer"
      },
      "immuneTo": {
         "items": {
            "type": "string"
         },
         "title": "Immuneto",
         "type": "array"
      },
      "weakAgainst": {
         "items": {
            "type": "string"
         },
         "title": "Weakagainst",
         "type": "array"
      },
      "strongAgainst": {
         "items": {
            "type": "string"
         },
         "title": "Strongagainst",
         "type": "array"
      },
      "loot": {
         "title": "Loot",
         "type": "string"
      },
      "manaCost": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "title": "Manacost"
      },
      "summonable": {
         "title": "Summonable",
         "type": "boolean"
      },
      "convinceable": {
         "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 0x7f9812b78670>

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.

CreatureEntry

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": {
         "title": "Name",
         "type": "string"
      },
      "identifier": {
         "title": "Identifier",
         "type": "string"
      }
   },
   "required": [
      "name",
      "identifier"
   ]
}

Config:
  • populate_by_name: bool = True

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

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.

BoostableBosses

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"
      },
      "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": {
               "title": "Name",
               "type": "string"
            },
            "identifier": {
               "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 0x7f9812b78670>

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.

BoostedCreatures

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"
      },
      "boss": {
         "$ref": "#/$defs/BossEntry"
      }
   },
   "$defs": {
      "BossEntry": {
         "description": "Represents a boss in the boostable bosses section in the Tibia.com library.",
         "properties": {
            "name": {
               "title": "Name",
               "type": "string"
            },
            "identifier": {
               "title": "Identifier",
               "type": "string"
            }
         },
         "required": [
            "name",
            "identifier"
         ],
         "title": "BossEntry",
         "type": "object"
      },
      "CreatureEntry": {
         "description": "Represents a creature in the Library section.",
         "properties": {
            "name": {
               "title": "Name",
               "type": "string"
            },
            "identifier": {
               "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 0x7f9812b78670>

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.

BossEntry

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": {
         "title": "Name",
         "type": "string"
      },
      "identifier": {
         "title": "Identifier",
         "type": "string"
      }
   },
   "required": [
      "name",
      "identifier"
   ]
}

Config:
  • populate_by_name: bool = True

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

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.

SpellsSection

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,
         "title": "Vocation"
      },
      "group": {
         "anyOf": [
            {
               "enum": [
                  "Attack",
                  "Healing",
                  "Support"
               ],
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Group"
      },
      "spellType": {
         "anyOf": [
            {
               "enum": [
                  "Instant",
                  "Rune"
               ],
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Spelltype"
      },
      "isPremium": {
         "anyOf": [
            {
               "type": "boolean"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Ispremium"
      },
      "sortBy": {
         "enum": [
            "name",
            "group",
            "type",
            "level",
            "mana",
            "price",
            "premium"
         ],
         "title": "Sortby",
         "type": "string"
      },
      "entries": {
         "items": {
            "$ref": "#/$defs/SpellEntry"
         },
         "title": "Entries",
         "type": "array"
      }
   },
   "$defs": {
      "SpellEntry": {
         "description": "A spell listed on the spells section.",
         "properties": {
            "identifier": {
               "title": "Identifier",
               "type": "string"
            },
            "name": {
               "title": "Name",
               "type": "string"
            },
            "words": {
               "title": "Words",
               "type": "string"
            },
            "group": {
               "enum": [
                  "Attack",
                  "Healing",
                  "Support"
               ],
               "title": "Group",
               "type": "string"
            },
            "spellType": {
               "enum": [
                  "Instant",
                  "Rune"
               ],
               "title": "Spelltype",
               "type": "string"
            },
            "expLevel": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Explevel"
            },
            "mana": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Mana"
            },
            "price": {
               "title": "Price",
               "type": "integer"
            },
            "isPremium": {
               "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 0x7f9812b78670>

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.

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.

Spell

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": {
         "title": "Identifier",
         "type": "string"
      },
      "name": {
         "title": "Name",
         "type": "string"
      },
      "words": {
         "title": "Words",
         "type": "string"
      },
      "group": {
         "enum": [
            "Attack",
            "Healing",
            "Support"
         ],
         "title": "Group",
         "type": "string"
      },
      "spellType": {
         "enum": [
            "Instant",
            "Rune"
         ],
         "title": "Spelltype",
         "type": "string"
      },
      "expLevel": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Explevel"
      },
      "mana": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Mana"
      },
      "price": {
         "title": "Price",
         "type": "integer"
      },
      "isPremium": {
         "title": "Ispremium",
         "type": "boolean"
      },
      "description": {
         "title": "Description",
         "type": "string"
      },
      "vocations": {
         "items": {
            "type": "string"
         },
         "title": "Vocations",
         "type": "array"
      },
      "cooldown": {
         "title": "Cooldown",
         "type": "integer"
      },
      "cooldownGroup": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Cooldowngroup"
      },
      "groupSecondary": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Groupsecondary"
      },
      "cooldownGroupSecondary": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Cooldowngroupsecondary"
      },
      "soulPoints": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Soulpoints"
      },
      "amount": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Amount"
      },
      "magicType": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Magictype"
      },
      "cities": {
         "items": {
            "type": "string"
         },
         "title": "Cities",
         "type": "array"
      },
      "rune": {
         "anyOf": [
            {
               "$ref": "#/$defs/Rune"
            },
            {
               "type": "null"
            }
         ],
         "default": null
      }
   },
   "$defs": {
      "Rune": {
         "description": "Information about runes created by spells.",
         "properties": {
            "name": {
               "title": "Name",
               "type": "string"
            },
            "vocations": {
               "items": {
                  "type": "string"
               },
               "title": "Vocations",
               "type": "array"
            },
            "group": {
               "enum": [
                  "Attack",
                  "Healing",
                  "Support"
               ],
               "title": "Group",
               "type": "string"
            },
            "expLevel": {
               "title": "Explevel",
               "type": "integer"
            },
            "mana": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Mana"
            },
            "magicLevel": {
               "title": "Magiclevel",
               "type": "integer"
            },
            "magicType": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "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 0x7f9812b78670>

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.

Rune

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": {
         "title": "Name",
         "type": "string"
      },
      "vocations": {
         "items": {
            "type": "string"
         },
         "title": "Vocations",
         "type": "array"
      },
      "group": {
         "enum": [
            "Attack",
            "Healing",
            "Support"
         ],
         "title": "Group",
         "type": "string"
      },
      "expLevel": {
         "title": "Explevel",
         "type": "integer"
      },
      "mana": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Mana"
      },
      "magicLevel": {
         "title": "Magiclevel",
         "type": "integer"
      },
      "magicType": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Magictype"
      }
   },
   "required": [
      "name",
      "vocations",
      "group",
      "expLevel",
      "magicLevel"
   ]
}

Config:
  • populate_by_name: bool = True

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

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.

SpellEntry

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": {
         "title": "Identifier",
         "type": "string"
      },
      "name": {
         "title": "Name",
         "type": "string"
      },
      "words": {
         "title": "Words",
         "type": "string"
      },
      "group": {
         "enum": [
            "Attack",
            "Healing",
            "Support"
         ],
         "title": "Group",
         "type": "string"
      },
      "spellType": {
         "enum": [
            "Instant",
            "Rune"
         ],
         "title": "Spelltype",
         "type": "string"
      },
      "expLevel": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Explevel"
      },
      "mana": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Mana"
      },
      "price": {
         "title": "Price",
         "type": "integer"
      },
      "isPremium": {
         "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 0x7f9812b78670>

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.

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 0x7f9812b78670>

classmethod construct(cls, _fields_set=None, **values)[source]
Return type:

Model

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:

`py data = self.model_dump(include=include, exclude=exclude, round_trip=True) data = {**data, **(update or {})} copied = self.model_validate(data) `

Parameters:
  • include (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to include in the copied model.

  • exclude (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to exclude in the copied model.

  • update (Dict[str, Any] | None) – 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:

Model

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(cls, obj)[source]
Return type:

Model

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. Behaves as if Config.extra = ‘allow’ was set since it adds all passed values

Parameters:
  • _fields_set (set[str] | None) – The set of field names accepted for the Model instance.

  • values (Any) – Trusted or pre-validated data dictionary.

Return type:

Model

Returns:

A new instance of the Model class with validated data.

model_copy(*, update=None, deep=False)[source]

Usage docs: https://docs.pydantic.dev/2.2/usage/serialization/#model_copy

Returns a copy of the model.

Parameters:
  • update (dict[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:

Model

Returns:

New model instance.

model_dump(*, mode='python', include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.2/usage/serialization/#modelmodel_dump

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

Parameters:
  • mode – The mode in which to_python should run. If mode is ‘json’, the dictionary will only contain JSON serializable types. If mode is ‘python’, the dictionary may contain any Python objects.

  • include – A list of fields to include in the output.

  • exclude – A list of fields to exclude from the output.

  • by_alias – Whether to use the field’s alias in the dictionary key if defined.

  • exclude_unset – Whether to exclude fields that are unset or None from the output.

  • exclude_defaults – Whether to exclude fields that are set to their default value from the output.

  • exclude_none – Whether to exclude fields that have a value of None from the output.

  • round_trip – Whether to enable serialization and deserialization round-trip support.

  • warnings – Whether to log warnings when invalid fields are encountered.

Returns:

A dictionary representation of the model.

model_dump_json(*, indent=None, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.2/usage/serialization/#modelmodel_dump_json

Generates a JSON representation of the model using Pydantic’s to_json method.

Parameters:
  • indent – Indentation to use in the JSON output. If None is passed, the output will be compact.

  • include – Field(s) to include in the JSON output. Can take either a string or set of strings.

  • exclude – Field(s) to exclude from the JSON output. Can take either a string or set of strings.

  • by_alias – Whether to serialize using field aliases.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that have the default value.

  • exclude_none – Whether to exclude fields that have a value of None.

  • round_trip – Whether to use serialization/deserialization between JSON and class instance.

  • warnings – Whether to show any warnings that occurred during serialization.

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')[source]

Generates a JSON schema for a model class.

Parameters:
  • by_alias – Whether to use attribute aliases or not.

  • ref_template – The reference template.

  • schema_generator – To override the logic used to generate the JSON schema, as a subclass of GenerateJsonSchema with your desired modifications

  • mode – The mode in which to generate the schema.

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 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.

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(_BaseModel__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 – Whether to force the rebuilding of the model schema, defaults to False.

  • raise_errors – Whether to raise errors, defaults to True.

  • _parent_namespace_depth – The depth level of the parent namespace, defaults to 2.

  • _types_namespace – The types namespace, defaults to 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, from_attributes=None, context=None)[source]

Validate a pydantic model instance.

Parameters:
  • obj (Any) – The object to validate.

  • strict (bool | None) – Whether to raise an exception on invalid fields.

  • from_attributes (bool | None) – Whether to extract data from object attributes.

  • context (dict[str, Any] | None) – Additional context to pass to the validator.

Raises:

ValidationError – If the object could not be validated.

Return type:

Model

Returns:

The validated model instance.

classmethod model_validate_json(json_data, *, strict=None, context=None)[source]

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.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

Raises:

ValueError – If json_data is not a JSON string.

classmethod parse_file(cls, path, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod parse_obj(cls, obj)[source]
Return type:

Model

classmethod parse_raw(cls, b, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod schema(cls, by_alias=True, ref_template='#/$defs/{model}')[source]
Return type:

Dict[str, Any]

classmethod schema_json(cls, *, by_alias=True, ref_template='#/$defs/{model}', **dumps_kwargs)[source]
Return type:

str

classmethod update_forward_refs(cls, **localns)[source]
Return type:

None

classmethod validate(cls, value)[source]
Return type:

Model

property model_computed_fields: dict[str, ComputedFieldInfo]

Get the computed fields of this model instance.

Returns:

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

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 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": {
         "title": "Announcementid",
         "type": "integer"
      }
   },
   "required": [
      "announcementId"
   ]
}

Config:
  • populate_by_name: bool = True

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

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": {
         "title": "Boardid",
         "type": "integer"
      }
   },
   "required": [
      "boardId"
   ]
}

Config:
  • populate_by_name: bool = True

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

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": {
         "title": "Name",
         "type": "string"
      }
   },
   "required": [
      "name"
   ]
}

Config:
  • populate_by_name: bool = True

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

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": {
         "title": "Name",
         "type": "string"
      }
   },
   "required": [
      "name"
   ]
}

Config:
  • populate_by_name: bool = True

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

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.

New 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": {
         "title": "Name",
         "type": "string"
      }
   },
   "required": [
      "name"
   ]
}

Config:
  • populate_by_name: bool = True

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

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": {
         "title": "Name",
         "type": "string"
      },
      "id": {
         "title": "Id",
         "type": "integer"
      },
      "world": {
         "title": "World",
         "type": "string"
      }
   },
   "required": [
      "name",
      "id",
      "world"
   ]
}

Config:
  • populate_by_name: bool = True

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

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": {
         "title": "Id",
         "type": "integer"
      },
      "category": {
         "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 0x7f9812b78670>

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": {
         "title": "Postid",
         "type": "integer"
      }
   },
   "required": [
      "postId"
   ]
}

Config:
  • populate_by_name: bool = True

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

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": {
         "title": "Threadid",
         "type": "integer"
      }
   },
   "required": [
      "threadId"
   ]
}

Config:
  • populate_by_name: bool = True

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

Fields:
  • thread_id (int)

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

The internal ID of the thread.

property url

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": {
         "title": "Name",
         "type": "string"
      },
      "isOnline": {
         "title": "Isonline",
         "type": "boolean"
      },
      "onlineCount": {
         "title": "Onlinecount",
         "type": "integer"
      },
      "location": {
         "enum": [
            "Europe",
            "North America",
            "South America"
         ],
         "title": "Location",
         "type": "string"
      },
      "pvpType": {
         "enum": [
            "Open PvP",
            "Optional PvP",
            "Retro Open PvP",
            "Retro Hardcore PvP",
            "Hardcore PvP"
         ],
         "title": "Pvptype",
         "type": "string"
      },
      "transferType": {
         "enum": [
            "regular",
            "blocked",
            "locked"
         ],
         "title": "Transfertype",
         "type": "string"
      },
      "isPremiumOnly": {
         "title": "Ispremiumonly",
         "type": "boolean"
      },
      "battleyeSince": {
         "anyOf": [
            {
               "format": "date",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Battleyesince"
      },
      "battleyeType": {
         "enum": [
            "UNPROTECTED",
            "PROTECTED",
            "INITIALLY_PROTECTED"
         ],
         "title": "Battleyetype",
         "type": "string"
      },
      "isExperimental": {
         "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 0x7f9812b78670>

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,
         "title": "Currentpage",
         "type": "integer"
      },
      "totalPages": {
         "default": 1,
         "title": "Totalpages",
         "type": "integer"
      },
      "resultsCount": {
         "default": 0,
         "title": "Resultscount",
         "type": "integer"
      },
      "entries": {
         "default": [],
         "items": {},
         "title": "Entries",
         "type": "array"
      }
   }
}

Config:
  • populate_by_name: bool = True

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

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,
         "title": "Currentpage",
         "type": "integer"
      },
      "totalPages": {
         "default": 1,
         "title": "Totalpages",
         "type": "integer"
      },
      "resultsCount": {
         "default": 0,
         "title": "Resultscount",
         "type": "integer"
      },
      "entries": {
         "default": [],
         "items": {},
         "title": "Entries",
         "type": "array"
      }
   }
}

Config:
  • populate_by_name: bool = True

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

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.

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,
         "title": "Currentpage",
         "type": "integer"
      },
      "totalPages": {
         "default": 1,
         "title": "Totalpages",
         "type": "integer"
      },
      "resultsCount": {
         "default": 0,
         "title": "Resultscount",
         "type": "integer"
      },
      "entries": {
         "default": [],
         "items": {},
         "title": "Entries",
         "type": "array"
      },
      "isFullyFetched": {
         "default": false,
         "title": "Isfullyfetched",
         "type": "boolean"
      }
   }
}

Config:
  • populate_by_name: bool = True

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

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.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:

page. (The HTML content of the) –

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 in order 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 (Optional[Set[NewsCategory]]) – The allowed categories to show. If left blank, all categories will be searched.

  • types (Optional[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[source]

Base exception for the tibiapy module.

All exceptions thrown by the module are inherited from this.

class tibiapy.InvalidContent(message, original=None)[source]

Exception thrown when the provided content is unrelated for the calling function.

This usually means that the content provided belongs to a different website or section of the website. This serves as a way to differentiate those cases from a parsing that returned no results (e.g. Character not found)

In some cases this can mean that Tibia.com’s format has changed and the library needs updating.

original

The original exception that caused this exception.

Type:

Exception

class tibiapy.NetworkError(message, original=None, fetching_time=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)[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)[source]

A subclass of NetworkError thrown when Tibia.com returns a 403 status code.

Tibia.com returns a 403 status code when it detects that too many requests are being done. This has its own subclass to let the user decide to treat this differently than other network errors.

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"
         },
         "default": {},
         "title": "Values Multiple",
         "type": "object"
      },
      "available_options": {
         "additionalProperties": {
            "additionalProperties": {
               "type": "string"
            },
            "type": "object"
         },
         "default": {},
         "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.

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

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

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 – A list of key-value pairs to add as query parameters. This allows passing multiple parameters with the same name.

  • kwargs – 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 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_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=HighscoresCategory.EXPERIENCE, vocation=HighscoresProfession.ALL, page=1, battleye_type=None, pvp_types=None)[source]

Get the Tibia.com URL of the highscores for the given parameters.

Parameters:
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:
  • 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