pokelance.models.abstract.utils.pokemons ⚓︎

AbilityEffectChange ⚓︎

Bases: BaseModel

An ability effect change resource.

Attributes:
  • effect_entries (List[Effect]) –

    The previous effect of this ability listed in different languages.

  • version_group (NamedResource) –

    The version group in which the previous effect of this ability originated.

to_dict() ⚓︎

Convert the model to a dict

Returns:
  • Dict[str, Any]

    The model as a dict.

Source code in pokelance/models/_base.py
Python
def to_dict(self) -> t.Dict[str, t.Any]:
    """Convert the model to a dict

    Returns
    -------
    typing.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(self)

AbilityFlavorText ⚓︎

Bases: BaseModel

An ability flavor text resource.

Attributes:
  • flavor_text (str) –

    The localized flavor text for an api resource in a specific language.

  • language (NamedResource) –

    The language this name is in.

  • version_group (NamedResource) –

    The version group that uses this flavor text.

to_dict() ⚓︎

Convert the model to a dict

Returns:
  • Dict[str, Any]

    The model as a dict.

Source code in pokelance/models/_base.py
Python
def to_dict(self) -> t.Dict[str, t.Any]:
    """Convert the model to a dict

    Returns
    -------
    typing.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(self)

AbilityPokemon ⚓︎

Bases: BaseModel

An ability pokemon resource.

Attributes:
  • is_hidden (bool) –

    Whether or not this a hidden ability for the referenced pokemon.

  • slot (int) –

    The slot this ability occupies in this pokemon species.

  • pokemon (NamedResource) –

    The pokemon this ability could belong to.

to_dict() ⚓︎

Convert the model to a dict

Returns:
  • Dict[str, Any]

    The model as a dict.

Source code in pokelance/models/_base.py
Python
def to_dict(self) -> t.Dict[str, t.Any]:
    """Convert the model to a dict

    Returns
    -------
    typing.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(self)

Animated ⚓︎

Bases: BaseSprite

A pokemon animated sprite resource.

to_dict() ⚓︎

Convert the model to a dict

Returns:
  • Dict[str, Any]

    The model as a dict.

Source code in pokelance/models/_base.py
Python
def to_dict(self) -> t.Dict[str, t.Any]:
    """Convert the model to a dict

    Returns
    -------
    typing.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(self)

AwesomeName ⚓︎

Bases: BaseModel

An awesome name resource.

Attributes:
  • awesome_name (str) –

    The localized "scientific" name for an API resource in a specific language.

  • language (NamedResource) –

    The language this "scientific" name is in.

to_dict() ⚓︎

Convert the model to a dict

Returns:
  • Dict[str, Any]

    The model as a dict.

Source code in pokelance/models/_base.py
Python
def to_dict(self) -> t.Dict[str, t.Any]:
    """Convert the model to a dict

    Returns
    -------
    typing.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(self)

BaseSprite ⚓︎

Bases: BaseModel

A pokemon sprite resource.

Attributes:
  • front_default (str) –

    The default depiction of this pokemon from the front in battle.

  • front_shiny (str) –

    The shiny depiction of this pokemon from the front in battle.

  • front_female (str) –

    The default depiction of female gender of this pokemon from the front in battle.

  • front_shiny_female (str) –

    The shiny depiction of female gender of this pokemon from the front in battle.

  • back_default (str) –

    The default depiction of this pokemon from the back in battle.

  • back_shiny (str) –

    The shiny depiction of this pokemon from the back in battle.

  • back_female (str) –

    The default depiction of female gender of this pokemon from the back in battle.

  • back_shiny_female (str) –

    The shiny depiction of female gender of this pokemon from the back in battle.

from_payload(payload) classmethod ⚓︎

Create a model from a payload

Parameters:
  • payload (Dict[str, Any]) –

    The payload to create the model from.

Returns:
  • BaseModel

    The model created from the payload.

Source code in pokelance/models/_base.py
Python
@classmethod
def from_payload(cls, payload: t.Dict[str, t.Any]) -> "BaseModel":
    """Create a model from a payload

    Parameters
    ----------
    payload: typing.Dict[str, Any]
        The payload to create the model from.

    Returns
    -------
    BaseModel
        The model created from the payload.
    """
    return cls(raw=payload)

to_dict() ⚓︎

Convert the model to a dict

Returns:
  • Dict[str, Any]

    The model as a dict.

Source code in pokelance/models/_base.py
Python
def to_dict(self) -> t.Dict[str, t.Any]:
    """Convert the model to a dict

    Returns
    -------
    typing.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(self)

DreamWorld ⚓︎

Bases: BaseModel

A dream world resource.

Attributes:
  • front_default (str) –

    The default depiction of this pokemon.

  • front_female (str) –

    The female depiction of this pokemon.

to_dict() ⚓︎

Convert the model to a dict

Returns:
  • Dict[str, Any]

    The model as a dict.

Source code in pokelance/models/_base.py
Python
def to_dict(self) -> t.Dict[str, t.Any]:
    """Convert the model to a dict

    Returns
    -------
    typing.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(self)

Generation ⚓︎

Bases: BaseModel

A generation resource.

GenerationI ⚓︎

Bases: Generation

A generation I resource.

Attributes:
  • red_blue (VersionSprite) –

    The red-blue depiction of this pokemon.

  • yellow (VersionSprite) –

    The yellow depiction of this pokemon.

to_dict() ⚓︎

Convert the model to a dict

Returns:
  • Dict[str, Any]

    The model as a dict.

Source code in pokelance/models/_base.py
Python
def to_dict(self) -> t.Dict[str, t.Any]:
    """Convert the model to a dict

    Returns
    -------
    typing.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(self)

GenerationII ⚓︎

Bases: Generation

A generation II resource.

Attributes:

to_dict() ⚓︎

Convert the model to a dict

Returns:
  • Dict[str, Any]

    The model as a dict.

Source code in pokelance/models/_base.py
Python
def to_dict(self) -> t.Dict[str, t.Any]:
    """Convert the model to a dict

    Returns
    -------
    typing.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(self)

GenerationIII ⚓︎

Bases: Generation

A generation III resource.

Attributes:
  • emerald (VersionSprite) –

    The emerald depiction of this pokemon.

  • firered_leafgreen (VersionSprite) –

    The firered-leafgreen depiction of this pokemon.

  • ruby_sapphire (VersionSprite) –

    The ruby-sapphire depiction of this pokemon.

to_dict() ⚓︎

Convert the model to a dict

Returns:
  • Dict[str, Any]

    The model as a dict.

Source code in pokelance/models/_base.py
Python
def to_dict(self) -> t.Dict[str, t.Any]:
    """Convert the model to a dict

    Returns
    -------
    typing.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(self)

GenerationIV ⚓︎

Bases: Generation

A generation IV resource.

Attributes:
  • diamond_pearl (VersionSprite) –

    The diamond-pearl depiction of this pokemon.

  • heartgold_soulsilver (VersionSprite) –

    The heartgold-soulsilver depiction of this pokemon.

  • platinum (VersionSprite) –

    The platinum depiction of this pokemon.

to_dict() ⚓︎

Convert the model to a dict

Returns:
  • Dict[str, Any]

    The model as a dict.

Source code in pokelance/models/_base.py
Python
def to_dict(self) -> t.Dict[str, t.Any]:
    """Convert the model to a dict

    Returns
    -------
    typing.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(self)

GenerationV ⚓︎

Bases: Generation

A generation V resource.

Attributes:
  • black_white (VersionSprite) –

    The black-white depiction of this pokemon.

to_dict() ⚓︎

Convert the model to a dict

Returns:
  • Dict[str, Any]

    The model as a dict.

Source code in pokelance/models/_base.py
Python
def to_dict(self) -> t.Dict[str, t.Any]:
    """Convert the model to a dict

    Returns
    -------
    typing.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(self)

GenerationVI ⚓︎

Bases: Generation

A generation VI resource.

Attributes:
  • omegaruby_alphasapphire (VersionSprite) –

    The omegaruby-alphasapphire depiction of this pokemon.

  • x_y (VersionSprite) –

    The x-y depiction of this pokemon.

to_dict() ⚓︎

Convert the model to a dict

Returns:
  • Dict[str, Any]

    The model as a dict.

Source code in pokelance/models/_base.py
Python
def to_dict(self) -> t.Dict[str, t.Any]:
    """Convert the model to a dict

    Returns
    -------
    typing.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(self)

GenerationVII ⚓︎

Bases: Generation

A generation VII resource.

Attributes:
  • icons (VersionSprite) –

    The icons depiction of this pokemon.

  • ultra_sun_ultra_moon (VersionSprite) –

    The ultra-sun-ultra-moon depiction of this pokemon.

to_dict() ⚓︎

Convert the model to a dict

Returns:
  • Dict[str, Any]

    The model as a dict.

Source code in pokelance/models/_base.py
Python
def to_dict(self) -> t.Dict[str, t.Any]:
    """Convert the model to a dict

    Returns
    -------
    typing.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(self)

GenerationVIII ⚓︎

Bases: Generation

A generation VIII resource.

Attributes:

to_dict() ⚓︎

Convert the model to a dict

Returns:
  • Dict[str, Any]

    The model as a dict.

Source code in pokelance/models/_base.py
Python
def to_dict(self) -> t.Dict[str, t.Any]:
    """Convert the model to a dict

    Returns
    -------
    typing.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(self)

Genus ⚓︎

Bases: BaseModel

A genus resource.

Attributes:
  • genus (str) –

    The localized genus for the referenced type in the specified language.

  • language (NamedResource) –

    The language this genus is in.

to_dict() ⚓︎

Convert the model to a dict

Returns:
  • Dict[str, Any]

    The model as a dict.

Source code in pokelance/models/_base.py
Python
def to_dict(self) -> t.Dict[str, t.Any]:
    """Convert the model to a dict

    Returns
    -------
    typing.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(self)

GrowthRateExperienceLevel ⚓︎

Bases: BaseModel

A growth rate experience level resource.

Attributes:
  • level (int) –

    The level gained.

  • experience (int) –

    The amount of experience required to reach the referenced level.

to_dict() ⚓︎

Convert the model to a dict

Returns:
  • Dict[str, Any]

    The model as a dict.

Source code in pokelance/models/_base.py
Python
def to_dict(self) -> t.Dict[str, t.Any]:
    """Convert the model to a dict

    Returns
    -------
    typing.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(self)

Home ⚓︎

Bases: BaseModel

A home resource.

Attributes:
  • front_default (str) –

    The default depiction of this pokemon.

  • front_female (str) –

    The female depiction of this pokemon.

  • front_shiny (str) –

    The shiny depiction of this pokemon.

  • front_shiny_female (str) –

    The shiny female depiction of this pokemon.

to_dict() ⚓︎

Convert the model to a dict

Returns:
  • Dict[str, Any]

    The model as a dict.

Source code in pokelance/models/_base.py
Python
def to_dict(self) -> t.Dict[str, t.Any]:
    """Convert the model to a dict

    Returns
    -------
    typing.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(self)

MoveBattleStylePreference ⚓︎

Bases: BaseModel

A move battle style preference resource.

Attributes:
  • low_hp_preference (int) –

    Chance of using the move, in percent, if HP is under one half.

  • high_hp_preference (int) –

    Chance of using the move, in percent, if HP is over one half.

  • move_battle_style (NamedResource) –

    The move battle style.

to_dict() ⚓︎

Convert the model to a dict

Returns:
  • Dict[str, Any]

    The model as a dict.

Source code in pokelance/models/_base.py
Python
def to_dict(self) -> t.Dict[str, t.Any]:
    """Convert the model to a dict

    Returns
    -------
    typing.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(self)

MoveStatAffectSets ⚓︎

Bases: BaseModel

A move stat affect sets resource.

Attributes:
  • increase (List[MoveStatAffect]) –

    A list of move stat affects.

  • decrease (List[MoveStatAffect]) –

    A list of move stat affects.

to_dict() ⚓︎

Convert the model to a dict

Returns:
  • Dict[str, Any]

    The model as a dict.

Source code in pokelance/models/_base.py
Python
def to_dict(self) -> t.Dict[str, t.Any]:
    """Convert the model to a dict

    Returns
    -------
    typing.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(self)

MoveStatEffect ⚓︎

Bases: BaseModel

A move stat effect resource.

Attributes:
  • change (int) –

    The maximum amount of change to the referenced stat.

  • move (NamedResource) –

    The move causing the effect.

to_dict() ⚓︎

Convert the model to a dict

Returns:
  • Dict[str, Any]

    The model as a dict.

Source code in pokelance/models/_base.py
Python
def to_dict(self) -> t.Dict[str, t.Any]:
    """Convert the model to a dict

    Returns
    -------
    typing.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(self)

NaturePokeathlonStatAffect ⚓︎

Bases: BaseModel

A nature pokeathlon stat affect resource.

Attributes:
  • max_change (int) –

    The maximum amount of change to the referenced stat.

  • nature (NamedResource) –

    The nature causing the change.

to_dict() ⚓︎

Convert the model to a dict

Returns:
  • Dict[str, Any]

    The model as a dict.

Source code in pokelance/models/_base.py
Python
def to_dict(self) -> t.Dict[str, t.Any]:
    """Convert the model to a dict

    Returns
    -------
    typing.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(self)

NaturePokeathlonStatAffectSet ⚓︎

Bases: BaseModel

A nature pokeathlon stat affect set resource.

Attributes:

to_dict() ⚓︎

Convert the model to a dict

Returns:
  • Dict[str, Any]

    The model as a dict.

Source code in pokelance/models/_base.py
Python
def to_dict(self) -> t.Dict[str, t.Any]:
    """Convert the model to a dict

    Returns
    -------
    typing.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(self)

NatureStatAffectSets ⚓︎

Bases: BaseModel

A nature stat affect sets resource.

Attributes:
  • increase (List[NatureStatAffect]) –

    A list of nature stat affects.

  • decrease (List[NatureStatAffect]) –

    A list of nature stat affects.

to_dict() ⚓︎

Convert the model to a dict

Returns:
  • Dict[str, Any]

    The model as a dict.

Source code in pokelance/models/_base.py
Python
def to_dict(self) -> t.Dict[str, t.Any]:
    """Convert the model to a dict

    Returns
    -------
    typing.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(self)

NatureStatChange ⚓︎

Bases: BaseModel

A nature stat change resource.

Attributes:
  • max_change (int) –

    The maximum amount of change to the referenced stat.

  • pokeathlon_stat (NamedResource) –

    The stat being affected.

to_dict() ⚓︎

Convert the model to a dict

Returns:
  • Dict[str, Any]

    The model as a dict.

Source code in pokelance/models/_base.py
Python
def to_dict(self) -> t.Dict[str, t.Any]:
    """Convert the model to a dict

    Returns
    -------
    typing.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(self)

OfficialArtwork ⚓︎

Bases: BaseModel

Official artwork for this Pokémon from Nintendo.

Attributes:
  • front_default (str) –

    The default depiction of this Pokémon from the official artwork.

  • front_shiny (str) –

    The shiny depiction of this Pokémon from the official artwork.

to_dict() ⚓︎

Convert the model to a dict

Returns:
  • Dict[str, Any]

    The model as a dict.

Source code in pokelance/models/_base.py
Python
def to_dict(self) -> t.Dict[str, t.Any]:
    """Convert the model to a dict

    Returns
    -------
    typing.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(self)

Other ⚓︎

Bases: BaseModel

Other sprites for this pokemon

Attributes:
  • dream_world (DreamWorld) –

    The dream world sprites for this pokemon

  • home (Home) –

    The home sprites for this pokemon

  • official_artwork (OfficialArtwork) –

    The official artwork sprites for this pokemon

  • showndown (ShowdownSprites) –

    The showdown sprites for this pokemon

to_dict() ⚓︎

Convert the model to a dict

Returns:
  • Dict[str, Any]

    The model as a dict.

Source code in pokelance/models/_base.py
Python
def to_dict(self) -> t.Dict[str, t.Any]:
    """Convert the model to a dict

    Returns
    -------
    typing.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(self)

PalParkEncounterArea ⚓︎

Bases: BaseModel

A pal park encounter area resource.

Attributes:
  • base_score (int) –

    The base score given to the player when the referenced Pokémon is caught during a pal park run.

  • rate (int) –

    The base rate for encountering the referenced Pokémon in this pal park area.

  • area (NamedResource) –

    The pal park area where this encounter happens.

to_dict() ⚓︎

Convert the model to a dict

Returns:
  • Dict[str, Any]

    The model as a dict.

Source code in pokelance/models/_base.py
Python
def to_dict(self) -> t.Dict[str, t.Any]:
    """Convert the model to a dict

    Returns
    -------
    typing.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(self)

PokemonAbility ⚓︎

Bases: BaseModel

A pokemon ability resource.

Attributes:
  • is_hidden (bool) –

    Whether or not this is a hidden ability.

  • slot (int) –

    The slot this ability occupies in this pokemon species.

  • ability (NamedResource) –

    The ability the pokemon may have.

to_dict() ⚓︎

Convert the model to a dict

Returns:
  • Dict[str, Any]

    The model as a dict.

Source code in pokelance/models/_base.py
Python
def to_dict(self) -> t.Dict[str, t.Any]:
    """Convert the model to a dict

    Returns
    -------
    typing.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(self)

PokemonAbilityPast ⚓︎

Bases: BaseModel

A pokemon ability past resource.

Attributes:

to_dict() ⚓︎

Convert the model to a dict

Returns:
  • Dict[str, Any]

    The model as a dict.

Source code in pokelance/models/_base.py
Python
def to_dict(self) -> t.Dict[str, t.Any]:
    """Convert the model to a dict

    Returns
    -------
    typing.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(self)

PokemonCries ⚓︎

Bases: BaseModel

A pokemon cries resource.

Attributes:
  • latest (str) –

    The latest cry of this pokemon based on newer games.

  • legacy (str) –

    The legacy cry of this pokemon based on older games. Usually from Gen 1 - 5.

to_dict() ⚓︎

Convert the model to a dict

Returns:
  • Dict[str, Any]

    The model as a dict.

Source code in pokelance/models/_base.py
Python
def to_dict(self) -> t.Dict[str, t.Any]:
    """Convert the model to a dict

    Returns
    -------
    typing.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(self)

PokemonFormSprites ⚓︎

Bases: BaseModel

A pokemon form sprites resource.

Attributes:
  • front_default (str) –

    The default depiction of this pokemon form from the front in battle.

  • front_shiny (str) –

    The shiny depiction of this pokemon form from the front in battle.

  • back_default (str) –

    The default depiction of this pokemon form from the back in battle.

  • back_shiny (str) –

    The shiny depiction of this pokemon form from the back in battle.

to_dict() ⚓︎

Convert the model to a dict

Returns:
  • Dict[str, Any]

    The model as a dict.

Source code in pokelance/models/_base.py
Python
def to_dict(self) -> t.Dict[str, t.Any]:
    """Convert the model to a dict

    Returns
    -------
    typing.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(self)

PokemonFormType ⚓︎

Bases: BaseModel

A pokemon form type resource.

Attributes:
  • slot (int) –

    The order the types are listed in.

  • type (NamedResource) –

    The type the referenced pokemon has.

to_dict() ⚓︎

Convert the model to a dict

Returns:
  • Dict[str, Any]

    The model as a dict.

Source code in pokelance/models/_base.py
Python
def to_dict(self) -> t.Dict[str, t.Any]:
    """Convert the model to a dict

    Returns
    -------
    typing.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(self)

PokemonHeldItem ⚓︎

Bases: BaseModel

A pokemon held item resource.

Attributes:

to_dict() ⚓︎

Convert the model to a dict

Returns:
  • Dict[str, Any]

    The model as a dict.

Source code in pokelance/models/_base.py
Python
def to_dict(self) -> t.Dict[str, t.Any]:
    """Convert the model to a dict

    Returns
    -------
    typing.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(self)

PokemonHeldItemVersion ⚓︎

Bases: BaseModel

A pokemon held item version resource.

Attributes:
  • rarity (int) –

    How often this item is held.

  • version (NamedResource) –

    The version this item is held in by the pokemon.

to_dict() ⚓︎

Convert the model to a dict

Returns:
  • Dict[str, Any]

    The model as a dict.

Source code in pokelance/models/_base.py
Python
def to_dict(self) -> t.Dict[str, t.Any]:
    """Convert the model to a dict

    Returns
    -------
    typing.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(self)

PokemonMove ⚓︎

Bases: BaseModel

A pokemon move resource.

Attributes:
  • move (NamedResource) –

    The move the referenced pokemon can learn.

  • version_group_details (List[PokemonMoveVersion]) –

    The details for the version group that this move can be learned in.

to_dict() ⚓︎

Convert the model to a dict

Returns:
  • Dict[str, Any]

    The model as a dict.

Source code in pokelance/models/_base.py
Python
def to_dict(self) -> t.Dict[str, t.Any]:
    """Convert the model to a dict

    Returns
    -------
    typing.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(self)

PokemonMoveVersion ⚓︎

Bases: BaseModel

A pokemon move version resource.

Attributes:
  • move_learn_method (NamedResource) –

    The method by which the move is learned.

  • version_group (NamedResource) –

    The version group in which the move is learned.

  • level_learned_at (int) –

    The minimum level to learn the move.

to_dict() ⚓︎

Convert the model to a dict

Returns:
  • Dict[str, Any]

    The model as a dict.

Source code in pokelance/models/_base.py
Python
def to_dict(self) -> t.Dict[str, t.Any]:
    """Convert the model to a dict

    Returns
    -------
    typing.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(self)

PokemonSpeciesDexEntry ⚓︎

Bases: BaseModel

A pokemon species dex entry resource.

Attributes:
  • entry_number (int) –

    The index number within the Pokédex.

  • pokedex (NamedResource) –

    The Pokédex the referenced Pokémon species can be found in.

to_dict() ⚓︎

Convert the model to a dict

Returns:
  • Dict[str, Any]

    The model as a dict.

Source code in pokelance/models/_base.py
Python
def to_dict(self) -> t.Dict[str, t.Any]:
    """Convert the model to a dict

    Returns
    -------
    typing.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(self)

PokemonSpeciesGender ⚓︎

Bases: BaseModel

A pokemon species gender resource.

Attributes:
  • rate (int) –

    The chance of a particular gender in this pokemon species.

  • pokemon_species (NamedResource) –

    The pokemon species here.

to_dict() ⚓︎

Convert the model to a dict

Returns:
  • Dict[str, Any]

    The model as a dict.

Source code in pokelance/models/_base.py
Python
def to_dict(self) -> t.Dict[str, t.Any]:
    """Convert the model to a dict

    Returns
    -------
    typing.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(self)

PokemonSpeciesVariety ⚓︎

Bases: BaseModel

A pokemon species variety resource.

Attributes:
  • is_default (bool) –

    Whether this variety is the default variety.

  • pokemon (NamedResource) –

    The Pokémon variety.

to_dict() ⚓︎

Convert the model to a dict

Returns:
  • Dict[str, Any]

    The model as a dict.

Source code in pokelance/models/_base.py
Python
def to_dict(self) -> t.Dict[str, t.Any]:
    """Convert the model to a dict

    Returns
    -------
    typing.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(self)

PokemonSprite ⚓︎

Bases: BaseSprite

A pokemon sprite resource.

Attributes:
  • other (Other) –

    A set of sprites used tin official artwork, home.

  • versions (Versions) –

    A set of sprites used to depict this Pokémon in the game.

to_dict() ⚓︎

Convert the model to a dict

Returns:
  • Dict[str, Any]

    The model as a dict.

Source code in pokelance/models/_base.py
Python
def to_dict(self) -> t.Dict[str, t.Any]:
    """Convert the model to a dict

    Returns
    -------
    typing.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(self)

PokemonStat ⚓︎

Bases: BaseModel

A pokemon stat resource.

Attributes:
  • stat (NamedResource) –

    The stat the referenced pokemon has.

  • effort (int) –

    The effort points (EV) the referenced pokemon has in the stat.

  • base_stat (int) –

    The base value of the stat.

to_dict() ⚓︎

Convert the model to a dict

Returns:
  • Dict[str, Any]

    The model as a dict.

Source code in pokelance/models/_base.py
Python
def to_dict(self) -> t.Dict[str, t.Any]:
    """Convert the model to a dict

    Returns
    -------
    typing.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(self)

PokemonType ⚓︎

Bases: BaseModel

A pokemon type resource.

Attributes:
  • slot (int) –

    The order the types are listed in.

  • type (NamedResource) –

    The type the referenced pokemon has.

to_dict() ⚓︎

Convert the model to a dict

Returns:
  • Dict[str, Any]

    The model as a dict.

Source code in pokelance/models/_base.py
Python
def to_dict(self) -> t.Dict[str, t.Any]:
    """Convert the model to a dict

    Returns
    -------
    typing.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(self)

PokemonTypePast ⚓︎

Bases: BaseModel

A pokemon type past resource.

Attributes:

to_dict() ⚓︎

Convert the model to a dict

Returns:
  • Dict[str, Any]

    The model as a dict.

Source code in pokelance/models/_base.py
Python
def to_dict(self) -> t.Dict[str, t.Any]:
    """Convert the model to a dict

    Returns
    -------
    typing.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(self)

ShowdownSprites ⚓︎

Bases: BaseSprite

Showdown sprites.

As of now pokeapi doesn't include showdown sprites in their API payload. But they are available in their sprites repository.

to_dict() ⚓︎

Convert the model to a dict

Returns:
  • Dict[str, Any]

    The model as a dict.

Source code in pokelance/models/_base.py
Python
def to_dict(self) -> t.Dict[str, t.Any]:
    """Convert the model to a dict

    Returns
    -------
    typing.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(self)

TypePokemon ⚓︎

Bases: BaseModel

A type pokemon resource.

Attributes:
  • slot (int) –

    The order the Pokémon's types are listed in.

  • pokemon (NamedResource) –

    The Pokémon that has the referenced type.

to_dict() ⚓︎

Convert the model to a dict

Returns:
  • Dict[str, Any]

    The model as a dict.

Source code in pokelance/models/_base.py
Python
def to_dict(self) -> t.Dict[str, t.Any]:
    """Convert the model to a dict

    Returns
    -------
    typing.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(self)

TypeRelations ⚓︎

Bases: BaseModel

A type relations resource.

Attributes:
  • no_damage_to (List[NamedResource]) –

    A list of types this type has no damage to.

  • half_damage_to (List[NamedResource]) –

    A list of types this type is half damage to.

  • double_damage_to (List[NamedResource]) –

    A list of types this type is double damage to.

  • no_damage_from (List[NamedResource]) –

    A list of types that have no damage to this type.

  • half_damage_from (List[NamedResource]) –

    A list of types that have half damage to this type.

  • double_damage_from (List[NamedResource]) –

    A list of types that have double damage to this type.

to_dict() ⚓︎

Convert the model to a dict

Returns:
  • Dict[str, Any]

    The model as a dict.

Source code in pokelance/models/_base.py
Python
def to_dict(self) -> t.Dict[str, t.Any]:
    """Convert the model to a dict

    Returns
    -------
    typing.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(self)

TypeRelationsPast ⚓︎

Bases: BaseModel

A type relations past resource.

Attributes:
  • generation (NamedResource) –

    The generation of this type relation.

  • damage_relations (TypeRelations) –

    The type relations for this generation.

to_dict() ⚓︎

Convert the model to a dict

Returns:
  • Dict[str, Any]

    The model as a dict.

Source code in pokelance/models/_base.py
Python
def to_dict(self) -> t.Dict[str, t.Any]:
    """Convert the model to a dict

    Returns
    -------
    typing.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(self)

VersionSprite ⚓︎

Bases: BaseSprite

A pokemon version sprite resource.

Attributes:
  • back_gray (str) –

    The gray depiction of this pokemon from the back in battle.

  • front_gray (str) –

    The gray depiction of this pokemon from the front in battle.

  • back_transperent (str) –

    The transparent depiction of this pokemon from the back in battle.

  • front_transperent (str) –

    The transparent depiction of this pokemon from the front in battle.

  • animated (Animated) –

    The animated depiction of this pokemon.

to_dict() ⚓︎

Convert the model to a dict

Returns:
  • Dict[str, Any]

    The model as a dict.

Source code in pokelance/models/_base.py
Python
def to_dict(self) -> t.Dict[str, t.Any]:
    """Convert the model to a dict

    Returns
    -------
    typing.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(self)

Versions ⚓︎

Bases: BaseModel

A sprite resource for all generations.

Attributes:
  • generation_i (GenerationI) –

    The generation I depiction of this pokemon.

  • generation_ii (GenerationII) –

    The generation II depiction of this pokemon.

  • generation_iii (GenerationIII) –

    The generation III depiction of this pokemon.

  • generation_iv (GenerationIV) –

    The generation IV depiction of this pokemon.

  • generation_v (GenerationV) –

    The generation V depiction of this pokemon.

  • generation_vi (GenerationVI) –

    The generation VI depiction of this pokemon.

  • generation_vii (GenerationVII) –

    The generation VII depiction of this pokemon.

  • generation_viii (GenerationVIII) –

    The generation VIII depiction of this pokemon.

to_dict() ⚓︎

Convert the model to a dict

Returns:
  • Dict[str, Any]

    The model as a dict.

Source code in pokelance/models/_base.py
Python
def to_dict(self) -> t.Dict[str, t.Any]:
    """Convert the model to a dict

    Returns
    -------
    typing.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(self)