Skip to main content

PokéAPI

Project description

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.0.0
  • Generator version: 7.18.0
  • Build package: org.openapitools.codegen.languages.PythonClientCodegen For more information, please visit https://github.com/oapicf/pokeapi-clients

Requirements.

Python 3.9+

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pokeapiclient-2.0.0.tar.gz (164.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pokeapiclient-2.0.0-py3-none-any.whl (581.2 kB view details)

Uploaded Python 3

File details

Details for the file pokeapiclient-2.0.0.tar.gz.

File metadata

  • Download URL: pokeapiclient-2.0.0.tar.gz
  • Upload date:
  • Size: 164.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for pokeapiclient-2.0.0.tar.gz
Algorithm Hash digest
SHA256 549999cde0a7bd50c7352d949e33dcbf661590ee05904e16983795576c605cee
MD5 9854a23e72db21d4233e6d9b6e7a262b
BLAKE2b-256 49d5f953d74e66b6affbff9609ec0f0c81f388e6fe7209acaea5262800b3e553

See more details on using hashes here.

File details

Details for the file pokeapiclient-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: pokeapiclient-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 581.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for pokeapiclient-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d37f3d42135b9f314d045613d4d5c5407fdf640cdb4d2178f9a37dc03ea068c5
MD5 b56fd9d343d5c5fe42b83ab86155393b
BLAKE2b-256 52437a26684c11c5d9f92f01572726046402392c7322c46538d056a57efb2371

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page