python-mtga: a python-accessible interface for MTGA cards
Project description
Python MTGA
MTGA tools & set data for python. Original cardset generated with MTGJSON and scryfall, with initial set of MTGA grpId's collected by Fugi & Spencatro. (Now we just use the data already present in your MTGA installation.)
Installation
pip install mtga
or
python setup.py install
Usage
from mtga.set_data import all_mtga_cards
print(all_mtga_cards.find_one("Mangara"))
# <Card: 'Mangara, the Diplomat' ['White'] M21 71809>
print(all_mtga_cards.find_one(71809))
# <Card: 'Mangara, the Diplomat' ['White'] M21 71809>
print(all_mtga_cards.find_one("71809"))
# <Card: 'Mangara, the Diplomat' ['White'] M21 71809>
Deploying
Because I always forget:
python setup.py sdist bdist_wheel
twine upload dist/MTGA-<version>*
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
MTGA-0.9.5.tar.gz
(240.0 kB
view hashes)
Built Distribution
MTGA-0.9.5-py3-none-any.whl
(247.2 kB
view hashes)