PokéAPI¶
The Unofficial Pokemon API for Python! Powered by:
If you have any problems: E-mail me at depianoman2004@gmail.com
Functions¶
-
def IDfromPokemon(name) This function returns the name of a Pokemon from its National Dex ID
Parameters: name – The name of the Pokemon - str
-
def PokemonfromID(pid) This function returns the National Dex ID from a Pokemon’s name
Parameters: pid – The National Dex ID of the Pokemon - int
-
def PokemonLearnset(name, generation) This function returns the Learnset in the form:
{ 1: [["Growl", 40, 0, 100, "Normal", "Status"], ["Tackle", 35, 40, 100, "Normal", "Physical"]], 7: ...} # Level: [[Move, PP, Power, Accuracy, Type, Status/Special/Physical], [Other Move...
Parameters: - name – The name of the Pokemon - str
- generation – The generation of game learnset is in - int
-
def PokemonLocations(name, game) This function returns the locations in
', '.join(["Location1", "Location2"])formParameters: - name – The name of the Pokemon - str
- game – The game you want the locations from - str
-
def PokemonTypes(name) This function returns a list of the types of the Pokemon
Parameters: name – The name of the Pokemon - str
-
def PokemonSprite(name) This function returns a URL of the Pokemon’s sprite
Parameters: name – The name of the Pokemon - str
-
def ShinyPokemonSprite(name) This function returns a URL of the Pokemon’s Shiny sprite
Parameters: name – The name of the Pokemon - str
-
def PokemonAbilities(name) This function returns a 3-element list of the Abilities a Pokemon has in the order:
[Ability1, Ability2, HiddenAbility]Parameters: name – The name of the Pokemon - str
Pokemon¶
-
def setPokemonByName(name, level) This sets what pokemon it is by name, and sets the level.
Parameters: - name – The name of the Pokemon - str
- level – The level of the Pokemon - int
-
def setPokemonByID(pid, level) This sets what pokemon it is by the Pokemon’s National Dex ID, and sets the level
Parameters: - id – The id of the Pokemon - int
- level – The level of the Pokemon - int
-
def setAbility(choice) This sets what ability the Pokemon has by the three possible choices:
- Ability 1
- Ability 2
- Hidden Ability
Parameters: choice – The chosen ability (can be 1,2, or"H") - int or str
-
def setLevel(level) This sets the level of the Pokemon
Parameters: level – The level of the Pokemon - int