A Python wrapper for the friendly PokeAPI database
Project description
pokebase is a simple but powerful Python interface to the PokéAPI database
Installation
pip install pokebase
It can’t get much easier than that.
Usage
>>> import pokebase as pb
>>> chesto = pb.NamedAPIResource('berry', 'chesto')
>>> chesto.name
'chesto'
>>> chesto.natural_gift_type.name
'water'
>>> charmander = pb.pokemon('charmander') # Quick lookup.
>>> charmander.height
6
>>> bulba = pb.pokemon_sprite(1) # And sprites too! >>> bulba.path '/home/user/.pokebase/sprite/pokemon/1.png' >>>
… And it’s just that simple.
Version Support
pokebase currently (officially) supports Python 2.7 and 3.6 versions.
Testing
Python unittests are in a separate tests directory, and can be run via python -m tests.test_pokebase.
Important
The quick data lookup for a Pokémon type, is pokebase.type_('type-name'), not pokebase.type('type-name'). This is because of a naming conflict with the built-in type function.
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
pokebase-1.2.0.tar.gz
(9.3 kB
view details)
File details
Details for the file pokebase-1.2.0.tar.gz.
File metadata
- Download URL: pokebase-1.2.0.tar.gz
- Upload date:
- Size: 9.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6ea3e4bf6c02290a4a940e4a9b28daadf7b55d64521153ab580553bdec08bbc6
|
|
| MD5 |
42a18d06678ad0d593ec8de462a3e5c1
|
|
| BLAKE2b-256 |
53465f3bd6926dfbf7c8db7eab81af01267d6fec4aee3e88c889d61ada7eabb7
|