Skip to content

poslogithub/python-mtga

 
 

Repository files navigation

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 check dist/*  # check for readme issues (e.g. line endings MUST BE LF, not CRLF lol)
twine upload dist/MTGA-<version>*

About

MTGA set data & tooling for python

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%