Skip to content

Scryfall Cache is a library which minimizes the number of requests made to the Scryfall API

License

Notifications You must be signed in to change notification settings

cmeister2/scryfall_cache

Repository files navigation

scryfall-cache

pypi version Travis Status Documentation Status

Scryfall Cache is a library which minimizes the number of requests made to the Scryfall API.

Example

>>> from scryfall_cache import ScryfallCache, ScryfallCacheException
>>> import os

>>> cache = ScryfallCache(application="scryfall_tests")

>>> card = cache.get_card(mtgo_id=12345)
>>> str(card)
'ScryfallCard[Phyrexian Processor @ 6875ce99-badd-44da-8e5d-509600efa1d0]'

>>> # Download the card image as a PNG.
>>> image_path = card.get_image_path("png")
>>> os.path.basename(image_path)
'6875ce99-badd-44da-8e5d-509600efa1d0.png'

>>> card_two = cache.get_card(name="Black Lotus")
>>> str(card_two)
'ScryfallCard[Black Lotus @ bd8fa327-dd41-4737-8f19-2cf5eb1f7cdd]'

Credits

This package was created with Cookiecutter and the cmeister2/cookiecutter-pypackage project template.

About

Scryfall Cache is a library which minimizes the number of requests made to the Scryfall API

Resources

License

Stars

Watchers

Forks

Packages

No packages published