Pokemon
py_unite_db.models.Pokemon
Bases: BaseModel
Class representing a Pokemon.
See all Pokemon here on the unite-db website.
Get all pokemon from the API using
UniteDb.pokemon
.
Example
from py_unite_db import UniteDb unite_db = UniteDb()
unite_db.pokemon[0].name 'Absol' unite_db.pokemon[0].tier 'C'
Source code in py_unite_db/models/pokemon.py
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 |
|
damage_type: DamageType = Field(..., description='Physical or special attacker.')
class-attribute
instance-attribute
difficulty: Difficulty = Field(..., description='The in-game difficulty rating of the Pokemon.')
class-attribute
instance-attribute
evolution: list[Evolution] = Field([], description="List of the Pokemon's evolutions.")
class-attribute
instance-attribute
name: str = Field(..., description='Name of the Pokemon.')
class-attribute
instance-attribute
notes: str = Field('', description='Things to note about the Pokemon.')
class-attribute
instance-attribute
range: Range = Field(..., description='Ranged or Melee attacker.')
class-attribute
instance-attribute
role: Role = Field(..., description='The role of the Pokemon.')
class-attribute
instance-attribute
soon: bool = Field(..., description='Whether the Pokemon is coming soon or not.')
class-attribute
instance-attribute
stars: Optional[Stars] = Field(..., description='How many stars the pokemon has for each stat in the game.')
class-attribute
instance-attribute
stats: list[Stats] = Field([], description="This Pokemon's stats.")
class-attribute
instance-attribute
tier: Tier = Field(..., description='What tier unite-db consider this Pokemon to be.\n From S being the top tier, to D being the lowest.\n T is for Pokemon coming soon.')
class-attribute
instance-attribute
name_at(level: int) -> str
Gets the name of the pokemon at a given level.
This is only really useful if the Pokemon has evolutions. For example, Blastoise only becomes Blastoise at level 9.
Example
from py_unite_db import UniteDb UniteDb().pokemon[1].name 'Blastoise' UniteDb().pokemon[1].name_at(1) 'Squirtle' UniteDb().pokemon[1].name_at(5) 'Wartortle' UniteDb().pokemon[1].name_at(9) 'Blastoise'
If the level given is less than 1, gets level 1. If the level given is more than 15, gets level 15.
Source code in py_unite_db/models/pokemon.py
87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 |
|
stats_at(level: int) -> Stats
Gets stats at a given level between 1 and 15.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
level |
int
|
The level at which to get stats at. |
required |
Example
from py_unite_db import UniteDb UniteDb().pokemon[0].stats_at(7) Stats(hp=3823, attack=293, defense=109, sp_attack=47, sp_defense=76, crit=5, cooldown_reduction=10, lifesteal=0)
If the level given is less than 1, gets level 1. If the level given is more than 15, gets level 15.
Source code in py_unite_db/models/pokemon.py
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 |
|