Skip to main content

One downloader for many scientific data and code repositories!

Project description

Datahugger - Where DOI hugs Data

Datahugger - Where DOI :open_hands: Data

Datahugger is a tool to download scientific datasets, software, and code from a large number of repositories based on their DOI (wiki) or URL. With Datahugger, you can automate the downloading of data and improve the reproducibility of your research. Datahugger provides a straightforward Python interface as well as an intuitive Command Line Interface (CLI).

Supported repositories

Datahugger offers support for more than 371 generic and specific (scientific) repositories (and more to come!).

Datahugger support Zenodo, Dataverse, DataOne, GitHub, FigShare, HuggingFace, Mendeley Data, Dryad, OSF, and many more

We are still expanding Datahugger with support for more repositories. You can help by requesting support for a repository in the issue tracker. Pull Requests are very welcome as well.

Installation

PyPI

Datahugger requires Python 3.6 or later.

pip install datahugger

Getting started

Datahugger with Python

Load a dataset (or any digital asset) from a repository with the datahugger.get() function. The first argument is the DOI or URL and the second argument the name of the folder to store the dataset (will be created if it does not exist).

The following code loads dataset 10.5061/dryad.mj8m0 into the folder data.

import datahugger

# download the dataset to the folder "data"
datahugger.get("10.5061/dryad.mj8m0", "data")

For an example how this can integrate with your work, see the example workflow notebook or Open In Colab

Datahugger with command line

The command line function datahugger provides an easy interface to download data. The first argument is the DOI or URL and the second argument the name of the folder to store the dataset (will be created if it does not exist).

datahugger 10.5061/dryad.mj8m0 data
% datahugger 10.5061/dryad.mj8m0 data
Collecting...
NestTemperatureData.csv            : 100%|████████████████████████████████████████| 607k/607k
README_for_NestTemperatureData.txt : 100%|██████████████████████████████████████| 2.82k/2.82k
ExternalTemps.csv                  : 100%|██████████████████████████████████████| 1.06k/1.06k
README_for_ExternalTemps.txt       : 100%|██████████████████████████████████████| 2.82k/2.82k
InternalEggTempData.csv            : 100%|██████████████████████████████████████████| 664/664
README_for_InternalEggTempData.txt : 100%|██████████████████████████████████████| 2.82k/2.82k
SoilSimulation_Output.csv          : 100%|████████████████████████████████████████| 229M/229M
README_for_SoilSimulation_[...].txt: 100%|██████████████████████████████████████| 2.82k/2.82k
Dataset successfully downloaded.

Tip: On some systems, you have to quote the DOI or URL. For example: datahugger "10.5061/dryad.mj8m0" data.

Tips and tricks

License

MIT

Contact

Feel free to reach out with questions, remarks, and suggestions. The issue tracker is a good starting point. You can also email me at jonathandebruinos@gmail.com.

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

datahugger-0.9.tar.gz (1.9 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

datahugger-0.9-py3-none-any.whl (18.9 kB view details)

Uploaded Python 3

File details

Details for the file datahugger-0.9.tar.gz.

File metadata

  • Download URL: datahugger-0.9.tar.gz
  • Upload date:
  • Size: 1.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for datahugger-0.9.tar.gz
Algorithm Hash digest
SHA256 2b62a2929cf045d705d80fc1e86868c5acbd3363cf4e4bd1eb12e1ec3d65d2ec
MD5 cc034ad6ce1164ccff17fae52e420b2a
BLAKE2b-256 1b95c56298c7ef9b8f75fe36d12a5c11801de1535db75e22dd7f3882990cbc5a

See more details on using hashes here.

File details

Details for the file datahugger-0.9-py3-none-any.whl.

File metadata

  • Download URL: datahugger-0.9-py3-none-any.whl
  • Upload date:
  • Size: 18.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for datahugger-0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 8263411f93718c2fb5f50069665a2d4ffe44a2b6c0530a17c57fd61f84de50cf
MD5 6bb2702ceac4967e3a580f0730795ae9
BLAKE2b-256 c41eb0ede5305dc6357dd324523590a021671357fd57e8570f53cac9d5c209e5

See more details on using hashes here.

Supported by

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