Skip to main content

MTG_Scryfall_Grabber (MSG) is a Python library/repository for scraping and organizing data from the Scryfall Rest-API.

Project description

mtg-scryfall-grabber

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

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 grab_cards.py can be invoked using

import grab_cards

At the moment, two functions are currently working. grab_cards() and grab_prices(), these two, respectively, grab card names sorted by collector ID, and card prices, sorted by Collector ID. This is intended to be imported into spreadsheet software such as Microsoft Excel, in order to be sorted by things like Collector Number, Name, or Price.

Quickstart

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

WINDOWS 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 grab-card 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 "Phyrexia, All Will Be One"

WINDOWS PowerShell

py msfg.py ONE

MacOS/UNIX Terminal/Bash

python3 msfg.py ONE

In ./example/, this will create a directory named "output", which will contain a .json file named Phyrexia: All Will Be One_card_name_info.json

TODO

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.

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 Fan Content Policy.

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_scryfall_grabber-0.0.7.tar.gz (6.8 kB view details)

Uploaded Source

Built Distribution

mtg_scryfall_grabber-0.0.7-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

File details

Details for the file mtg_scryfall_grabber-0.0.7.tar.gz.

File metadata

  • Download URL: mtg_scryfall_grabber-0.0.7.tar.gz
  • Upload date:
  • Size: 6.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.2

File hashes

Hashes for mtg_scryfall_grabber-0.0.7.tar.gz
Algorithm Hash digest
SHA256 00ab0295b85c894cf692e820b25275e92f28cfd9be88d5ac08ee835232f1fde4
MD5 e08e3574d835aa0f4176e9a9f4d3db1c
BLAKE2b-256 7c23435170445c93b726aa500b2220cfc3706f3c04f0e11dcc33244206c15025

See more details on using hashes here.

File details

Details for the file mtg_scryfall_grabber-0.0.7-py3-none-any.whl.

File metadata

File hashes

Hashes for mtg_scryfall_grabber-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 632ae1858a27048c202218a12a55e11dededf4e0a2f7e2640e802abe61ff7e85
MD5 4776bf36c89e8b5b6a839cb596479003
BLAKE2b-256 62f76ba79de2f42948a8ed362cbb5758aab6a8c228a168765d3f286f41665d1a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page