Metadata-Version: 2.1
Name: openneuro-py
Version: 2020.2
Summary: A Python client for OpenNeuro.
Home-page: https://github.com/hoechenberger/openneuro-py
Author: Richard Höchenberger <richard.hoechenberger@gmail.com>
Author-email: richard.hoechenberger@gmail.com
License: GPL v3
Project-URL: Source Code, https://github.com/hoechenberger/openneuro-py
Project-URL: Bug Tracker, https://github.com/hoechenberger/openneuro-py/issues
Platform: UNKNOWN
Classifier: Intended Audience :: Science/Research
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.6
Description-Content-Type: text/markdown
Requires-Dist: requests
Requires-Dist: tqdm
Requires-Dist: click
Requires-Dist: importlib-metadata (~=1.0) ; python_version < "3.8"

# openneuro-py

A leightweight Python client for accessing [OpenNeuro](https://openneuro.org)
datasets.

## Installation

### via pip

```shell
pip install openneuro-py
```

### via conda

```shell
conda install -c conda-forge openneuro-py
```

## Basic usage

### Download an entire dataset

```shell
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.

```shell
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
### Exclude a directory from the download

```shell
openneuro-py download --dataset=ds000246 \
                      --exclude=sub-emptyroom
```

### Download only a single file

```shell
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:

```shell
openneuro-py download --dataset=ds000246 \
                      --include=sub-0001/meg/sub-0001_coordsystem.json \
                      --include=sub-0001/meg/sub-0001_acq-LPA_photo.jpg
```


