Skip to main content

mtg_scryfall_grabber

Pylint pytest

mtg_scryfall_grabber (MSG) is a Python library and module for scraping and organizing data from the Scryfall Rest-API.

conda is not needed but a sample environment.yaml is provided for the bare minimums you need to run in your own conda enviornment.

Installation

Please go to Releases for the latest directories.

Additionally, this can be installed from pip using

python3 -m pip install mtg_scryfall_grabber

Usage

After installing via pip using

python3 -m pip install --upgrade mtg_scryfall_grabber

The functions from mtg_scryfall_grabber.py can be invoked using

import mtg_scryfall_grabber

Quickstart (/w conda)

conda install

conda can be installed from here

Once conda is installed

  1. Clone the following repo
https://github.com/Contrastellar/mtg_scryfall_grabber
  1. Navigate to the repo
cd ./mtg_scryfall_grabber/
  1. Install the environment, where $NAME_OF_ENVIRONMENT is any name, or is omitted altogether, as one is given in the file.
conda env create --file ./environment.yaml --name $NAME_OF_ENVIRONMENT
  1. Activate the environment
conda activate $NAME_OF_ENVIRONMENT
  1. Navigate to the ./example/ directory
cd ./example/
  1. Run the following OS dependant command to download the information for the set "Phyrexia, All Will Be One"

PowerShell

py msfg.py ONE -c -p

Unix

python3 msfg.py ONE -c -p

Quickstart w/o conda

To get started quickly, one must install Python 3 (version 3.8 or greater).

Once having completed Python 3 installation for your Operating System, running the following command

PowerShell ---

py -m pip install --upgrade mtg-scryfall-grabber

MacOS/UNIX Terminal/bash ---

python3 -m pip install --upgrade mtg-scryfall-grabber

This will install mtg-scryfall-grabber's mtg_scryfall_grabber library, to be imported and used in your own Python Module if so desired. From here, downloading (either from releases, or from cloning this repository) the example/msfg.py file. Once this is done, the following steps can be taken to 'quickstart' downloading information from the Scryfall API.

  1. In your commandline (henceforth the CLI), navigate to the directory.
cd $MTG_SCRYFALL_GRABBER_DOWNLOAD_LOCATION/example/
  1. Run the following command to download the information for the set "Phyrexia, All Will Be One"

PowerShell

py msfg.py ONE -c -p

MacOS/UNIX Terminal/Bash

python3 msfg.py ONE -c -p

In ./example/, this will create a directory named "output", which will contain a .json file named like ONE_name_price_$(TIME).json -- where it is compiled by set code + unix time.

TODO

Nothing else major needs to be done at this point, however polishing and code testing will be implemented to this library before this is considered a full, ready-to-be-used in production v.1 release.

Additional functions need to be implimented, however -- an example implementation of this library is given in ./example/ under msfg.py. This implementation can also be treated as the "primary" method of using this library, in order to generate JSON to be used inside Excel spreadsheets or another spreadsheet program.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

The license is covered under the file license.md.

In essence, please do not use this software for commercial (for profit) means. This library is provided as is, modifications to the source code are allowed. This is to follow the Wizards of the Coast's (WotC) Fan Content Policy. All modifications should be done in accordance with the WotC Fan Content Policy.

Metadata

Release files for mtg-scryfall-grabber 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mtg-scryfall-grabber 1.0.0
File Size Uploaded
mtg_scryfall_grabber-1.0.0.tar.gz 7.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mtg-scryfall-grabber 1.0.0
File Interpreter ABI Platform
mtg_scryfall_grabber-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 12.1 kB

Release files / mtg_scryfall_grabber-1.0.0.tar.gz

Download URL mtg_scryfall_grabber-1.0.0.tar.gz
Size 7.5 kB
Tags Source
SHA-256 checksum
How to use checksums
2a743a90394a0ab5063ae87a47740950cc0e9530777b057072fcc97c023c5c4c
BLAKE2b-256 checksum
How to use checksums
ba55f3844c5fb0e093b7468a4ea2d1d2bf84584eeb30c58e5c709bd5fa836d41
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.17

Release files / mtg_scryfall_grabber-1.0.0-py3-none-any.whl

Download URL mtg_scryfall_grabber-1.0.0-py3-none-any.whl
Size 4.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e34b20f0173a80deca68b4ef3f13f7b1deed9c5c8d0a15b36d109189036344c8
BLAKE2b-256 checksum
How to use checksums
cb08862b3d2226721e08759a9237be6fc4eff9dde3e45a1d95b4f16b1dfa0ce2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.17

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.0

2 release files

0.0.7

2 release files

0.0.6

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page