Skip to content

Pokemons

pokelance.models.abstract.utils.pokemons ⚓︎

AbilityEffectChange ⚓︎

Bases: BaseModel

An ability effect change resource.

Attributes:

Name Type Description
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:

Type Description
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:

Name Type Description
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:

Type Description
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:

Name Type Description
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:

Type Description
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:

Type Description
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:

Name Type Description
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:

Type Description
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:

Name Type Description
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:

Name Type Description Default
payload Dict[str, Any]

The payload to create the model from.

required

Returns:

Type Description
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:

Type Description
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:

Name Type Description
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:

Type Description
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:

Name Type Description
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:

Type Description
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:

Name Type Description
crystal VersionSprite

The crystal depiction of this pokemon.

gold VersionSprite

The gold depiction of this pokemon.

silver VersionSprite

The silver depiction of this pokemon.

to_dict() ⚓︎

Convert the model to a dict

Returns:

Type Description
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:

Name Type Description
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:

Type Description
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:

Name Type Description
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:

Type Description
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:

Name Type Description
black_white VersionSprite

The black-white depiction of this pokemon.

to_dict() ⚓︎

Convert the model to a dict

Returns:

Type Description
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:

Name Type Description
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:

Type Description
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:

Name Type Description
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:

Type Description
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:

Name Type Description
icons VersionSprite

The icons depiction of this pokemon.

to_dict() ⚓︎

Convert the model to a dict

Returns:

Type Description
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:

Name Type Description
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:

Type Description
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:

Name Type Description
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:

Type Description
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:

Name Type Description
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:

Type Description
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:

Name Type Description
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:

Type Description
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:

Name Type Description
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:

Type Description
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:

Name Type Description
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:

Type Description
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:

Name Type Description
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:

Type Description
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:

Name Type Description
increase List[NaturePokeathlonStatAffect]

A list of natures and how they change the referenced pokeathlon stat.

decrease List[NaturePokeathlonStatAffect]

A list of natures and how they change the referenced pokeathlon stat.

to_dict() ⚓︎

Convert the model to a dict

Returns:

Type Description
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:

Name Type Description
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:

Type Description
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:

Name Type Description
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:

Type Description
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:

Name Type Description
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:

Type Description
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:

Name Type Description
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:

Type Description
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:

Name Type Description
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:

Type Description
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:

Name Type Description
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:

Type Description
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:

Name Type Description
generation NamedResource

The generation this ability was introduced in.

abilities List[NamedResource]

The name of the ability.

to_dict() ⚓︎

Convert the model to a dict

Returns:

Type Description
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:

Name Type Description
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:

Type Description
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:

Name Type Description
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:

Type Description
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:

Name Type Description
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:

Type Description
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:

Name Type Description
item NamedResource

The item the referenced pokemon holds.

version_details List[PokemonHeldItemVersion]

The details for the version that this item is held in by the pokemon.

to_dict() ⚓︎

Convert the model to a dict

Returns:

Type Description
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:

Name Type Description
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:

Type Description
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:

Name Type Description
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:

Type Description
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:

Name Type Description
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:

Type Description
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:

Name Type Description
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:

Type Description
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:

Name Type Description
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:

Type Description
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:

Name Type Description
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:

Type Description
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:

Name Type Description
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:

Type Description
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:

Name Type Description
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:

Type Description
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:

Name Type Description
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:

Type Description
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:

Name Type Description
generation NamedResource

The generation this type was introduced in.

types List[NamedResource]

The name of the type.

to_dict() ⚓︎

Convert the model to a dict

Returns:

Type Description
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:

Type Description
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:

Name Type Description
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:

Type Description
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:

Name Type Description
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:

Type Description
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:

Name Type Description
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:

Type Description
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:

Name Type Description
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:

Type Description
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:

Name Type Description
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:

Type Description
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)