Scryfall Cache is a library which minimizes the number of requests made to the Scryfall API.
Project description
scryfall-cache
Scryfall Cache is a library which minimizes the number of requests made to the Scryfall API.
- Free software: MIT license
- Documentation: https://scryfall-cache.readthedocs.io.
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.
Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
Unreleased
Added
0.2.0 - 2019-01-13
Added
- Added the ability to download images to the cache.
- Added the ability to query by name.
0.1.1 - 2019-01-09
Changed
- Fixed docs and added an example.
0.1.0 - 2019-01-09
Added
- Initial commit.
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
scryfall_cache-0.2.0.tar.gz
(14.0 kB
view hashes)
Built Distribution
Close
Hashes for scryfall_cache-0.2.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a1b861cd2f3b92a835045ef16b94a657933db830185d98cddb30736731e57c57 |
|
MD5 | eb6bb2e20bdfabd629f1d991715af98b |
|
BLAKE2b-256 | b58887896cbef703194d0d7e2c0e8814c8696ae354f5e44769cf9973b6bc7b0d |