Skip to main content

A python library for working with data from mtgjson.com.

Project description

A small python library designged to ease to write scripts/apps that use data from mtgjson.com.

Example use

>>> from mtgjson import CardDb
>>> db = CardDb.from_url()
>>> card = db.find_card_by_name(u'aether vial')
>>> card.name
u'\xc6ther Vial'
>>> print card.name
Æther Vial
>>> card.cmc
1
>>> card.text
u'At the beginning of your upkeep, you may put a charge counter on \xc6ther Vial.\n{T}: You may put a creature card with converted mana cost equal to the number of charge counters on \xc6ther Vial from your hand onto the battlefield.'
>>> card.img_url
'http://mtgimage.com/set/MMA/aether vial.jpg'

See the documentation at http://pythonhosted.org/mtgjson for more.

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

mtgjson-0.3.tar.gz (3.5 kB view details)

Uploaded Source

File details

Details for the file mtgjson-0.3.tar.gz.

File metadata

  • Download URL: mtgjson-0.3.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for mtgjson-0.3.tar.gz
Algorithm Hash digest
SHA256 ed46173025991d436d0657663bd9692c14da350a44f138c12eb7b7872ed1b985
MD5 90c87f0a4ecd74ec0cc440ef8a32c664
BLAKE2b-256 3cef1b2556eab4dbcd54b1c952b4af9f143a707aa13a1c84a3121e8625f45870

See more details on using hashes here.

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