https://github.com/tcgdex/python-sdk
⚡️ TCGdex Python SDK for Pokémon TCG data | Async • Zero config • Multi-language
https://github.com/tcgdex/python-sdk
api async card pdm pokemon pokemon-api pokemon-cards python sdk tcg tcgdex trading
Last synced: about 1 month ago
JSON representation
⚡️ TCGdex Python SDK for Pokémon TCG data | Async • Zero config • Multi-language
- Host: GitHub
- URL: https://github.com/tcgdex/python-sdk
- Owner: tcgdex
- Created: 2024-08-29T14:53:01.000Z (9 months ago)
- Default Branch: master
- Last Pushed: 2025-03-03T20:31:47.000Z (3 months ago)
- Last Synced: 2025-03-23T09:48:28.842Z (about 2 months ago)
- Topics: api, async, card, pdm, pokemon, pokemon-api, pokemon-cards, python, sdk, tcg, tcgdex, trading
- Language: Python
- Homepage: https://tcgdex.dev/sdks/python
- Size: 576 KB
- Stars: 6
- Watchers: 1
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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](https://www.tcgdex.dev)_
### Getting Started
#### How To install
run the following command:
```bash
pip install tcgdex-sdk
```#### Getting Started
**Example: Fetch a Card**
```python
from tcgdexsdk import TCGdextcgdex = TCGdex("en") # You can also use `Language.EN` TCGdex(Language.EN)
res = await tcgdex.card.get("swsh1-136")
```**Other Examples**
```python
# 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](https://github.com/tcgdex/python-sdk/blob/master/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](https://github.com/tcgdex/python-sdk/blob/master/LICENSE.md)