Skip to main content

pokeapiclient

All the Pokémon data you'll ever need in one place, easily accessible through a modern free open-source RESTful API.

What is this?

This is a full RESTful API linked to an extensive database detailing everything about the Pokémon main game series.

We've covered everything from Pokémon to Berry Flavors.

Where do I start?

We have awesome documentation on how to use this API. It takes minutes to get started.

This API will always be publicly available and will never require any extensive setup process to consume.

Created by [Paul Hallett(]https://github.com/phalt) and other PokéAPI contributors* around the world. Pokémon and Pokémon character names are trademarks of Nintendo.

This Python package is automatically generated by the OpenAPI Generator project:

  • API version: 2.7.0
  • Package version: 2.1.0
  • Generator version: 7.24.0
  • Build package: org.openapitools.codegen.languages.PythonClientCodegen For more information, please visit https://github.com/oapicf/pokeapi-clients

Requirements.

Python 3.10+

Installation & Usage

pip install

If the python package is hosted on a repository, you can install directly using:

pip install git+https://github.com/oapicf/pokeapi-clients.git

(you may need to run pip with root permission: sudo pip install git+https://github.com/oapicf/pokeapi-clients.git)

Then import the package:

import pokeapiclient

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

import pokeapiclient

Tests

Execute pytest to run the tests.

Getting Started

Please follow the installation procedure and then run the following:

import pokeapiclient
from pokeapiclient.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://pokeapi.co
# See configuration.py for a list of all supported configuration parameters.
configuration = pokeapiclient.Configuration(
    host = "https://pokeapi.co"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure HTTP basic authorization: basicAuth
configuration = pokeapiclient.Configuration(
    username = os.environ["USERNAME"],
    password = os.environ["PASSWORD"]
)

# Configure API key authorization: cookieAuth
configuration.api_key['cookieAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['cookieAuth'] = 'Bearer'


# Enter a context with an instance of the API client
with pokeapiclient.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = pokeapiclient.BerriesApi(api_client)
    limit = 56 # int | Number of results to return per page. (optional)
    offset = 56 # int | The initial index from which to return the results. (optional)
    q = 'q_example' # str | > Only available locally and not at [pokeapi.co](https://pokeapi.co/docs/v2) Case-insensitive query applied on the `name` property.  (optional)

    try:
        # List berry firmness
        api_response = api_instance.berry_firmness_list(limit=limit, offset=offset, q=q)
        print("The response of BerriesApi->berry_firmness_list:\n")
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling BerriesApi->berry_firmness_list: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to https://pokeapi.co

Class Method HTTP request Description
BerriesApi berry_firmness_list GET /api/v2/berry-firmness/ List berry firmness
BerriesApi berry_firmness_retrieve GET /api/v2/berry-firmness/{id}/ Get berry by firmness
BerriesApi berry_flavor_list GET /api/v2/berry-flavor/ List berry flavors
BerriesApi berry_flavor_retrieve GET /api/v2/berry-flavor/{id}/ Get berries by flavor
BerriesApi berry_list GET /api/v2/berry/ List berries
BerriesApi berry_retrieve GET /api/v2/berry/{id}/ Get a berry
ContestsApi contest_effect_list GET /api/v2/contest-effect/ List contest effects
ContestsApi contest_effect_retrieve GET /api/v2/contest-effect/{id}/ Get contest effect
ContestsApi contest_type_list GET /api/v2/contest-type/ List contest types
ContestsApi contest_type_retrieve GET /api/v2/contest-type/{id}/ Get contest type
ContestsApi super_contest_effect_list GET /api/v2/super-contest-effect/ List super contest effects
ContestsApi super_contest_effect_retrieve GET /api/v2/super-contest-effect/{id}/ Get super contest effect
EncountersApi encounter_condition_list GET /api/v2/encounter-condition/ List encounter conditions
EncountersApi encounter_condition_retrieve GET /api/v2/encounter-condition/{id}/ Get encounter condition
EncountersApi encounter_condition_value_list GET /api/v2/encounter-condition-value/ List encounter condition values
EncountersApi encounter_condition_value_retrieve GET /api/v2/encounter-condition-value/{id}/ Get encounter condition value
EncountersApi encounter_method_list GET /api/v2/encounter-method/ List encounter methods
EncountersApi encounter_method_retrieve GET /api/v2/encounter-method/{id}/ Get encounter method
EvolutionApi evolution_chain_list GET /api/v2/evolution-chain/ List evolution chains
EvolutionApi evolution_chain_retrieve GET /api/v2/evolution-chain/{id}/ Get evolution chain
EvolutionApi evolution_trigger_list GET /api/v2/evolution-trigger/ List evolution triggers
EvolutionApi evolution_trigger_retrieve GET /api/v2/evolution-trigger/{id}/ Get evolution trigger
GamesApi generation_list GET /api/v2/generation/ List genrations
GamesApi generation_retrieve GET /api/v2/generation/{id}/ Get genration
GamesApi pokedex_list GET /api/v2/pokedex/ List pokedex
GamesApi pokedex_retrieve GET /api/v2/pokedex/{id}/ Get pokedex
GamesApi version_group_list GET /api/v2/version-group/ List version groups
GamesApi version_group_retrieve GET /api/v2/version-group/{id}/ Get version group
GamesApi version_list GET /api/v2/version/ List versions
GamesApi version_retrieve GET /api/v2/version/{id}/ Get version
ItemsApi item_attribute_list GET /api/v2/item-attribute/ List item attributes
ItemsApi item_attribute_retrieve GET /api/v2/item-attribute/{id}/ Get item attribute
ItemsApi item_category_list GET /api/v2/item-category/ List item categories
ItemsApi item_category_retrieve GET /api/v2/item-category/{id}/ Get item category
ItemsApi item_fling_effect_list GET /api/v2/item-fling-effect/ List item fling effects
ItemsApi item_fling_effect_retrieve GET /api/v2/item-fling-effect/{id}/ Get item fling effect
ItemsApi item_list GET /api/v2/item/ List items
ItemsApi item_pocket_list GET /api/v2/item-pocket/ List item pockets
ItemsApi item_pocket_retrieve GET /api/v2/item-pocket/{id}/ Get item pocket
ItemsApi item_retrieve GET /api/v2/item/{id}/ Get item
LocationApi location_area_list GET /api/v2/location-area/ List location areas
LocationApi location_area_retrieve GET /api/v2/location-area/{id}/ Get location area
LocationApi location_list GET /api/v2/location/ List locations
LocationApi location_retrieve GET /api/v2/location/{id}/ Get location
LocationApi pal_park_area_list GET /api/v2/pal-park-area/ List pal park areas
LocationApi pal_park_area_retrieve GET /api/v2/pal-park-area/{id}/ Get pal park area
LocationApi region_list GET /api/v2/region/ List regions
LocationApi region_retrieve GET /api/v2/region/{id}/ Get region
MachinesApi machine_list GET /api/v2/machine/ List machines
MachinesApi machine_retrieve GET /api/v2/machine/{id}/ Get machine
MovesApi move_ailment_list GET /api/v2/move-ailment/ List move meta ailments
MovesApi move_ailment_retrieve GET /api/v2/move-ailment/{id}/ Get move meta ailment
MovesApi move_battle_style_list GET /api/v2/move-battle-style/ List move battle styles
MovesApi move_battle_style_retrieve GET /api/v2/move-battle-style/{id}/ Get move battle style
MovesApi move_category_list GET /api/v2/move-category/ List move meta categories
MovesApi move_category_retrieve GET /api/v2/move-category/{id}/ Get move meta category
MovesApi move_learn_method_list GET /api/v2/move-learn-method/ List move learn methods
MovesApi move_learn_method_retrieve GET /api/v2/move-learn-method/{id}/ Get move learn method
MovesApi move_list GET /api/v2/move/ List moves
MovesApi move_retrieve GET /api/v2/move/{id}/ Get move
MovesApi move_target_list GET /api/v2/move-target/ List move targets
MovesApi move_target_retrieve GET /api/v2/move-target/{id}/ Get move target
PokemonApi ability_list GET /api/v2/ability/
PokemonApi ability_retrieve GET /api/v2/ability/{id}/
PokemonApi characteristic_list GET /api/v2/characteristic/ List charecterictics
PokemonApi characteristic_retrieve GET /api/v2/characteristic/{id}/ Get characteristic
PokemonApi egg_group_list GET /api/v2/egg-group/ List egg groups
PokemonApi egg_group_retrieve GET /api/v2/egg-group/{id}/ Get egg group
PokemonApi gender_list GET /api/v2/gender/ List genders
PokemonApi gender_retrieve GET /api/v2/gender/{id}/ Get gender
PokemonApi growth_rate_list GET /api/v2/growth-rate/ List growth rates
PokemonApi growth_rate_retrieve GET /api/v2/growth-rate/{id}/ Get growth rate
PokemonApi move_damage_class_list GET /api/v2/move-damage-class/ List move damage classes
PokemonApi move_damage_class_retrieve GET /api/v2/move-damage-class/{id}/ Get move damage class
PokemonApi nature_list GET /api/v2/nature/ List natures
PokemonApi nature_retrieve GET /api/v2/nature/{id}/ Get nature
PokemonApi pokeathlon_stat_list GET /api/v2/pokeathlon-stat/ List pokeathlon stats
PokemonApi pokeathlon_stat_retrieve GET /api/v2/pokeathlon-stat/{id}/ Get pokeathlon stat
PokemonApi pokemon_color_list GET /api/v2/pokemon-color/ List pokemon colors
PokemonApi pokemon_color_retrieve GET /api/v2/pokemon-color/{id}/ Get pokemon color
PokemonApi pokemon_form_list GET /api/v2/pokemon-form/ List pokemon forms
PokemonApi pokemon_form_retrieve GET /api/v2/pokemon-form/{id}/ Get pokemon form
PokemonApi pokemon_habitat_list GET /api/v2/pokemon-habitat/ List pokemom habitas
PokemonApi pokemon_habitat_retrieve GET /api/v2/pokemon-habitat/{id}/ Get pokemom habita
PokemonApi pokemon_list GET /api/v2/pokemon/ List pokemon
PokemonApi pokemon_retrieve GET /api/v2/pokemon/{id}/ Get pokemon
PokemonApi pokemon_shape_list GET /api/v2/pokemon-shape/ List pokemon shapes
PokemonApi pokemon_shape_retrieve GET /api/v2/pokemon-shape/{id}/ Get pokemon shape
PokemonApi pokemon_species_list GET /api/v2/pokemon-species/ List pokemon species
PokemonApi pokemon_species_retrieve GET /api/v2/pokemon-species/{id}/ Get pokemon species
PokemonApi stat_list GET /api/v2/stat/ List stats
PokemonApi stat_retrieve GET /api/v2/stat/{id}/ Get stat
PokemonApi type_list GET /api/v2/type/ List types
PokemonApi type_retrieve GET /api/v2/type/{id}/ Get types
UtilityApi language_list GET /api/v2/language/ List languages
UtilityApi language_retrieve GET /api/v2/language/{id}/ Get language

Documentation For Models

Documentation For Authorization

Authentication schemes defined for the API:

basicAuth

  • Type: HTTP basic authentication

cookieAuth

  • Type: API key
  • API key parameter name: sessionid
  • Location:

Author

blah+oapicf@cliffano.com

Metadata

Release files for pokeapiclient 2.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pokeapiclient 2.1.0
File Size Uploaded Provenance Actions
pokeapiclient-2.1.0.tar.gz 169.8 kB Without provenance Details for pokeapiclient-2.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pokeapiclient 2.1.0
File Interpreter ABI Platform Actions
pokeapiclient-2.1.0-py3-none-any.whl Python 3 none any Details for pokeapiclient-2.1.0-py3-none-any.whl

Total release size: 751.8 kB

Release files / pokeapiclient-2.1.0.tar.gz

Download URL pokeapiclient-2.1.0.tar.gz
Size 169.8 kB
Tags Source
SHA-256 checksum
How to use checksums
2689ff70f3abdc36c89547ed9029386e4a229f3bc798b5e1d97d21ad411780e7
BLAKE2b-256 checksum
How to use checksums
9424a8cd33dafeb7bd4c6e5bb9f8bad99e493f999fafd53c96a642c6998bfa18
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.14.4

Release files / pokeapiclient-2.1.0-py3-none-any.whl

Download URL pokeapiclient-2.1.0-py3-none-any.whl
Size 582.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d99667aac760d4ae9dbc6055ae8eb6cef800de80b24908d6cf544bcfe20264bb
BLAKE2b-256 checksum
How to use checksums
9266915d7606c64331f38b8f6e9f6afd5d8b11e7759ce200955badaf43007594
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.14.4

Security for pokeapiclient 2.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page