MCPcopy Index your code
hub / github.com/dvolgyes/zenodo_get

github.com/dvolgyes/zenodo_get @v3.0.3

Chat with this repo
repository ↗ · DeepWiki ↗ · release v3.0.3 ↗ · + Follow
162 symbols 476 edges 11 files 161 documented · 99%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

zenodo_get: a downloader for Zenodo records

CI CircleCI Build status Coverage Status pyversion PyPI - License DOI

A Python tool for downloading files from Zenodo records. Requires Python 3.10+.

Installation

The simplest way (no installation needed) is using uvx, a tool runner from uv:

uvx zenodo_get RECORD_ID_OR_DOI

Alternatively, install with pipx or pip:

pipx install zenodo-get
# or
pip install zenodo-get

Usage

uvx zenodo_get RECORD_ID_OR_DOI

Common Options

Option Description
-o DIR Output directory (created if needed)
-g PATTERN Filter files by glob pattern (e.g., -g "*.pdf")
-m Generate md5sums.txt for verification
-w FILE Write URLs to file instead of downloading (-w - for stdout)
-e Continue on error (skip failed files)
-n Start fresh (don't resume previous download)
-v N Verbosity level 0-4 (default: 2)

Retry Options

Option Description
--max-http-retries N HTTP retries with exponential backoff (default: 5)
--backoff-factor N Backoff multiplier in seconds (default: 0.5)
-R N Application-level retries for checksum failures (default: 1)
-p N Pause between retries in seconds (default: 3)
-t N Connection timeout in seconds (default: 25)

Examples

# Download all files from a record
uvx zenodo_get 1234567

# Download only PDFs to a specific directory
uvx zenodo_get 1234567 -g "*.pdf" -o ./downloads

# Generate URL list for external download manager
uvx zenodo_get 1234567 -w urls.txt

# Use DOI instead of record ID
uvx zenodo_get -d 10.5281/zenodo.1234567

Exit Codes

  • 0: All files downloaded successfully
  • Non-zero: Error occurred (checksum mismatch, download failure, timeout, etc.)

Python API

You can use zenodo_get as a library in your Python projects.

Installation

# Add to your project
uv add zenodo-get
# or
pip install zenodo-get

Usage

from zenodo_get import download

# Download all files from a record
download("10.5281/zenodo.1234567", output_dir="./data")

# Download only specific files using glob pattern
download(
    record_or_doi="1234567",
    output_dir="./data",
    file_glob="*.csv",
)

# Multiple glob patterns
download(
    record_or_doi="1234567",
    output_dir="./data",
    file_glob=["*.csv", "*.json"],
)

Parameters

Parameter Type Default Description
record_or_doi str - Zenodo record ID or DOI
output_dir str \| Path "." Output directory
file_glob str \| tuple "*" Filter files by glob pattern(s)
md5 bool False Generate md5sums.txt
continue_on_error bool False Continue on download errors
start_fresh bool False Don't resume previous download
timeout float 15.0 Connection timeout in seconds
exceptions_on_failure bool True Raise exceptions on errors

Citation

If you use this tool in academic work:

uvx zenodo_get --cite

Core symbols most depended-on inside this repo

download
called by 22
zenodo_get/zget.py
get_client
called by 18
zenodo_get/downloader.py
_fetch_record_metadata
called by 10
zenodo_get/zget.py
download_file
called by 10
zenodo_get/downloader.py
_extract_filename_from_content_disposition
called by 9
zenodo_get/downloader.py
_handle_single_file_download
called by 8
zenodo_get/zget.py
_extract_filename_from_url
called by 6
zenodo_get/downloader.py
_close_client
called by 4
zenodo_get/downloader.py

Shape

Method 103
Function 35
Class 23
Route 1

Languages

Python100%

Modules by API surface

tests/test_cli.py38 symbols
tests/test_downloader.py36 symbols
tests/test_coverage.py32 symbols
tests/test_existing_file_modes.py21 symbols
zenodo_get/zget.py11 symbols
tests/test_integration.py11 symbols
zenodo_get/downloader.py8 symbols
tests/test_api.py3 symbols
tests/test_simple_coverage.py2 symbols

For agents

$ claude mcp add zenodo_get \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact