The TCGdex Python SDK provides a convenient access to the Open Source TCGdex API.
Project description
TCGdex Python SDK
The TCGdex Python SDK provides a convenient access with the Open Source TCGdex API.
The full API/SDK documentation is available at API Documentation - TCGdex
Getting Started
How To install
run the following command:
pip install tcgdex-sdk
Getting Started
Example: Fetch a Card
from tcgdexsdk import TCGdex
tcgdex = TCGdex("en") # You can also use `Language.EN` TCGdex(Language.EN)
res = await tcgdex.card.get("swsh1-136")
Other Examples
# fetch a Set using the set's name or ID
await tcgdex.set.get('Darkness Ablaze')
# Fetch a serie using the serie's name or ID
await tcgdex.serie.get('Sword & Shield')
# Fetch cards possible pokemon cards HP
await tcgdex.hp.list()
# Fetch Cards with the specific number of HP
await tcgdex.hp.get('110')
# Fetch cards possible illustrators
await tcgdex.illustrator.list()
# Fetch Cards with the specific illustrator
await tcgdex.illustrator.get('tetsuya koizumi')
Other Endpoints
Every endpoints below work just like the ones above
-
a function
list
to get the list of elements -
a function
get
to get details on the element -
variant
: fetch by the variants -
trainerType
: fetch trainer cards types -
suffix
: fetch differents cards suffixes -
stage
: fetch differents cards stages -
regulationMark
: Fetch by the regulation mark (letter at the bottom of the card) -
energyType
: Fetch different types of energies -
dexId
: fetch pokemon Global Pokédex IDS -
type
: fetch the cards using the Pokémon type(s) -
retreat
: fetch the cards using the retreat count -
rarity
: fetch the cards rarities -
illustrator
: fetch all the cards illustrators -
hp
: fetch the different cards possible HPs -
category
: the different cards categories
Contributing
See CONTRIBUTING.md
TL::DR
-
Fork
-
Commit your changes
-
Pull Request on this Repository
License
This project is licensed under the MIT License. A copy of the license is available at LICENSE.md
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
Built Distribution
File details
Details for the file tcgdex_sdk-2.0.2.tar.gz
.
File metadata
- Download URL: tcgdex_sdk-2.0.2.tar.gz
- Upload date:
- Size: 3.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: pdm/2.20.1 CPython/3.12.7 Linux/6.5.0-1025-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9ea10df6f276c8b4a39c3c7ecc2cd4f85293be47b1b1911288a527b8c9660b86 |
|
MD5 | 05f71eda9849b97fb777319aac6bcc2c |
|
BLAKE2b-256 | 477121545804b9b3e22b1bc4d3e2c238b2e7e343bce539d84c95ecc6b0b89a67 |
File details
Details for the file tcgdex_sdk-2.0.2-py3-none-any.whl
.
File metadata
- Download URL: tcgdex_sdk-2.0.2-py3-none-any.whl
- Upload date:
- Size: 13.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: pdm/2.20.1 CPython/3.12.7 Linux/6.5.0-1025-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a4acd25c52ed01d38d663577f6deec2a86e00896bc317b221c91e93b0d221192 |
|
MD5 | 1c95b866ce3439269fe4b3e20622cc10 |
|
BLAKE2b-256 | dac3de93111f9e2b394de5b4b4868a22d0d4bf93fe0db1a4c18f91865a2d2998 |