pynwb
Package for working with Neurodata stored in the NWB format.
What it is and what it does
PyNWB is the reference Python implementation for the NWB format, a standardized data structure developed to unify how neurophysiology labs store and share cellular-level neural recordings. It sits on top of HDF5 (via h5py) and provides object-oriented abstractions for organizing experimental metadata, time-series recordings, and analysis results into a single self-describing file. The package is maintained by the Neurodata Without Borders project and has been in active development since 2017.
You use PyNWB when you need to store, retrieve, or exchange neural electrophysiology data in a format that other labs and tools can read. It handles the complexity of HDF5 file structure and NWB schema compliance, letting you focus on your data rather than file format details. The library depends on numpy for array handling, pandas for tabular data, and hdmf (the hierarchical data management framework) for schema validation.
Use it for:
- Store multi-electrode array recordings with spike times, LFP signals, and behavioral annotations in a shareable format.
- Read NWB files from public neuroscience repositories or collaborators' experiments for downstream analysis.
- Convert legacy neurophysiology data (custom binary, CSV, or proprietary formats) into standardized NWB files for archival.
- Organize and validate complex experimental metadata (subject info, stimulus protocols, device specifications) alongside raw recordings.
- Build analysis pipelines that consume NWB files as input and produce standardized outputs compatible with other labs' tools.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
PyNWB provides a high-level Python API for reading, writing, and working with neurophysiology data stored in the NWB (Neurodata Without Borders) format, a unified standard for cellular-based neural recordings.
Yes. PyNWB is production-stable (Development Status 5), actively maintained with recent releases, carries no known security vulnerabilities, and has low install friction. Install it if you work with neurophysiology data and need interoperability with the NWB ecosystem or plan to share data with other labs. If you only work with proprietary vendor formats and have no collaboration requirements, it may not be necessary.
Install
pynwb on PyPI
pip
pip install pynwbuv
uv add pynwbpoetry
poetry add pynwbInstalling pynwb
Before you install
Low install friction with a pure-wheel distribution and six common dependencies (h5py, hdmf, numpy, pandas, platformdirs, python-dateutil). The package is actively maintained with a release 21 days old and recent commits, supporting Python 3.10 through 3.14.
License in practice
BSD-3-Clause permissive license allows commercial and private use with minimal restrictions, requiring only retention of copyright and license notices in redistributions.
Quickstart
pip install pynwb
import pynwb
from pynwb import NWBHDF5IO
# Read an NWB file
with NWBHDF5IO('data.nwb', 'r') as io:
nwbfile = io.read()
Requires HDF5 system library (typically pre-installed on most systems; h5py handles the binding).
Verify before relying
- Whether the package supports reading/writing both structured and unstructured neural data types beyond basic time series.
- Performance characteristics when working with large-scale datasets (gigabyte+ files).
- Compatibility with specific neuroscience software ecosystems or analysis frameworks.
Package facts
| License | BSD-3-Clause (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 6 — h5py, hdmf, numpy, pandas, platformdirs, python-dateutil |
| Maintenance | actively maintained — 21 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 263,403/month — #8,357 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pynwb-4.1.0-py3-none-any.whl
Tags
More Medical Science Apps. packages
Client library for the Firecrawl API that…
permissive · top 5,000 on PyPI
pydicomPydicom reads, modifies, and writes DICOM…
permissive · top 5,000 on PyPI
PubChemPyPubChemPy is a Python wrapper around the…
permissive · top 5,000 on PyPI
vtkVTK is a 3D graphics, image processing, and…
permissive · top 5,000 on PyPI
pyhmmerPyHMMER provides Python bindings to HMMER3, a…
permissive · top 5,000 on PyPI
firecrawlA Python SDK for web scraping, crawling,…
permissive · top 5,000 on PyPI
neoNeo provides a unified data model for…
permissive · top 15,000 on PyPI
hdmfHDMF provides APIs for defining hierarchical…
permissive · top 15,000 on PyPI
ncompressProvides LZW compression and decompression…
permissive · top 15,000 on PyPI
mne-bidsMNE-BIDS reads and writes neuroimaging datasets…
permissive · top 15,000 on PyPI
mneMNE-Python provides tools for exploring,…
permissive · top 5,000 on PyPI
h5pyh5py reads and writes HDF5 files from Python,…
permissive · top 1,000 on PyPI
pybidsPyBIDS provides a Python interface to query,…
permissive · top 15,000 on PyPI
pynrrdReads and writes NRRD (Nearly Raw Raster Data)…
permissive · top 15,000 on PyPI
noneA library providing additional utilities and…
permissive · top 15,000 on PyPI