richi3f / pokedb

:card_file_box: A Pokémon database

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

🗃️ pokedb

A Pokémon database

Installation

Change directory to root of the package, and then:

pip install -e .

Examples

Load the database:

>>> import pokedb
>>> database = pokedb.io.load_database("data/pokemon.js")
>>> database[302]
Sableye

Fetch information:

>>> database["enamorus"].pokemon_type
(<Type.FAIRY: 18>, <Type.FLYING: 3>)

Query the database:

>>> database.query(lambda pokemon: pokemon.name.startswith("Regi"))
[Regirock, Regice, Registeel, Regigigas, Regieleki, Regidrago]

About

:card_file_box: A Pokémon database


Languages

Language:JavaScript 97.7%Language:Python 2.3%