Skip to main content

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>*

Release files for MTGA 0.9.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for MTGA 0.9.5
File Size Uploaded
MTGA-0.9.5.tar.gz 240.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for MTGA 0.9.5
File Interpreter ABI Platform
MTGA-0.9.5-py3-none-any.whl Python 3 none any Details

Total release size: 487.2 kB

Release files / MTGA-0.9.5.tar.gz

Download URL MTGA-0.9.5.tar.gz
Size 240.0 kB
Tags Source
SHA-256 checksum
How to use checksums
d1230cdde6b56d4f0d582ad82eeb6f0aa50e6c6c2206518c84240bcda4cc0d41
BLAKE2b-256 checksum
How to use checksums
643b866660afef433337fdc6f842209193a6d9df23f6bfc8221251ab7f860439
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.0.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.6.4

Release files / MTGA-0.9.5-py3-none-any.whl

Download URL MTGA-0.9.5-py3-none-any.whl
Size 247.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bc0b8f07a3451f32b39d57f862734a2f6fb0f89537c965124db513ce44d62bc2
BLAKE2b-256 checksum
How to use checksums
af433e7fcbd43b3a5b30108c981b0e54369b5b232d73c118610f4f1d834460f1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.0.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.6.4
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page