A Python client for OpenNeuro.
Project description
openneuro-py
A Python client for accessing OpenNeuro datasets.
Installation
via conda
conda install -c conda-forge openneuro-py
via pip
pip install openneuro-py
Jupyter and IPython support
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
:
via conda
conda install -c conda-forge ipywidgets
via pip
pip install ipywidgets
Basic usage – Python interface
import openneuro as on
on.download(dataset='ds000246', target_dir='data/bids')
Basic usage – command line interface
Download an entire dataset
openneuro-py download --dataset=ds000246
Specify a target directory
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
Continue an interrupted download
Interrupted downloads will resume where they left off when you run the command again.
Advanced usage – command line interface
Exclude a directory from the download
openneuro-py download --dataset=ds000246 \
--exclude=sub-emptyroom
Download only a single file
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.
Download or exclude multiple files
--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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
openneuro-py-2022.3.0.tar.gz
(283.2 kB
view hashes)
Built Distribution
Close
Hashes for openneuro_py-2022.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 37079d6925f7b34e4c9ad94463d81589e20931f73e1640788a3424ea80a0b909 |
|
MD5 | 19a9bcebb7feb7465db76829ea9ba557 |
|
BLAKE2b-256 | b37be3b0f66a7deac4baa979776c1a935f958f65665a90876c53836438921070 |