{"library":"pynwb","title":"PyNWB","description":"PyNWB is the official Python API for working with Neurodata Without Borders (NWB) files, a standardized data format for neurophysiology data. It facilitates reading, writing, and manipulating NWB files, providing a high-level interface to the underlying HDF5 structure. The current version is 3.1.3, and it maintains an active release cadence with regular minor updates and less frequent major versions supporting new NWB schema versions.","language":"python","status":"active","last_verified":"Sun May 17","install":{"commands":["pip install pynwb"],"cli":null},"imports":["from pynwb import NWBFile","from pynwb import NWBHDF5IO","from pynwb.base import TimeSeries","from pynwb.ecephys import ElectricalSeries","from pynwb.ophys import ImageSeries"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"from datetime import datetime\nfrom pynwb import NWBFile, TimeSeries, NWBHDF5IO\nimport numpy as np\nimport os\n\n# 1. Create a new NWBFile\nnwbfile = NWBFile(\n    session_description='My first NWB file tutorial',\n    identifier='NWB_Tutorial_1',\n    session_start_time=datetime.now().astimezone(),\n    experimenter='John Doe',\n    lab='Neuroscience Lab',\n    institution='University of Example',\n    experiment_description='Simple data creation for testing PyNWB.'\n)\n\n# 2. Add some TimeSeries data\ndata = np.random.rand(100, 1)\ntimestamps = np.linspace(0, 9.9, 100)\nseries = TimeSeries(\n    name='my_timeseries',\n    data=data,\n    timestamps=timestamps,\n    unit='volts',\n    description='A simple random time series.'\n)\n\nnwbfile.add_acquisition(series)\n\n# 3. Write the NWBFile to disk\nfilename = 'quickstart_example.nwb'\nwith NWBHDF5IO(filename, 'w') as io:\n    io.write(nwbfile)\n\nprint(f\"NWB file '{filename}' created successfully.\")\n\n# 4. Read the NWBFile from disk\nwith NWBHDF5IO(filename, 'r') as io:\n    read_nwbfile = io.read()\n    print(f\"\\nRead NWB file. Session description: {read_nwbfile.session_description}\")\n    read_series = read_nwbfile.acquisition['my_timeseries']\n    print(f\"Read TimeSeries data shape: {read_series.data.shape}\")\n    print(f\"Read TimeSeries unit: {read_series.unit}\")\n\n# Clean up the created file\n# os.remove(filename)","lang":"python","description":"This quickstart demonstrates how to create a basic NWB file, add a TimeSeries to it, and then write and read the file from disk using `NWBFile` and `NWBHDF5IO`. It covers the fundamental steps for data archival in the NWB format.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":{"tag":null,"tag_description":null,"last_tested":"2026-05-17","installed_version":"3.1.3","pypi_latest":"3.1.3","is_stale":false,"summary":{"python_range":"3.10–3.9","success_rate":90,"avg_install_s":9.8,"avg_import_s":3.61,"wheel_type":"wheel"},"results":[{"runtime":"python:3.10-alpine","python_version":"3.10","os_libc":"alpine (musl)","variant":"pynwb","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":3.5,"mem_mb":37.4,"disk_size":"190.5M"},{"runtime":"python:3.10-slim","python_version":"3.10","os_libc":"slim (glibc)","variant":"pynwb","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":10.1,"import_time_s":2.54,"mem_mb":37.4,"disk_size":"183M"},{"runtime":"python:3.11-alpine","python_version":"3.11","os_libc":"alpine (musl)","variant":"pynwb","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":4.86,"mem_mb":42.4,"disk_size":"213.7M"},{"runtime":"python:3.11-slim","python_version":"3.11","os_libc":"slim (glibc)","variant":"pynwb","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":9.2,"import_time_s":4.42,"mem_mb":42.4,"disk_size":"205M"},{"runtime":"python:3.12-alpine","python_version":"3.12","os_libc":"alpine (musl)","variant":"pynwb","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":3.36,"mem_mb":41.4,"disk_size":"199.6M"},{"runtime":"python:3.12-slim","python_version":"3.12","os_libc":"slim (glibc)","variant":"pynwb","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":9.2,"import_time_s":3.67,"mem_mb":41.4,"disk_size":"191M"},{"runtime":"python:3.13-alpine","python_version":"3.13","os_libc":"alpine (musl)","variant":"pynwb","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":3.38,"mem_mb":42.4,"disk_size":"198.4M"},{"runtime":"python:3.13-slim","python_version":"3.13","os_libc":"slim (glibc)","variant":"pynwb","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":9.3,"import_time_s":3.56,"mem_mb":42.4,"disk_size":"190M"},{"runtime":"python:3.9-alpine","python_version":"3.9","os_libc":"alpine (musl)","variant":"pynwb","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.9-slim","python_version":"3.9","os_libc":"slim (glibc)","variant":"pynwb","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":11.4,"import_time_s":3.16,"mem_mb":38,"disk_size":"192M"}]}}