skillfed

pynwb

Package for working with Neurodata stored in the NWB format.

pynwb v4.1.0 263.4K downloads/30d#8,357 on PyPI222
Permissive license BSD-3-Clause Active released

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 pynwb

uv

uv add pynwb

poetry

poetry add pynwb

Installing 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

Development Status :: 5 - Production/StableIntended Audience :: DevelopersIntended Audience :: Science/ResearchLicense :: OSI Approved :: BSD LicenseOperating System :: MacOSOperating System :: Microsoft :: WindowsOperating System :: UnixProgramming Language :: PythonProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Scientific/Engineering :: Medical Science Apps.

Tags

nwb format python apineurophysiology data formatneurodata without bordersneural recording data storagehdf5 neuroscience databrain imaging data formatelectrophysiology data management
neurosciencedata-formathdf5

More Medical Science Apps. packages