← back to the pad

Scryfall Set Exporter

Python CLI — 119 lines, zero dependencies

Pythonstdlib onlyScryfall API

Status
Done — it does the one thing
Stack
Python 3, standard library only
Code
Local — happy to share it

Problem

Sometimes you just need a plain list of every card name in a Magic set — to build a cube list, to feed a bulk search, to hand to another script as input. Scryfall will give you that, but through a paginated JSON API: you follow next_page until the set runs out, then pull the names back out of the payload.

Doing that by hand is tedious enough to be worth automating, and every existing tool that automates it wants a package install, a virtualenv, and a dependency tree that will need attention in a year.

Solution

One Python file that imports nothing outside the standard library. Hand it a set code, get a text file.

Worth noting

Having no dependencies is the feature, not a shortcut. There is no requirements.txt to resolve, no virtualenv to activate, and nothing that breaks when a library publishes a major version. Copy the file onto any machine with Python and it runs — which is the whole reason it still works every time I reach for it.