Skip to content

Bulkdata

scooze.bulkdata

download_bulk_data_file(uri: str, bulk_file_type: ScryfallBulkFile | None = None, bulk_file_dir: Path = CONFIG.bulk_file_dir) -> None

Download a single bulk data file from Scryfall.

Parameters:

Name Type Description Default
uri str

Location of bulk data file (generally found from bulk info endpoint).

required
bulk_file_type ScryfallBulkFile | None

Type of bulk file, used to set filename.

None
bulk_file_dir Path

Directory to save bulk files. Defaults to ~/.scooze/data/bulk if not specified.

bulk_file_dir

Raises:

Type Description
HTTPError

If request for bulk file not successful.

download_bulk_data_file_by_type(bulk_file_type: ScryfallBulkFile | None = None, bulk_file_dir: str = CONFIG.bulk_file_dir) -> None

Get a bulk data file from Scryfall, specified by file type (from among ScryfallBulkFile).

Parameters:

Name Type Description Default
bulk_file_type ScryfallBulkFile | None

Type of bulk file, used to set filename.

None
bulk_file_dir str

Directory to save bulk files. Defaults to ~/.scooze/data/bulk if not specified.

bulk_file_dir

Raises:

Type Description
HTTPError

If request for bulk file not successful.

download_all_bulk_data_files(bulk_file_dir: str = CONFIG.bulk_file_dir) -> None

Download all supported Scryfall bulk data files to local filesystem.

Parameters:

Name Type Description Default
bulk_file_dir str

Directory to save bulk files. Defaults to ~/.scooze/data/bulk if not specified.

bulk_file_dir

Raises:

Type Description
HTTPError

If request for bulk file not successful.