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.2.tar.gz (58.0 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.2-py3-none-any.whl (65.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: nemar_py-0.2.2.tar.gz
  • Upload date:
  • Size: 58.0 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.2.tar.gz
Algorithm Hash digest
SHA256 a775356811b685881dbafb7bc8b2d0dc622282534a0c8277647443e07d2e0b09
MD5 6e8e91c2f744d179853b152cfdff98ff
BLAKE2b-256 7cb3ef16248fc04815eddf65d60818a0e750e60056973be17983ea8ea98cb3f2

See more details on using hashes here.

Provenance

The following attestation bundles were made for nemar_py-0.2.2.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.2-py3-none-any.whl.

File metadata

  • Download URL: nemar_py-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 65.5 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 69d35a9e3092c8cc1604d3343a264db35125e56a2b1f4e4e6bca86b0937df9ec
MD5 54e4fcc8873e177ee5babf5bd148f83b
BLAKE2b-256 e0e1e8ce3d5cfc0fad44bb8a2a80ce1da7103eaf48ab3532501e9d2a86c9d823

See more details on using hashes here.

Provenance

The following attestation bundles were made for nemar_py-0.2.2-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