Pokémon TCG SDK
This is the Pokémon TCG SDK Python implementation. It is a wrapper around the Pokémon TCG API of pokemontcg.io.
Requirements
Python 3 is currently the only supported version for the sdk. More specifically, the package was developed using Python 3.4.
Installation
Using pip:
pip install pokemontcgsdk
Usage
Import (Card and Set will be most used)
from pokemontcgsdk import Card
from pokemontcgsdk import Set
from pokemontcgsdk import Type
from pokemontcgsdk import Supertype
from pokemontcgsdk import Subtype
Classes
Card
Set
Type
Supertype
Subtype
Properties Per Class
Card
id
name
national_pokedex_number
image_url
image_url_hi_res
subtype
supertype
ability
ancient_trait
hp
number
artist
rarity
series
set
set_code
retreat_cost
converted_retreat_cost
text
types
attacks
weaknesses
resistances
evolves_from
Set
code
ptcgo_code
name
series
total_cards
standard_legal
expanded_legal
release_date
updated_at
symbol_url
logo_url
Functions Available
Find a card by id
card = Card.find('xy1-1')
Filter Cards via query parameters
cards = Card.where(set='generations', supertype='pokemon')
Find all cards (will take awhile)
cards = Card.all()
Get all cards, but only a specific page of data
cards = Card.where(page=5, pageSize=100)
Find a set by code
set = Set.find('base1')
Filter sets via query parameters
sets = Set.where(standardLegal=true)
Get all Sets
sets = Set.all()
Get all Types
types = Type.all()
Get all Subtypes
subtypes = Subtype.all()
Get all Supertypes
supertypes = Supertype.all()
Contributing
- Fork it ( https://github.com/[my-github-username]/pokemon-tcg-sdk-python/fork )
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create a new Pull Request
Developing
Running Tests
python -m unittest discover -s tests/