Skip to content

Pokemon

pokelance.models.abstract.pokemon ⚓︎

Ability ⚓︎

Bases: BaseModel

Ability model.

Attributes:

Name Type Description
id int

The identifier for this ability resource.

name str

The name for this ability resource.

is_main_series bool

Whether or not this ability originated in the main series of the video games.

generation NamedResource

The generation this ability originated in.

names List[Name]

The name of this ability listed in different languages.

effect_entries List[VerboseEffect]

The effect of this ability listed in different languages.

effect_changes List[AbilityEffectChange]

The list of previous effects this ability has had across version groups of the games.

flavor_text_entries List[AbilityFlavorText]

The flavor text of this ability listed in different languages.

pokemon List[AbilityPokemon]

A list of Pokémon that could potentially have this 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)

Characteristic ⚓︎

Bases: BaseModel

Characteristic model.

Attributes:

Name Type Description
id int

The identifier for this characteristic resource.

gene_modulo int

The remainder of the highest stat/IV divided by 5.

possible_values List[int]

The possible values of the highest stat that would result in a Pokémon recieving this characteristic when divided by 5.

descriptions List[Description]

The descriptions of this characteristic listed in different languages.

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)

EggGroup ⚓︎

Bases: BaseModel

EggGroup model.

Attributes:

Name Type Description
id int

The identifier for this egg group resource.

name str

The name for this egg group resource.

names List[Name]

The name of this egg group listed in different languages.

pokemon_species List[NamedResource]

A list of all Pokémon species that are members of this egg group.

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)

Gender ⚓︎

Bases: BaseModel

Gender model.

Attributes:

Name Type Description
id int

The identifier for gender resource.

name str

The name for this gender resource.

pokemon_species_details List[PokemonSpeciesGender]

A list of Pokémon species that belong to this gender.

required_for_evolution List[NamedAPIResource]

A list of Pokémon species that required this gender in order for a Pokémon to evolve into them.

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)

GrowthRate ⚓︎

Bases: BaseModel

GrowthRate model.

Attributes:

Name Type Description
id int

The identifier for this growth rate resource.

name str

The name for this growth rate resource.

formula str

The formula used to calculate the rate at which the Pokémon species gains level.

descriptions List[Description]

The descriptions of this characteristic listed in different languages.

levels List[GrowthRateExperienceLevel]

A list of levels and the amount of experienced needed to atain them based on this growth rate.

pokemon_species List[NamedResource]

A list of Pokémon species that gain levels at this growth rate.

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)

LocationAreaEncounter ⚓︎

Bases: BaseModel

LocationAreaEncounter model.

Attributes:

Name Type Description
location_area NamedAPIResource

The location area the referenced Pokémon can be encountered in.

version_details List[VersionEncounterDetail]

A list of versions and encounters with the referenced Pokémon that might happen.

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)

Nature ⚓︎

Bases: BaseModel

Nature model.

Attributes:

Name Type Description
id int

The identifier for this nature resource.

name str

The name for this nature resource.

decreased_stat NamedAPIResource

The stat decreased by 10% in Pokémon with this nature.

increased_stat NamedAPIResource

The stat increased by 10% in Pokémon with this nature.

hates_flavor NamedAPIResource

The flavor hated by Pokémon with this nature.

likes_flavor NamedAPIResource

The flavor liked by Pokémon with this nature.

pokeathlon_stat_changes List[NatureStatChange]

A list of Pokéathlon stats this nature effects and how much it effects them.

move_battle_style_preferences List[MoveBattleStylePreference]

A list of battle styles and how likely a Pokémon with this nature is to use them in the Battle Palace or Battle Tent.

names List[Name]

The name of this nature listed in different languages.

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)

PokeathlonStat ⚓︎

Bases: BaseModel

PokeathlonStat model.

Attributes:

Name Type Description
id int

The identifier for this resource.

name str

The name for this resource.

names List[Name]

A list of natures which affect this Pokéathlon stat positively or negatively.

affecting_natures NaturePokeathlonStatAffectSets

A detail of natures which affect this Pokéathlon stat positively or negatively.

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)

Pokemon ⚓︎

Bases: BaseModel

Pokemon model.

Attributes:

Name Type Description
id int

The identifier for this Pokémon resource.

name str

The name for this Pokémon resource.

base_experience int

The base experience gained for defeating this Pokémon.

height int

The height of this Pokémon in decimetres.

is_default bool

Set for exactly one Pokémon used as the default for each species.

order int

Order for sorting. Almost national order, except families are grouped together.

weight int

The weight of this Pokémon in hectograms.

abilities List[PokemonAbility]

A list of abilities this Pokémon could potentially have.

forms List[NamedAPIResource]

A list of forms this Pokémon can take on.

game_indices List[VersionGameIndex]

A list of game indices relevent to Pokémon item by generation.

held_items List[PokemonHeldItem]

A list of items this Pokémon may be holding when encountered.

location_area_encounters str

Location area encounter details for different versions.

moves List[PokemonMove]

A list of details showing types this Pokémon has.

past_types List[PokemonTypePast]

A list of past types this Pokémon has had.

past_abilities List[PokemonAbilityPast]

A list of past abilities this Pokémon has had.

species NamedAPIResource

The species this Pokémon belongs to.

sprites PokemonSprites

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

cries PokemonCries

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

stats List[PokemonStat]

A list of details showing all the stats this Pokémon has.

types List[PokemonType]

A list of details showing types this Pokémon 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)

PokemonColor ⚓︎

Bases: BaseModel

PokemonColor model.

Attributes:

Name Type Description
id int

The identifier for this Pokémon color resource.

name str

The name for this Pokémon color resource.

names List[Name]

The name of this Pokémon color listed in different languages.

pokemon_species List[NamedAPIResource]

A list of the Pokémon species that have this color.

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)

PokemonForm ⚓︎

Bases: BaseModel

PokemonForm model.

Attributes:

Name Type Description
id int

The identifier for this Pokémon form resource.

name str

The name for this Pokémon form resource.

order int

The order in which forms should be sorted within all forms. Multiple forms may have equal order, in which case they should fall back on sorting by name.

form_order int

The order in which forms should be sorted within a species' forms.

is_default bool

True for exactly one form used as the default for each Pokémon.

is_battle_only bool

Whether or not this form can only happen during battle.

is_mega bool

Whether or not this form requires mega evolution.

form_name str

The name of this form.

pokemon NamedAPIResource

The Pokémon that can take on this form.

types List[PokemonType]

A list of details showing types this Pokémon form has.

sprites PokemonFormSprites

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

version_group NamedAPIResource

The version group this Pokémon form was introduced in.

names List[Name]

The form specific full name of this Pokémon form, or empty if the form does not have a specific name.

form_names List[Name]

The form specific form name of this Pokémon form, or empty if the form does not have a specific name.

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)

PokemonHabitats ⚓︎

Bases: BaseModel

PokemonHabitats model.

Attributes:

Name Type Description
id int

The identifier for this Pokémon habitat resource.

name str

The name for this Pokémon habitat resource.

names List[Name]

The name of this Pokémon habitat listed in different languages.

pokemon_species List[NamedAPIResource]

A list of the Pokémon species that can be found in this habitat.

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)

PokemonShape ⚓︎

Bases: BaseModel

PokemonShape model.

Attributes:

Name Type Description
id int

The identifier for this Pokémon shape resource.

name str

The name for this Pokémon shape resource.

awesome_names List[AwesomeName]

The "scientific" name of this Pokémon shape listed in different languages.

names List[Name]

The name of this Pokémon shape listed in different languages.

pokemon_species List[NamedAPIResource]

A list of the Pokémon species that have this shape.

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)

PokemonSpecies ⚓︎

Bases: BaseModel

PokemonSpecies model.

Attributes:

Name Type Description
id int

The identifier for this Pokémon species resource.

name str

The name for this Pokémon species resource.

order int

The order in which species should be sorted. Based on National Dex order, except families are grouped together and sorted by stage.

gender_rate int

The chance of this Pokémon being of a particular gender. Ratio is male to female. -1 for genderless.

capture_rate int

The base capture rate; up to 255. The higher the number, the easier the catch.

base_happiness int

The happiness when caught by a normal Pokéball; up to 255. The higher the number, the happier the Pokémon.

is_baby bool

Whether or not this is a baby Pokémon.

is_legendary bool

Whether or not this is a legendary Pokémon.

is_mythical bool

Whether or not this is a mythical Pokémon.

hatch_counter int

Initial hatch counter: one must walk 255 × (hatch_counter + 1) steps before this Pokémon's egg hatches, unless utilizing bonuses like Flame Body's.

has_gender_differences bool

Whether or not this Pokémon has visual differences due to gender.

forms_switchable bool

Whether or not this Pokémon has multiple forms and can switch between them.

growth_rate NamedAPIResource

The rate at which this Pokémon species gains levels.

pokedex_numbers List[PokemonSpeciesDexEntry]

A list of Pokedexes and the indexes reserved within them for this Pokémon species.

egg_groups List[NamedAPIResource]

A list of egg groups this Pokémon species is a member of.

color NamedAPIResource

The color of this Pokémon for Pokédex search.

shape NamedAPIResource

The shape of this Pokémon for Pokédex search.

evolves_from_species NamedAPIResource

The Pokémon species that evolves into this Pokemon_species.

evolution_chain APIResource

The evolution chain this Pokémon species is a member of.

habitat NamedAPIResource

The habitat this Pokémon species can be encountered in.

generation NamedAPIResource

The generation this Pokémon species was introduced in.

names List[Name]

The name of this Pokémon species listed in different languages.

pal_park_encounters List[PalParkEncounterArea]

A list of encounters that can be had with this Pokémon species in pal park.

flavor_text_entries List[FlavorText]

A list of flavor text entries for this Pokémon species.

form_descriptions List[Description]

A list of form description for this Pokémon species.

genera List[Genus]

A list of the genus of this Pokémon species listed in multiple languages.

varieties List[PokemonSpeciesVariety]

A list of the Pokémon that exist within this Pokémon species.

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)

Stat ⚓︎

Bases: BaseModel

A Pokémon stat model.

Attributes:

Name Type Description
id int

The identifier for this resource.

name str

The name for this resource.

game_index int

The stat order in which effects of this stat take place during battle.

is_battle_only bool

Whether this stat only exists within a battle.

affecting_moves MoveStatAffectSets

A detail of moves which affect this stat positively or negatively.

affecting_natures NatureStatAffectSets

A detail of natures which affect this stat positively or negatively.

characteristics List[Resource]

A list of characteristics that are set on a Pokémon when its highest base stat is this stat.

move_damage_class NamedResource

The class of damage this stat is directly related to.

names List[Name]

The name of this resource listed in different languages.

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)

Type ⚓︎

Bases: BaseModel

A Pokémon type model.

Attributes:

Name Type Description
id int

The identifier for this resource.

name str

The name for this resource.

damage_relations TypeRelations

A detail of how effective this type is toward others and vice versa.

past_damage_relations TypeRelationsPast

A detail of how effective this type was toward others and vice versa in previous generations.

game_indices List[GenerationGameIndex]

A list of game indices relevent to this item by generation.

generation NamedResource

The generation this type was introduced in.

move_damage_class NamedResource

The class of damage inflicted by this type.

names List[Name]

The name of this resource listed in different languages.

pokemon List[TypePokemon]

A list of details of Pokémon that have this type.

moves List[NamedResource]

A list of moves that have 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)