Skip to main content

A Python client for OpenNeuro.

Project description

openneuro-py

A Python client for accessing OpenNeuro datasets.

openneuro-py in action

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


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.2.0.tar.gz (48.4 kB view details)

Uploaded Source

Built Distribution

openneuro_py-2022.2.0-py3-none-any.whl (37.0 kB view details)

Uploaded Python 3

File details

Details for the file openneuro-py-2022.2.0.tar.gz.

File metadata

  • Download URL: openneuro-py-2022.2.0.tar.gz
  • Upload date:
  • Size: 48.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.15

File hashes

Hashes for openneuro-py-2022.2.0.tar.gz
Algorithm Hash digest
SHA256 a33b1e41df8ac1602865e8f579ddcd8210e824c8c03d2ff655e237607af2a639
MD5 54321b8fd3e8ee68750224bc4e3f7e96
BLAKE2b-256 eebdff8f09cbbdee5c72b4a8493b0f9dd0f73538b852b6036077954d1b57eaac

See more details on using hashes here.

File details

Details for the file openneuro_py-2022.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for openneuro_py-2022.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b01b0693cac5f5a0dfc649e7af4e18c15a88e1e807cc851f6b1f0f6341536ccf
MD5 b27c03673b17dde17e23c4de31f35b3b
BLAKE2b-256 8860056c052c9911485207226d90b384fd0ce6b884121b255e0144755d021d6a

See more details on using hashes here.

Supported by

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