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
    -------
    t.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(
        self, filter=attrs.filters.exclude(attrs.fields(BaseModel).raw), value_serializer=_serializer
    )

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
    -------
    t.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(
        self, filter=attrs.filters.exclude(attrs.fields(BaseModel).raw), value_serializer=_serializer
    )

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
    -------
    t.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(
        self, filter=attrs.filters.exclude(attrs.fields(BaseModel).raw), value_serializer=_serializer
    )

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
    -------
    t.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(
        self, filter=attrs.filters.exclude(attrs.fields(BaseModel).raw), value_serializer=_serializer
    )

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
    -------
    t.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(
        self, filter=attrs.filters.exclude(attrs.fields(BaseModel).raw), value_serializer=_serializer
    )

BaseSprite ⚓︎

Bases: BaseModel

A pokemon sprite resource.

Attributes:

Name Type Description
front_default Optional[str]

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

front_shiny Optional[str]

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

front_female Optional[str]

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

front_shiny_female Optional[str]

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

back_default Optional[str]

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

back_shiny Optional[str]

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

back_female Optional[str]

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

back_shiny_female Optional[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: t.Type[_T], payload: t.Dict[str, t.Any]) -> _T:
    """Create a model from a payload

    Parameters
    ----------
    payload: t.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
    -------
    t.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(
        self, filter=attrs.filters.exclude(attrs.fields(BaseModel).raw), value_serializer=_serializer
    )

DreamWorld ⚓︎

Bases: BaseModel

A dream world resource.

Attributes:

Name Type Description
front_default Optional[str]

The default depiction of this pokemon.

front_female Optional[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
    -------
    t.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(
        self, filter=attrs.filters.exclude(attrs.fields(BaseModel).raw), value_serializer=_serializer
    )

Generation ⚓︎

Bases: BaseModel

A generation resource.

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: t.Type[_T], payload: t.Dict[str, t.Any]) -> _T:
    """Create a model from a payload

    Parameters
    ----------
    payload: t.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
    -------
    t.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(
        self, filter=attrs.filters.exclude(attrs.fields(BaseModel).raw), value_serializer=_serializer
    )

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
    -------
    t.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(
        self, filter=attrs.filters.exclude(attrs.fields(BaseModel).raw), value_serializer=_serializer
    )

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
    -------
    t.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(
        self, filter=attrs.filters.exclude(attrs.fields(BaseModel).raw), value_serializer=_serializer
    )

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
    -------
    t.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(
        self, filter=attrs.filters.exclude(attrs.fields(BaseModel).raw), value_serializer=_serializer
    )

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
    -------
    t.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(
        self, filter=attrs.filters.exclude(attrs.fields(BaseModel).raw), value_serializer=_serializer
    )

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
    -------
    t.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(
        self, filter=attrs.filters.exclude(attrs.fields(BaseModel).raw), value_serializer=_serializer
    )

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
    -------
    t.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(
        self, filter=attrs.filters.exclude(attrs.fields(BaseModel).raw), value_serializer=_serializer
    )

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
    -------
    t.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(
        self, filter=attrs.filters.exclude(attrs.fields(BaseModel).raw), value_serializer=_serializer
    )

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
    -------
    t.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(
        self, filter=attrs.filters.exclude(attrs.fields(BaseModel).raw), value_serializer=_serializer
    )

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
    -------
    t.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(
        self, filter=attrs.filters.exclude(attrs.fields(BaseModel).raw), value_serializer=_serializer
    )

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
    -------
    t.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(
        self, filter=attrs.filters.exclude(attrs.fields(BaseModel).raw), value_serializer=_serializer
    )

Home ⚓︎

Bases: BaseModel

A home resource.

Attributes:

Name Type Description
front_default Optional[str]

The default depiction of this pokemon.

front_female Optional[str]

The female depiction of this pokemon.

front_shiny Optional[str]

The shiny depiction of this pokemon.

front_shiny_female Optional[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
    -------
    t.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(
        self, filter=attrs.filters.exclude(attrs.fields(BaseModel).raw), value_serializer=_serializer
    )

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
    -------
    t.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(
        self, filter=attrs.filters.exclude(attrs.fields(BaseModel).raw), value_serializer=_serializer
    )

MoveStatAffect ⚓︎

Bases: BaseModel

A move stat affect 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
    -------
    t.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(
        self, filter=attrs.filters.exclude(attrs.fields(BaseModel).raw), value_serializer=_serializer
    )

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
    -------
    t.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(
        self, filter=attrs.filters.exclude(attrs.fields(BaseModel).raw), value_serializer=_serializer
    )

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
    -------
    t.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(
        self, filter=attrs.filters.exclude(attrs.fields(BaseModel).raw), value_serializer=_serializer
    )

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
    -------
    t.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(
        self, filter=attrs.filters.exclude(attrs.fields(BaseModel).raw), value_serializer=_serializer
    )

NatureStatAffectSets ⚓︎

Bases: BaseModel

A nature stat affect sets resource.

Attributes:

Name Type Description
increase List[NamedResource]

A list of nature stat affects.

decrease List[NamedResource]

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
    -------
    t.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(
        self, filter=attrs.filters.exclude(attrs.fields(BaseModel).raw), value_serializer=_serializer
    )

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
    -------
    t.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(
        self, filter=attrs.filters.exclude(attrs.fields(BaseModel).raw), value_serializer=_serializer
    )

OfficialArtwork ⚓︎

Bases: BaseModel

Official artwork for this Pokémon from Nintendo.

Attributes:

Name Type Description
front_default Optional[str]

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

front_shiny Optional[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
    -------
    t.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(
        self, filter=attrs.filters.exclude(attrs.fields(BaseModel).raw), value_serializer=_serializer
    )

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

showdown 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
    -------
    t.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(
        self, filter=attrs.filters.exclude(attrs.fields(BaseModel).raw), value_serializer=_serializer
    )

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
    -------
    t.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(
        self, filter=attrs.filters.exclude(attrs.fields(BaseModel).raw), value_serializer=_serializer
    )

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
    -------
    t.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(
        self, filter=attrs.filters.exclude(attrs.fields(BaseModel).raw), value_serializer=_serializer
    )

PokemonAbilityPast ⚓︎

Bases: BaseModel

A pokemon ability past resource.

Attributes:

Name Type Description
generation NamedResource

The generation this ability was introduced in.

abilities List[PokemonPastAbility]

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
    -------
    t.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(
        self, filter=attrs.filters.exclude(attrs.fields(BaseModel).raw), value_serializer=_serializer
    )

PokemonCries ⚓︎

Bases: BaseModel

A pokemon cries resource.

Attributes:

Name Type Description
latest Optional[str]

The latest cry of this pokemon based on newer games.

legacy Optional[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
    -------
    t.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(
        self, filter=attrs.filters.exclude(attrs.fields(BaseModel).raw), value_serializer=_serializer
    )

PokemonFormSprites ⚓︎

Bases: BaseModel

A pokemon form sprites resource.

Attributes:

Name Type Description
front_default Optional[str]

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

front_shiny Optional[str]

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

front_female Optional[str]

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

front_shiny_female Optional[str]

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

back_default Optional[str]

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

back_shiny Optional[str]

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

back_female Optional[str]

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

back_shiny_female Optional[str]

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

versions Versions

A set of sprites used to depict this Pokémon form 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
    -------
    t.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(
        self, filter=attrs.filters.exclude(attrs.fields(BaseModel).raw), value_serializer=_serializer
    )

PokemonFormTriggerCondition ⚓︎

Bases: BaseModel

A pokemon form trigger conditions resource.

Attributes:

Name Type Description
name str

The name of the condition.

trigger PokemonFormTriggerEnum

The trigger that causes this condition to be met.

url str

The url of the condition.

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
    -------
    t.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(
        self, filter=attrs.filters.exclude(attrs.fields(BaseModel).raw), value_serializer=_serializer
    )

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
    -------
    t.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(
        self, filter=attrs.filters.exclude(attrs.fields(BaseModel).raw), value_serializer=_serializer
    )

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
    -------
    t.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(
        self, filter=attrs.filters.exclude(attrs.fields(BaseModel).raw), value_serializer=_serializer
    )

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
    -------
    t.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(
        self, filter=attrs.filters.exclude(attrs.fields(BaseModel).raw), value_serializer=_serializer
    )

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
    -------
    t.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(
        self, filter=attrs.filters.exclude(attrs.fields(BaseModel).raw), value_serializer=_serializer
    )

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.

order Optional[int]

Order by which the pokemon will learn the move. A newly learnt move will replace the move with lowest order.

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
    -------
    t.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(
        self, filter=attrs.filters.exclude(attrs.fields(BaseModel).raw), value_serializer=_serializer
    )

PokemonPastAbility ⚓︎

Bases: BaseModel

A pokemon past 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 Optional[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
    -------
    t.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(
        self, filter=attrs.filters.exclude(attrs.fields(BaseModel).raw), value_serializer=_serializer
    )

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
    -------
    t.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(
        self, filter=attrs.filters.exclude(attrs.fields(BaseModel).raw), value_serializer=_serializer
    )

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
    -------
    t.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(
        self, filter=attrs.filters.exclude(attrs.fields(BaseModel).raw), value_serializer=_serializer
    )

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
    -------
    t.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(
        self, filter=attrs.filters.exclude(attrs.fields(BaseModel).raw), value_serializer=_serializer
    )

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
    -------
    t.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(
        self, filter=attrs.filters.exclude(attrs.fields(BaseModel).raw), value_serializer=_serializer
    )

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
    -------
    t.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(
        self, filter=attrs.filters.exclude(attrs.fields(BaseModel).raw), value_serializer=_serializer
    )

PokemonStatPast ⚓︎

Bases: BaseModel

A pokemon stat past resource.

Attributes:

Name Type Description
generation NamedResource

The last generation in which the referenced pokémon had the listed stats.

stats List[PokemonStat]

The stat the Pokémon had up to and including the listed 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
    -------
    t.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(
        self, filter=attrs.filters.exclude(attrs.fields(BaseModel).raw), value_serializer=_serializer
    )

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
    -------
    t.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(
        self, filter=attrs.filters.exclude(attrs.fields(BaseModel).raw), value_serializer=_serializer
    )

PokemonTypePast ⚓︎

Bases: BaseModel

A pokemon type past resource.

Attributes:

Name Type Description
generation NamedResource

The generation this type was introduced in.

types List[PokemonType]

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
    -------
    t.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(
        self, filter=attrs.filters.exclude(attrs.fields(BaseModel).raw), value_serializer=_serializer
    )

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
    -------
    t.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(
        self, filter=attrs.filters.exclude(attrs.fields(BaseModel).raw), value_serializer=_serializer
    )

TypeIcon ⚓︎

Bases: BaseModel

A type icon version sprite resource.

Attributes:

Name Type Description
name_icon Optional[str]

The name icon of this type.

symbol_icon Optional[str]

The symbol icon of 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
    -------
    t.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(
        self, filter=attrs.filters.exclude(attrs.fields(BaseModel).raw), value_serializer=_serializer
    )

TypeIconGeneration ⚓︎

Bases: BaseModel

A type icon generation resource.

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: t.Type[_T], payload: t.Dict[str, t.Any]) -> _T:
    """Create a model from a payload

    Parameters
    ----------
    payload: t.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
    -------
    t.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(
        self, filter=attrs.filters.exclude(attrs.fields(BaseModel).raw), value_serializer=_serializer
    )

TypeIconGenerationIII ⚓︎

Bases: TypeIconGeneration

A type icon generation III resource.

Attributes:

Name Type Description
colosseum TypeIcon

The colosseum depiction of this type.

emerald TypeIcon

The emerald depiction of this type.

firered_leafgreen TypeIcon

The fire red and leaf green depiction of this type.

ruby_sapphire TypeIcon

The ruby and sapphire depiction of this type.

xd TypeIcon

The xd depiction of 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
    -------
    t.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(
        self, filter=attrs.filters.exclude(attrs.fields(BaseModel).raw), value_serializer=_serializer
    )

TypeIconGenerationIV ⚓︎

Bases: TypeIconGeneration

A type icon generation IV resource.

Attributes:

Name Type Description
diamond_pearl TypeIcon

The diamond and pearl depiction of this type.

heartgold_soulsilver TypeIcon

The heart gold and soul silver depiction of this type.

platinum TypeIcon

The platinum depiction of 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
    -------
    t.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(
        self, filter=attrs.filters.exclude(attrs.fields(BaseModel).raw), value_serializer=_serializer
    )

TypeIconGenerationIX ⚓︎

Bases: TypeIconGeneration

A type icon generation IX resource.

Attributes:

Name Type Description
scarlet_violet TypeIcon

The scarlet and violet depiction of 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
    -------
    t.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(
        self, filter=attrs.filters.exclude(attrs.fields(BaseModel).raw), value_serializer=_serializer
    )

TypeIconGenerationV ⚓︎

Bases: TypeIconGeneration

A type icon generation V resource.

Attributes:

Name Type Description
black_white TypeIcon

The black and white depiction of this type.

black_2_white_2 TypeIcon

The black 2 and white 2 depiction of 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
    -------
    t.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(
        self, filter=attrs.filters.exclude(attrs.fields(BaseModel).raw), value_serializer=_serializer
    )

TypeIconGenerationVI ⚓︎

Bases: TypeIconGeneration

A type icon generation VI resource.

Attributes:

Name Type Description
x_y TypeIcon

The x and y depiction of this type.

omega_ruby_alpha_sapphire TypeIcon

The omega ruby and alpha sapphire depiction of 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
    -------
    t.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(
        self, filter=attrs.filters.exclude(attrs.fields(BaseModel).raw), value_serializer=_serializer
    )

TypeIconGenerationVII ⚓︎

Bases: TypeIconGeneration

A type icon generation VII resource.

Attributes:

Name Type Description
sun_moon TypeIcon

The sun and moon depiction of this type.

ultra_sun_ultra_moon TypeIcon

The ultra sun and ultra moon depiction of this type.

lets_go_pikachu_lets_go_eevee TypeIcon

The let's go pikachu and let's go eevee depiction of 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
    -------
    t.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(
        self, filter=attrs.filters.exclude(attrs.fields(BaseModel).raw), value_serializer=_serializer
    )

TypeIconGenerationVIII ⚓︎

Bases: TypeIconGeneration

A type icon generation VIII resource.

Attributes:

Name Type Description
sword_shield TypeIcon

The sword and shield depiction of this type.

brilliant_diamond_shining_pearl TypeIcon

The brilliant diamond and shining pearl depiction of this type.

legends_arceus TypeIcon

The legends arceus depiction of 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
    -------
    t.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(
        self, filter=attrs.filters.exclude(attrs.fields(BaseModel).raw), value_serializer=_serializer
    )

TypeIcons ⚓︎

Bases: BaseModel

A type sprite versions resource.

Attributes:

Name Type Description
generation_iii TypeIconGenerationIII

The generation III depiction of this type.

generation_iv TypeIconGenerationIV

The generation IV depiction of this type.

generation_v TypeIconGenerationV

The generation V depiction of this type.

generation_vi TypeIconGenerationVI

The generation VI depiction of this type.

generation_vii TypeIconGenerationVII

The generation VII depiction of this type.

generation_viii TypeIconGenerationVIII

The generation VIII depiction of this type.

generation_ix TypeIconGenerationIX

The generation IX depiction of 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
    -------
    t.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(
        self, filter=attrs.filters.exclude(attrs.fields(BaseModel).raw), value_serializer=_serializer
    )

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
    -------
    t.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(
        self, filter=attrs.filters.exclude(attrs.fields(BaseModel).raw), value_serializer=_serializer
    )

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
    -------
    t.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(
        self, filter=attrs.filters.exclude(attrs.fields(BaseModel).raw), value_serializer=_serializer
    )

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
    -------
    t.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(
        self, filter=attrs.filters.exclude(attrs.fields(BaseModel).raw), value_serializer=_serializer
    )

VersionSprite ⚓︎

Bases: BaseSprite

A pokemon version sprite resource.

Attributes:

Name Type Description
back_gray Optional[str]

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

front_gray Optional[str]

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

back_transparent Optional[str]

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

front_transparent Optional[str]

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

back_shiny_transparent Optional[str]

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

front_shiny_transparent Optional[str]

The shiny 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
    -------
    t.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(
        self, filter=attrs.filters.exclude(attrs.fields(BaseModel).raw), value_serializer=_serializer
    )

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
    -------
    t.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(
        self, filter=attrs.filters.exclude(attrs.fields(BaseModel).raw), value_serializer=_serializer
    )

Comments