An unofficial wrapper for the Scryfall REST API providing common queries
Project description
MTG-Card-API
# Use the Scryfall module
from mtg_card_api import ScryfallAPI
api = ScryfallAPI()
res = api.get_card_by_name("Sacred Foundry")
# Check if response encountered an error
if res.error is False:
# Otherwise response prop will contain result string
print(res.response)
# {"object":"card","id":"8076a8c3-7c6c-4636-b5d8-9b09ee95f92c","oracle_id":"45181cb8-2090-4471-ba90-e5a8f04d525f","multiverse_ids":[643292],"mtgo_id":121137,"tcgplayer_id":517644,"cardmarket_id":748638,"name":"Sacred Foundry"...,"cardhoarder":"https://www.cardhoarder.com/cards/121137?affiliate_id=scryfall&ref=card-profile&utm_campaign=affiliate&utm_medium=card&utm_source=scryfall"}}
Default values for module will cache the result for 24hrs in $XDG_HOME/.cache/MTGScryfallAPI
using diskcache
Requirements
- rest_client_micro
- diskcache
Installation
pip install mtg_card_api
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
mtg_card_api-0.1.4.tar.gz
(4.9 kB
view hashes)
Built Distribution
Close
Hashes for mtg_card_api-0.1.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0f65b22d1a369153c6d076ddfc104dde7589ec82abb0cfaaa40c87468ce19d64 |
|
MD5 | 93ce91e0a85169e850014d731dd843d9 |
|
BLAKE2b-256 | c5a7ab03f5beb6ab2b64e5aea4462a6132e69b9d6c42e23f5d4f05bfdf93b8fd |