Skip to main content

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 from https://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 a datalad_url. Absent the extra, this layer is skipped (a missing import is caught and falls through).
    • HTTPS through data.nemar.org is the always-available fallback, with Range/206 resume.
  • 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

nemar_py-0.2.1.tar.gz (57.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nemar_py-0.2.1-py3-none-any.whl (65.0 kB view details)

Uploaded Python 3

File details

Details for the file nemar_py-0.2.1.tar.gz.

File metadata

  • Download URL: nemar_py-0.2.1.tar.gz
  • Upload date:
  • Size: 57.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for nemar_py-0.2.1.tar.gz
Algorithm Hash digest
SHA256 3e2d7594792ade65b27ee514180b1034b40784d59ecc027453a2ae659183967d
MD5 e6f7b542f3609579800d369f1d4793b7
BLAKE2b-256 1ec843d8c3d0da0134168806e90b98ff99e78afced29be9e60d3191a65f40ed6

See more details on using hashes here.

Provenance

The following attestation bundles were made for nemar_py-0.2.1.tar.gz:

Publisher: publish.yml on nemarOrg/nemar-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nemar_py-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: nemar_py-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 65.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for nemar_py-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c070414aae85761abc6d56d2ebc95ee8f4d1f6efc9f81f2f97f6f5a83f08359b
MD5 79cd2aac8f6ab7ddaf70e659c0e0b894
BLAKE2b-256 3849f088404503a8a26971f8e79b2161447d062e1b0ed01b94b5a83f3fa739f6

See more details on using hashes here.

Provenance

The following attestation bundles were made for nemar_py-0.2.1-py3-none-any.whl:

Publisher: publish.yml on nemarOrg/nemar-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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