pokelance.models.abstract.evolution ⚓︎

Bases: BaseModel

A chain link resource.

Attributes:
  • is_baby (bool) –

    Whether or not this link is for a baby Pokémon.

  • species (NamedResource) –

    The Pokémon species at this point in the evolution chain.

  • evolution_details (List[EvolutionDetail]) –

    A list of details regarding the specific details of the referenced Pokémon species evolution.

  • evolves_to (List[ChainLink]) –

    A list of chain links.

to_dict() ⚓︎

Convert the model to a dict

Returns:
  • Dict[str, Any]

    The model as a dict.

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

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

EvolutionChain ⚓︎

Bases: BaseModel

Evolution chain model.

Attributes:
  • id (int) –

    The identifier for this resource.

  • baby_trigger_item (Optional[NamedResource]) –

    The item that a Pokémon would be holding when mating that would trigger the egg hatching a baby Pokémon rather than a basic Pokémon.

  • chain (ChainLink) –

    The base chain link object. Each link contains evolution details for a Pokémon in the chain. Each link references the next Pokémon in the natural evolution order.

to_dict() ⚓︎

Convert the model to a dict

Returns:
  • Dict[str, Any]

    The model as a dict.

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

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

EvolutionTrigger ⚓︎

Bases: BaseModel

Evolution trigger model.

Attributes:
  • id (int) –

    The identifier for this resource.

  • name (str) –

    The name for this resource.

  • names (List[Name]) –

    A list of name and language pairs for this resource.

  • pokemon_species (List[NamedResource]) –

    A list of pokemon species that result from this evolution trigger.

to_dict() ⚓︎

Convert the model to a dict

Returns:
  • Dict[str, Any]

    The model as a dict.

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

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