Getting started¶
Installation¶
Somnio requires Python 3.10+.
With uv¶
To use the CLI, install with the optional cli extra:
The download-nsrr command also needs the nsrr extra:
Extras matrix¶
Somnio ships small optional extras so you can install only what you use:
cli: command-line interface (typer,loguru)nsrr: NSRR download helpers (use withcli)schemas: pipeline YAML/JSON schemas (pydantic,pyyaml)signal: signal processing utilities used by detectors (SciPy)mne: MNE-based processing utilitiesedf: EDF I/O (edfio, plusmne)hdf5: HDF5 layouts (h5py)
With pip¶
For CLI support:
For download-nsrr:
For signal-processing detectors that require SciPy:
For HDF5 signal layouts (somnio.io.hdf5, native and USleep formats):
Verify installation¶
If you installed the CLI extra, confirm it works:
You should see the list of commands (e.g. download-nsrr).