Skip to main content

A class-based Package for accessing and interacting with PokeAPI's JSON data.

Project description

PyPokeClasses

PyPokeClasses is a Python package that provides a class-based structure for accessing and interacting with PokeAPI's JSON data. It simplifies the process of making API requests and handling the returned data, allowing developers to focus on building applications with Pokémon-related data.

Features

  • Class-based access to various Pokémon entities from PokeAPI.
  • Easy integration of PokeAPI into Python projects.
  • Structured handling of API responses.
  • Lightweight and flexible for various use cases.

Installation

You can install this package using pip:

pip install PyPokeClasses

Usage

Here is an example of how to use PyPokeClasses to fetch and interact with Pokémon data:

from PyPokeClasses.Pokemon import Pokemon

# Initialize a Pokemon instance by name or ID
pikachu = Pokemon('pikachu')

# Access basic information
print(f"Name: {pikachu.name}")
print(f"Height: {pikachu.height}")
print(f"Weight: {pikachu.weight}")

# Access additional data
print(f"Base Experience: {pikachu.base_experience}")
print(f"Types: {[t.type.name for t in pikachu.types]}")

Thanks to this design, the class dynamically fetches and stores the data in object properties, allowing users to easily access and interact with PokeAPI data directly from the class instance. Moreover, code completion (autocomplete) for these properties is supported, which enhances the development experience by suggesting available Pokémon attributes and methods during coding.

ダウンロード

Supported Entities

Entities Classes Links
Berries Berry / BerryFirmness / BerryFlavor Link
Contests ContestType / ContestEffect / SuperContestEffect Link
Encounters EncounterMethod / EncounterCondition / EncounterConditionValue Link
Evolution EvolutionChain / EvolutionTrigger Link
Games Generation / Pokedex / Version / VersionGroup Link
Items Item / ItemAttribute / ItemCategory / ItemFlingEffect / ItemPocket Link
Locations Location / LocationArea / PalParkArea / Region Link
Machines Machine Link
Moves MoveAilments / MoveBattleStyles / MoveCategory /MoveDamageClass / MoveLearnMethod / Moves / MoveTarget Link
Pokemon Abilities / Characteristic / EggGroup / Genders / GrowthRate / Natures / PokeathlonStats / Pokemon / PokemonColors / PokemonForms / PokemonHabitats / PokemonShapes / PokemonSpecies / Stats / Types Link

APIRefference

Each class within the package is mapped to the corresponding PokeAPI endpoint. Refer to the official PokeAPI documentation for details about the available data.

LICENSE

This project is licensed under the MIT License - see the LICENSE file for details.

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

pypokeclasses-0.1.17.tar.gz (19.7 kB view details)

Uploaded Source

Built Distribution

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

PyPokeClasses-0.1.17-py3-none-any.whl (40.5 kB view details)

Uploaded Python 3

File details

Details for the file pypokeclasses-0.1.17.tar.gz.

File metadata

  • Download URL: pypokeclasses-0.1.17.tar.gz
  • Upload date:
  • Size: 19.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for pypokeclasses-0.1.17.tar.gz
Algorithm Hash digest
SHA256 1797cf52171bfe123f2e04eb615cbee5a7d8aa4a69aa5fcd25aa600ce876158b
MD5 8de940afd4750aed4a2c0c8465b69ad3
BLAKE2b-256 2d585cd4f7b94fa4669918347dc63d5a2bd365e3fb92d50fef0d9d0afd22f39b

See more details on using hashes here.

File details

Details for the file PyPokeClasses-0.1.17-py3-none-any.whl.

File metadata

  • Download URL: PyPokeClasses-0.1.17-py3-none-any.whl
  • Upload date:
  • Size: 40.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for PyPokeClasses-0.1.17-py3-none-any.whl
Algorithm Hash digest
SHA256 692f22808b825f6e895c72926fb03c4335f7a96c0314f2021ba4bda220923e18
MD5 ff64903f4c996dc7f19367cdd170ae2c
BLAKE2b-256 6d4122018f0a4cf1247fedcdbfdd4e6d0bd5c79824601f0e69d52cab81fbccb1

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