neurokit2
The Python Toolbox for Neurophysiological Signal Processing.
What it is and what it does
NeuroKit2 is a Python toolbox for processing and analyzing physiological signals commonly recorded in research and clinical settings. It wraps complex signal processing operations (filtering, peak detection, feature extraction) into high-level functions that researchers and clinicians can call with minimal code—the description example shows analysis completed in two function calls. The package supports multiple signal types: ECG (electrocardiogram), RSP (respiration), EDA (electrodermal activity), EMG (electromyography), PPG (photoplethysmography), and EOG (electrooculography).
The package is built on established scientific libraries (numpy, scipy, scikit-learn, pandas, matplotlib) and provides both simple "master" functions for standard workflows and lower-level functions for custom pipelines. It includes example datasets and supports signal simulation for testing. The codebase is actively maintained, has a published peer-reviewed paper (2021), and is designed to be accessible to users without deep expertise in signal processing or programming.
Use it for:
- Preprocess and extract heart rate variability features from ECG recordings for cardiovascular research.
- Analyze electrodermal activity (skin conductance) peaks and troughs in emotion or stress studies.
- Extract respiratory rate and variability metrics from respiration signals in sleep or exercise studies.
- Simulate synthetic physiological signals to validate custom analysis pipelines before applying them to real data.
- Perform event-related analysis by aligning and processing multiple signal types around experimental events.
- Locate and delineate ECG waveform components (P, Q, R, S, T waves) for detailed cardiac morphology analysis.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
NeuroKit2 processes physiological signals (ECG, RSP, EDA, EMG, PPG, EOG) with high-level functions that handle filtering, peak detection, and feature extraction in minimal code.
Yes, if you work with physiological signals and want to avoid building signal processing pipelines from scratch. The package is actively maintained, permissively licensed, has low install friction, and is backed by published research. The Pre-Alpha classifier is a minor concern—verify current stability for production use—but the active repository, recent releases, and substantial community adoption suggest it is reliable for research and clinical applications.
Install
neurokit2 on PyPI
pip
pip install neurokit2uv
uv add neurokit2poetry
poetry add neurokit2Installing neurokit2
Before you install
Low install friction with a pure-Python wheel. Maintenance is active with recent commits and a substantial community (2324 stars). Supports modern Python versions (3.10–3.14).
License in practice
MIT License permits commercial and private use with minimal restrictions; you may use, modify, and distribute the package freely provided you include the license notice.
Quickstart
pip install neurokit2
import neurokit2 as nk
data = nk.data("bio_eventrelated_100hz")
processed_data, info = nk.bio_process(ecg=data["ECG"], rsp=data["RSP"], eda=data["EDA"], sampling_rate=100)
results = nk.bio_analyze(processed_data, sampling_rate=100)
Requires Python >=3.10; eight runtime dependencies (numpy, scipy, scikit-learn, pandas, matplotlib, pywavelets, requests, setuptools) will be installed automatically.
Verify before relying
- Whether the package's Pre-Alpha classifier (Development Status :: 2) reflects current stability or is outdated given active maintenance since 2019.
- Real-world performance and accuracy of signal processing algorithms compared to domain-specific alternatives.
- Whether all eight runtime dependencies are truly necessary for typical use cases or if some are optional.
Package facts
| License | MIT License (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 8 — matplotlib, numpy, pandas, pywavelets, requests, scikit-learn, scipy, setuptools |
| Maintenance | actively maintained — 165 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 175,694/month — #10,260 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: neurokit2-0.2.13-py3-none-any.whl
Keywords: ECG, EDA, EMG, NeuroKit2, PPG, Python, bodily signals, physiology
Tags
More Information Analysis packages
A drop-in replacement for Python's standard…
permissive · top 100 on PyPI
pyarrowpyarrow provides Python bindings to Apache…
permissive · top 100 on PyPI
networkxNetworkX provides data structures and…
permissive · top 1,000 on PyPI
snowflake-connector-pythonConnects Python applications to Snowflake data…
permissive · top 1,000 on PyPI
contourpyContourPy calculates contours of 2D…
permissive · top 1,000 on PyPI
snowflake-snowpark-pythonSnowpark Python provides APIs to query and…
permissive · top 1,000 on PyPI
pyPPGAnalyzes finger photoplethysmogram (PPG)…
agpl · top 15,000 on PyPI
wfdbRead, write, process, and plot physiologic…
permissive · top 15,000 on PyPI
edfioedfio reads and writes EDF, EDF+C, BDF, and…
permissive · top 15,000 on PyPI
mneMNE-Python provides tools for exploring,…
permissive · top 5,000 on PyPI
antropyAntroPy computes entropy and fractal dimension…
permissive · top 15,000 on PyPI
noisereduceReduces noise in audio and time-domain signals…
permissive · top 15,000 on PyPI
rupturesDetects change points in time series and signal…
permissive · top 5,000 on PyPI
PeakUtilsPeakUtils detects peaks in 1D data and refines…
permissive · top 15,000 on PyPI
cysignalsProvides interrupt and signal handling…
copyleft · top 15,000 on PyPI
benchpotsBenchPOTS provides standardized preprocessing…
permissive · top 15,000 on PyPI