Skip to main content

Une simple API Pokémon en français.

Project description

Logo Pokémon Tyradex for Python

PyPI version Supported Versions Downloads Contributors

-> 🇫🇷 : README_FRENCH.md

Overview

This Python script interacts with the Tyradex API to retrieve detailed information about Pokémon and Pokémon types. It is designed to provide easy access to details such as Pokédex ID, generation, category, statistics, etc., for individual Pokémon or types. The script is organized into classes representing different aspects of Pokémon data and includes functions to obtain lists of all Pokémon and types.

Features

  • Pokemon Class :

    • Retrieve detailed information about a specific Pokémon.
    • Access properties such as Pokédex ID, generation, category, statistics, etc.
  • Type Class :

    • Get information about a specific Pokémon type.
    • Access properties such as type ID, resistances, and a list of Pokémon associated with that type.
  • Generations Class :

    • Access Pokémon data grouped by different generations.
  • Support Classes :

    • Various support classes to handle names, abilities, sprites, statistics, resistances, evolutions, gender, and forms.
  • Functions :

    • get_all_pokemons : Retrieve a list of all Pokémon.
    • get_all_types : Retrieve a list of all Pokémon types.

How to Use

  1. Installation :

  • Make sure you have Python installed on your system.
  • Install the library with pip install --upgrade Tyradex.
  1. Usage :

  • Import the script into your Python project or run it as a standalone script.
  • Instantiate relevant classes to interact with Pokémon or types.
  • Explore the provided functions to get lists of Pokémon and types.
# Example Usage
from Tyradex import Pokemon, Type, Generations, get_all_pokemons, get_all_types

# Retrieve information about a specific Pokémon
charizard = Pokemon('charizard')
print(charizard.name)

# Retrieve information about a specific Pokémon type
fire_type = Type('fire')
print(fire_type.name)

# Retrieve all Pokémon of a specific generation
gen_6 = Generations.Gen(6)
print(gen_6[42])

# Retrieve a list of all Pokémon and types
all_pokemons = get_all_pokemons()
all_types = get_all_types()

Dependencies

  • requests : Requests is an HTTP library, written in Python, for human beings.
  • unidecode : Transliterate Unicode text into plain 7-bit ASCII.

API Reference

Contributors

License

This project is under the MIT License.

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

Tyradex-0.1.4.tar.gz (9.5 kB view hashes)

Uploaded Source

Built Distribution

Tyradex-0.1.4-py3-none-any.whl (8.2 kB view hashes)

Uploaded Python 3

Supported by

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