A Python client for accessing NEMAR datasets.
Project description
nemar-py
Python + CLI client for downloading public NEMAR datasets (BIDS / EEG / MEG / iEEG) from data.nemar.org.
Install
pip install nemar-py # S3 + HTTPS backends
pip install nemar-py[datalad] # + the optional DataLad layer
The default install uses the direct-S3 and HTTPS backends. The optional
[datalad] extra adds the DataLad layer; it bundles the git-annex binary
via the psychoinformatics-de PyPI wheel (Linux, macOS, Windows), so no
system package step is needed. Without the extra, --downloader datalad and
the auto chain's DataLad layer fall through to S3 / HTTPS automatically.
Quick start
nemar-py download nm000132 -o data/nm000132
import nemar
nemar.download(dataset="nm000132", target_dir="data/nm000132")
CLI
| Command | Purpose |
|---|---|
nemar-py download <DATASET> |
Download a dataset |
nemar-py versions <DATASET> |
List versions advertised by NEMAR |
Common flags
| Flag | Effect |
|---|---|
-o, --output DIR |
Target directory (default ./<DATASET>) |
-j, --jobs N |
Parallel downloads (default 16) |
--tag TAG |
Pin a version; default latest |
--downloader BACKEND |
auto (default) | s3 | python | datalad |
--no-data |
Sidecars only — skip annexed binaries |
--stimuli |
Add stimuli/ scope |
--derivatives |
Add derivatives/ scope |
--metadata-timeout S |
Override 30 s metadata timeout |
--verbose |
Echo resolved parameters before transfer |
BIDS filters (repeatable)
| Flag | Accepts |
|---|---|
--subject, --session, --task, --run, --acq |
001 or sub-001 |
--datatype, --suffix, --extension |
eeg, T1w, .set, … |
--scope |
raw, derivatives, stimuli, … |
--pipeline |
Subfolder under derivatives/ |
--entity key=value |
Generic BIDS entity |
--include PATTERN, --exclude PATTERN |
Path globs |
Labels accept either bare (001) or BIDS-prefixed (sub-001) form.
Examples
# One subject, one task, EEG .set + sidecars
nemar-py download nm000132 \
--subject 001 --task MMN --datatype eeg --suffix eeg --extension .set
# Derivatives from one pipeline
nemar-py download nm000132 --derivatives --pipeline eeglab --subject 001
# Metadata sweep — sidecars only, no big binaries
nemar-py download nm000132 --no-data -o nm000132-metadata
import nemar
nemar.download(
dataset="nm000132",
subject=["001", "002"],
task="MMN", datatype="eeg", suffix="eeg", extension=".set",
)
Behaviour
- Catalog (
index,version,manifest) is fetched fromhttps://data.nemar.org/{dataset}/. No auth. - File bytes use a layered chain: S3 → (DataLad) → HTTPS.
- S3 is tried first — anonymous public-read against
nemar.s3.us-east-2.amazonaws.com, content-addressed at<dataset>/objects/<git-annex-key>(eegdash-style direct fetch). - DataLad is an optional middle layer, active only when the
[datalad]extra is installed and the dataset index advertises adatalad_url. Absent the extra, this layer is skipped (a missing import is caught and falls through). - HTTPS through
data.nemar.orgis the always-available fallback, with Range/206 resume.
- S3 is tried first — anonymous public-read against
- BIDS root files (
dataset_description.json,participants.tsv/json,README*,CHANGES,LICENSE) are always kept — even with--include/--exclude.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nemar_py-0.2.0.tar.gz.
File metadata
- Download URL: nemar_py-0.2.0.tar.gz
- Upload date:
- Size: 55.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
92ab4e82ec5589736a5e7686ca61284139b5afa7c002cdb94182d5a6006b7519
|
|
| MD5 |
3b1db7e7e8fa2c9b4245fd851ac7f31e
|
|
| BLAKE2b-256 |
64228ce5fa1274a98e17a09d69ac0cd9dfadc14ed64ab6fabd7e4d4923a9bd04
|
Provenance
The following attestation bundles were made for nemar_py-0.2.0.tar.gz:
Publisher:
publish.yml on nemarOrg/nemar-py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nemar_py-0.2.0.tar.gz -
Subject digest:
92ab4e82ec5589736a5e7686ca61284139b5afa7c002cdb94182d5a6006b7519 - Sigstore transparency entry: 1660528157
- Sigstore integration time:
-
Permalink:
nemarOrg/nemar-py@169ccc5e4a23905eee838dd00cf96eda06c69774 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/nemarOrg
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@169ccc5e4a23905eee838dd00cf96eda06c69774 -
Trigger Event:
push
-
Statement type:
File details
Details for the file nemar_py-0.2.0-py3-none-any.whl.
File metadata
- Download URL: nemar_py-0.2.0-py3-none-any.whl
- Upload date:
- Size: 63.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6c4a98be7037f2a783cf74d51840582e5296308a505364aa46bb41999e4e1926
|
|
| MD5 |
a97323d0ce1d52c3c10016746923b622
|
|
| BLAKE2b-256 |
8d60d1cb919d4e98f3694208626da725cdb647515f3e525b61234816fc12d160
|
Provenance
The following attestation bundles were made for nemar_py-0.2.0-py3-none-any.whl:
Publisher:
publish.yml on nemarOrg/nemar-py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nemar_py-0.2.0-py3-none-any.whl -
Subject digest:
6c4a98be7037f2a783cf74d51840582e5296308a505364aa46bb41999e4e1926 - Sigstore transparency entry: 1660528275
- Sigstore integration time:
-
Permalink:
nemarOrg/nemar-py@169ccc5e4a23905eee838dd00cf96eda06c69774 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/nemarOrg
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@169ccc5e4a23905eee838dd00cf96eda06c69774 -
Trigger Event:
push
-
Statement type: