Skip to content
A simple Hearthstone card deck API that you can easily embed in your site with iframe.
Python CSS JavaScript Batchfile
Branch: master
Clone or download
mashirozx Merge pull request #5 from mashirozx/pyup-scheduled-update-2019-02-04
Scheduled weekly dependency update for week 05
Latest commit 7228b6e Feb 4, 2019

Hearthstone Deck Embed Tool

A simple Hearthstone card deck API that you can easily embed in your site with iframe. The backend of Awesome Deck.

Work with Python3, Django, and MySQL/MariaDB.

How to Use


Install pip for Python3:

apt install python3-pip

Install required packages:

pip install -r requirements.txt

If you see something like:

EnvironmentError: mysql_config not found

You should install libmysqlclient-dev:

sudo apt install default-libmysqlclient-dev


Rename the configuration file conf.sample.ini as conf.ini, and fill in your info.

Initialize Database

Cards data from HearthstoneJSON, this script will get the latest Json data automatically.

Initialize the Database with:

Auto Start Configuration

Latter if you need a cards data auto update (who knows when Bilzzard will release a hotfix and diminish some cards), there's a database auto update script, add it to system autostart tasks, and then for every 6 hours (you may change it to any interval by modifying the scrpit).

On a Ubuntu 18+, you may do so:

Create unit file in /lib/systemd/system/hearthstone_deck_auto_update.service with the following content:


ExecStartPre=/bin/mkdir -p /var/run/hearthstone_deck_auto_update


Save this file and reload systemd:

sudo systemctl daemon-reload

Then add your service to autostart:

sudo systemctl enable hearthstone_deck_auto_update.service

you should see that Systemd created required symlinks after enable action.

Reboot and see if it's up and running (ps aux | grep python or sudo systemctl status hearthstone_deck_auto_update.service). If there is something weird - check Systemd journal:

sudo journalctl -xe

Run web service

Then you can run the test server:

python web/ runserver

Or run with uwsgi:

cd web/web
uwsgi --http :8000 --module web.wsgi

Then visit:


© Mashiro, Released under the MIT License.

You can’t perform that action at this time.