A card/relic query toolset for Slay the Spire.
It exposes two main commands:
query_card: query card metadata, with optional upgrade level.query_relic: query relic metadata.
Both commands normalize names to lowercase before matching (no fuzzy match, no partial match, no fallback).
query_card also supports upgrade_times:
- Most cards: capped at one applied upgrade.
Searing Blow: supports unbounded upgrades using the in-game scaling rule.
pip install stsdbDev installation:
pip install -e .stsdb query_card "Bash"
stsdb query_card "Searing Blow" --upgrade-times 3
stsdb query_relic "Burning Blood"
python -m stsdb query_card "Bash"import stsdb
from stsdb import query_card, query_relic
stsdb.query_card("Bash")
query_card("Bash")
query_card("Searing Blow", upgrade_times=3)
query_relic("Burning Blood")Install in development mode:
pip install -e .Run tests:
python -m unittest discover -s tests -v- Success:
{"found": true, "entry": {...}} - Card miss:
{"found": false, "error": "CARD_NOT_FOUND"} - Invalid upgrade input:
{"found": false, "error": "INVALID_UPGRADE_TIMES"} - Relic miss:
{"found": false, "error": "RELIC_NOT_FOUND"}
Data files are shipped inside the package under stsdb/data/:
card.csvrelic.csvhero.csvplay.csvrelic_availability.csvcard_upgrade.csv
Upgrade metadata format (card_upgrade.csv):
nameCard;hasUpgrade;costUpgraded;descriptionUpgraded
This repository is adapted from the original project by Ferdomgar97