sf_price_fetcher
Simple Python API to pull pricing information from scryfall.com.
Provides caching of prices via an sqlite3 database.
NOTE that currently (as of v.0.1), the cache expiry time is set to 1 week. This will change and become configurable in future versions.
Usage
Typical usage is quite straightforward:
>>> from sf_price_fetcher import fetcher
>>> fetcher.get('mox amber')
'29.98'
sf_price_fetcher returns the lowest USD price for any printing of that card
which is not from a promotional set.
CLI
sf_price_fetcher also includes a command-line interface. For syntax information:
$ python -m sf_price_fetcher --help
usage: __main__.py [-h] [-c] [-s] card_name
Card price fetcher for scryfall.com
positional arguments:
card_name
optional arguments:
-h, --help show this help message and exit
-c, --card Print full card data instead of just the price.
-s, --search Search for the card name and return all unique printings.
Usage examples:
$ python -m sf_price_fetcher faerie\ vandal
faerie vandal: $0.07
$ python -m sf_price_fetcher "black lotus"
black lotus: $8499.99
The -c and -s options are primarily used for debugging.
They output the full JSON data pulled from scryfall.
$ python -m sf_price_fetcher -c 'blacker lotus' | head
{'object': 'card',
'id': '4c85d097-e87b-41ee-93c6-0e54ec41b174',
'oracle_id': '41dd29b9-f08d-4ccc-8dc0-da11d2d456e9',
'multiverse_ids': [9764],
'tcgplayer_id': 830,
'cardmarket_id': 11870,
'name': 'Blacker Lotus',
'lang': 'en',
'released_at': '1998-08-11',
'uri': 'https://api.scryfall.com/cards/4c85d097-e87b-41ee-93c6-0e54ec41b174',
Metadata
Release files for sf-price-fetcher 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| sf_price_fetcher-0.1.0.tar.gz | 5.1 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| sf_price_fetcher-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.1 kB
Release files / sf_price_fetcher-0.1.0.tar.gz
| Download URL | sf_price_fetcher-0.1.0.tar.gz |
|---|---|
| Size | 5.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ed9af0637e3f97098c5502a9993d4382237724433da89fb8b008bafb5d81957f
|
|
BLAKE2b-256 checksum How to use checksums |
fb626e5ba2e914462d1685af99fcb8e24c9776a832fa6167b6b352bb4682bd4f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.5
|
Release files / sf_price_fetcher-0.1.0-py3-none-any.whl
| Download URL | sf_price_fetcher-0.1.0-py3-none-any.whl |
|---|---|
| Size | 6.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a17451baa36e469c517f4f902ba4af770a8646b0af5343150c48dd6dc7b1e813
|
|
BLAKE2b-256 checksum How to use checksums |
4119bf3b2fce8432867f7d1bcea7b1b1cbfec667deeda870353a9d247bac3351
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.5
|
Security for sf-price-fetcher 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.