Skip to main content

Deterministic Slay the Spire card and relic query toolset

Project description

Slay the Spire Database (stsdb)

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.

Installation

pip install stsdb

Dev installation:

pip install -e .

Usage

stsdb query_card "Bash"
stsdb query_card "Searing Blow" --upgrade-times 3
stsdb query_relic "Burning Blood"
python -m stsdb query_card "Bash"

Python API

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")

Local development

Install in development mode:

pip install -e .

Run tests:

python -m unittest discover -s tests -v

Output

  • 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"}

Other Notes

Data files are shipped inside the package under stsdb/data/:

  • card.csv
  • relic.csv
  • hero.csv
  • play.csv
  • relic_availability.csv
  • card_upgrade.csv

Upgrade metadata format (card_upgrade.csv):

  • nameCard;hasUpgrade;costUpgraded;descriptionUpgraded

Credits

This repository is adapted from the original project by Ferdomgar97

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

stsdb-0.2.1.tar.gz (24.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

stsdb-0.2.1-py3-none-any.whl (30.8 kB view details)

Uploaded Python 3

File details

Details for the file stsdb-0.2.1.tar.gz.

File metadata

  • Download URL: stsdb-0.2.1.tar.gz
  • Upload date:
  • Size: 24.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.0rc1

File hashes

Hashes for stsdb-0.2.1.tar.gz
Algorithm Hash digest
SHA256 d096fd0063c3f6724d06786c1d72fd16cf49733c1bfb09a908061abbab33eddb
MD5 3e6861b1a7c6965436b630b21d68d654
BLAKE2b-256 52bdd0616c432bd6395e1ecd4d3d83c7c73928cdf27bc6745fd677153c0883c0

See more details on using hashes here.

File details

Details for the file stsdb-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: stsdb-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 30.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.0rc1

File hashes

Hashes for stsdb-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0e9fe5268c711f0b19f847d37a77ce7402d6e3b3105b99be95cc944716085e07
MD5 e9e23a7648f00a7c78e10c893460e4b6
BLAKE2b-256 b1ae826b5e42c68b02d4176c39993380902b7f2b3708562a7984b79c41583823

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page