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 mulitple 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
Built Distribution
File details
Details for the file openneuro-py-2022.1.0.tar.gz
.
File metadata
- Download URL: openneuro-py-2022.1.0.tar.gz
- Upload date:
- Size: 22.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7ad35674d6bf772cc3875e50b2803c3bdf65b2cbefd9407eeb87ff0afb6412aa |
|
MD5 | 03517651638e8b0013a5cc55267db7e3 |
|
BLAKE2b-256 | 32e3d05168a3a3fcac1267ab43710f97e1475e52a49d36c2ac93d93e07b09a04 |
File details
Details for the file openneuro_py-2022.1.0-py3-none-any.whl
.
File metadata
- Download URL: openneuro_py-2022.1.0-py3-none-any.whl
- Upload date:
- Size: 37.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | adbb3939b5ee6f809a5b13186ec285f538ee8ac1a31774fbc5b0f38275070059 |
|
MD5 | 7dd78df2d9578c4b277754c971b256bf |
|
BLAKE2b-256 | bae84d7412c7bb0ba33c6a253e698c7cad36fc93ef18372fed81b17496e4e857 |