Skip to main content

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


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)

Uploaded Source

Built Distribution

MTGA-0.9.5-py3-none-any.whl (247.2 kB view hashes)

Uploaded Python 3

Supported by

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