Skip to main content

osf-downloader

Download files (or a ZIP of an entire project) from the Open Science Framework (OSF) from the command line. Useful for pulling OSF-hosted datasets into local workflows and CI pipelines.

Features

  • Download an OSF project/component by ID (as a ZIP)
  • Download a single file by its path inside OSF storage
  • Simple CLI suitable for scripting

Install

git clone https://github.com/aselimc/osf-downloader.git
cd osf-downloader
# editable install
pip install -e .

Option B: Python package (if published)

pip install osf-downloader

Requirements:

  • Python 3.9+

Usage

The installed CLI entrypoint is osf-download.

Replace <OSF_ID> with your OSF project or component id (the short code in the OSF URL).

osf-download download <OSF_ID> ./data

Download a single file by path inside OSF storage:

osf-download download <OSF_ID> ./data/myfile.csv path/inside/osf/myfile.csv

Notes:

  • Command shape: osf-download download PROJECT_ID SAVE_PATH [FILE_PATH].
  • file_path is the path inside osfstorage (case-sensitive; use / separators).
  • save_path is treated as an output file path if it already has a suffix/extension.
  • If save_path has no suffix/extension, the tool appends one automatically:
    • project download → .zip
    • file download → uses the extension from file_path (e.g. .csv)

Examples

Download an OSF project ZIP to ./datasets/osf.zip:

osf-download download abcd1 ./datasets/osf.zip

Download an OSF project ZIP where the .zip extension is chosen automatically:

osf-download download abcd1 ./datasets/osf

Download a single file into ./datasets/:

osf-download download abcd1 ./datasets results/data.csv

Tip: to avoid ambiguity, prefer providing a full output filename (e.g. ./datasets/results.csv).

Troubleshooting

  • 404 / not found: verify the OSF id and that the project/component is public.
  • 401 / unauthorized: this tool currently does not handle OSF authentication; use public resources.
  • Path not found: if downloading a single file, ensure file_path matches the OSF storage path (case-sensitive).

Caveats

  • Project downloads create a ZIP by fetching all files; for very large projects this may take time and memory.
  • Only the osfstorage provider is supported.

Contributing

Issues and pull requests are welcome. Include:

  • A clear description of the OSF resource and expected behavior
  • Minimal reproduction steps
  • Logs/trace output if available

License

MIT. See LICENSE.

Metadata

Release files for osf-downloader 0.1.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 osf-downloader 0.1.0
File Size Uploaded Provenance Actions
osf_downloader-0.1.0.tar.gz 7.3 kB Without provenance Details for osf_downloader-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for osf-downloader 0.1.0
File Interpreter ABI Platform Actions
osf_downloader-0.1.0-py3-none-any.whl Python 3 none any Details for osf_downloader-0.1.0-py3-none-any.whl

Total release size: 14.2 kB

Release files / osf_downloader-0.1.0.tar.gz

Download URL osf_downloader-0.1.0.tar.gz
Size 7.3 kB
Tags Source
SHA-256 checksum
How to use checksums
ac6112dd9490b41141fe38b7499f5d4f105743ea2d727af5082c7500ba34e7da
BLAKE2b-256 checksum
How to use checksums
cd6adb36283fe341f0ae64f79d2b7f1bf96b500e1e97461706559a0de92796f4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.23

Release files / osf_downloader-0.1.0-py3-none-any.whl

Download URL osf_downloader-0.1.0-py3-none-any.whl
Size 6.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9908eb9bc1c588506e531932616621d36c2fc8a222cec5c61895d8f0da43f45e
BLAKE2b-256 checksum
How to use checksums
b3b89b510eeb6b114d585c661b491fdebda41e8f0b659a32b95f93ab5e146987
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.23

Security for osf-downloader 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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