Skip to main content

Tyradex for Python: Unleash the power of Pokémon data with a comprehensive Python script, providing easy access to detailed information on Pokémon and types through the Tyradex API.

Project description

Logo Pokémon Tyradex for Python

LassaInora - Tyradex GitHub tag stars - Tyradex forks - Tyradex

PyPI version Supported Versions


Click for README - French

Overview

This Python script interacts with the [Tyradex API](https://tyradex.tech/) 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.

Summary

Table of Contents

How to use

Installation

Librairy

Pokemon

Exemple

```python import Tyradex

ALL = Tyradex.Pokemon.all() LAST = ALL[-1].pokedex_id

def poke_team(x): x = str(x) cut = [] mem = '' for digit in x: if int(mem + digit) > LAST: cut.append(int(mem)) mem = '' mem += digit cut.append(int(mem))

return [Tyradex.Pokemon.get(obj) for obj in cut][:6]

print(poke_team(306100860922888193)) print(poke_team(306429397701885952)) print(poke_team(336443651628728322))

[<0306:Galeking>, <1008:Miraidon>, <0609:Lugulabre>, <0228:Malosse>, <0881:Galvagla>, <0093:Spectrum>] [<0306:Galeking>, <0429:Magirêve>, <0397:Étourvol>, <0701:Brutalibré>, <0885:Fantyrm>, <0952:Scovilain>] [<0336:Séviper>, <0443:Griknot>, <0651:Boguérisse>, <0628:Gueriaigle>, <0728:Otaquin>, <0322:Chamallot>]


<h4 id="3_2_1_2-functions">Functions</h4>
  - `Pokemon.all()`
    - Lists all Pokémon.
  - `Pokemon.get(<identifiant>, <<region>>)`
    - Give the identified Pokémon.
    - `<identifiant>`: The name (French or English) or the national pokédex number of the pokémon
    - `<<region>>`: (optional) The Pokémon region

<h4 id="3_2_1_3-properties">Properties</h4>
  - `pokemon.pokedex_id`
    - The number in the national pokédex
  - `pokemon.generation`
    - The publication generation
  - `pokemon.category`
    - The Pokémon category
  - `pokemon.name`
    - The name of the Pokémon
  - `pokemon.sprites`
    - The sprites of the Pokémon
  - `pokemon.types`
    - The types of the Pokémon
  - `pokemon.talents`
    - The list of Pokémon talents
  - `pokemon.stats`
    - The stats of the Pokémon
  - `pokemon.resistances`
    - Pokémon resistances
  - `pokemon.evolution`
    - Pokémon evolutions
  - `pokemon.height`
    - The size of the Pokémon
  - `pokemon.weight`
    - The weight of the Pokémon
  - `pokemon.egg_groups`
    - The list of Pokémon egg's group
  - `pokemon.sexe`
    - The percentage chance of gender appearing
  - `pokemon.catch_rate`
    - Pokémon capture rate
  - `pokemon.level_100`
    - The number of experience of the Pokémon to reach level 100
  - `pokemon.formes`
    - Alternative forms of the Pokémon

<h3 id="3_2_2-generation">Generation</h3>

<h4 id="3_2_2_1-exemple">Exemple</h4>

<h4 id="3_2_2_2-functions">Functions</h4>

<h4 id="3_2_2_3-properties">Properties</h4>

<h3 id="3_2_3-type">Type</h3>

<h4 id="3_2_3_1-exemple">Exemple</h4>

<h4 id="3_2_3_2-functions">Functions</h4>

<h4 id="3_2_3_3-properties">Properties</h4>

<h2 id="3_3-command_line">Command line</h2>

<h1 id="4-dependencies">Dependencies</h1>

<h1 id="5-api_reference">API Reference</h1>

<h1 id="6-contributors">Contributors</h1>

<h2 id="6_1-api">API</h2>

<h2 id="6_2-python_adaptation">Python Adaptation</h2>

<h1 id="7-license">Licence</h1>

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.2.2.tar.gz (12.3 kB view hashes)

Uploaded Source

Built Distribution

Tyradex-0.2.2-py3-none-any.whl (11.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