A Python client for accessing OpenNeuro datasets.
conda install -c conda-forge openneuro-py
pip install openneuro-py
To get basic support for Jupyter Lab, Jupyter Notebook, IPython interactive
sessions, and VS Code's interactive Jupyter interface, you will also need to
install ipywidgets
:
conda install -c conda-forge ipywidgets
pip install ipywidgets
import openneuro as on
on.download(dataset='ds000246', target_dir='data/bids')
openneuro-py download --dataset=ds000246
To store the downloaded files in a specific directory, use the
--target_dir
switch. The directory will be created if it doesn't exist
already.
openneuro-py download --dataset=ds000246 \
--target_dir=data/bids
Interrupted downloads will resume where they left off when you run the command again.
openneuro-py download --dataset=ds000246 \
--exclude=sub-emptyroom
openneuro-py download --dataset=ds000246 \
--include=sub-0001/meg/sub-0001_coordsystem.json
Note that a few essential BIDS files are always downloaded in addition.
--include
and --exclude
can be passed multiple times:
openneuro-py download --dataset=ds000246 \
--include=sub-0001/meg/sub-0001_coordsystem.json \
--include=sub-0001/meg/sub-0001_acq-LPA_photo.jpg