TersztyZsom / pokemon_api_sandbox

0 stars 0 forks source link

Pokémon Details Fetcher

This Python script leverages the PokéAPI to fetch and display details about Pokémon based on their type. It is designed to handle a large number of requests concurrently using the concurrent.futures module and manage potential errors effectively.

Features

Prerequisites

Ensure you have Python 3 and requests library installed to run this script.

Installation

  1. Clone the repository:
    git clone <repository-url>
  2. Navigate to the script's directory:
    cd <repository-directory>
  3. Install required Python packages:
    pip install requests

Usage

Run the script from the command line by specifying the Pokémon type:

python script.py --type water

For fetching details of all Pokémon types, use:

python script.py --type all

or simply run without specifying the type:

python script.py

Function Descriptions

Error Handling

The script includes robust error handling for various potential issues, including network errors, timeouts, and data processing errors, with retries for failed requests.

Contributing

Feel free to fork the project, make improvements, and submit pull requests.