skillfed

pybids

bids: interface with datasets conforming to BIDS

pybids v0.22.0 136.3K downloads/30d#11,399 on PyPI263
Permissive license The MIT License (MIT) Copyright (c) 2015-2016, Ariel Rokem, The University of Washington eScience Institute. Copyright (c) 2016--, PyBIDS developers, Planet Earth Permission is hereby granted, free… (full text in the JSON record) Active released

What it is and what it does

PyBIDS is a Python library that centralizes interactions with brain imaging datasets formatted according to the BIDS standard. It provides tools to query, validate, and programmatically access neuroimaging data organized in the standardized BIDS layout, eliminating the need to manually navigate directory structures and file naming conventions.

The package wraps core neuroimaging tools (numpy, scipy, nibabel, pandas) and integrates with bids-validator to ensure dataset compliance. It supports Python 3 on POSIX systems (Linux, macOS) and is actively maintained by the BIDS community. Installation brings in 12 runtime dependencies by default, though core querying functionality requires only the bids-validator package.

Use it for:

  • Query and retrieve specific imaging files from a BIDS dataset by subject, session, task, or modality without manual directory traversal.
  • Validate that a neuroimaging dataset conforms to BIDS specification before analysis or sharing.
  • Programmatically access metadata and file paths for batch processing of imaging data in research pipelines.
  • Generate reports on dataset structure and contents using the reports module.
  • Integrate BIDS dataset access into Python-based neuroimaging analysis workflows alongside nibabel and scipy.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

PyBIDS provides a Python interface to query, validate, and interact with neuroimaging datasets that conform to the BIDS (Brain Imaging Data Structure) standard format.

Yes. PyBIDS is actively maintained, has no known vulnerabilities, uses a permissive MIT license, and solves a concrete problem for neuroimaging researchers working with BIDS-formatted data. Low install friction makes it a safe choice. Install only if you work with BIDS datasets; it is not a general-purpose tool.

Install

pybids on PyPI

pip

pip install pybids

uv

uv add pybids

poetry

poetry add pybids

Installing pybids

Before you install

Low install friction with a pure-Python wheel and active maintenance. Last release was 155 days ago with an active repository (263 stars, last commit 2026-08-04). Requires Python 3.10 or later.

License in practice

MIT License (permissive) permits commercial and private use, modification, and distribution with minimal restrictions—only requiring attribution and inclusion of the license notice.

Quickstart

pip install pybids

from bids import BIDSLayout
layout = BIDSLayout('/path/to/bids/dataset')
subjects = layout.get_subjects()

Requires Python 3.10 or later; Windows is not officially supported though most functionality may work.

Verify before relying

  • Whether all 12 runtime dependencies are always required or only for specific modules.
  • Performance characteristics when working with very large BIDS datasets.
  • Current state of Windows compatibility despite official non-support claim.

Package facts

License The MIT License (MIT) Copyright (c) 2015-2016, Ariel Rokem, The University of Washington eScience Institute. Copyright (c) 2016--, PyBIDS developers, Planet Earth Permission is hereby granted, free… (full text in the JSON record) (permissive)
Python support supports the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 12 — numpy, scipy, nibabel, pandas, formulaic, sqlalchemy, bids-validator, bidsschematools, num2words, click, universal_pathlib, frozendict
Maintenance actively maintained — 155 days since the last release
Last repo commit
First released
Downloads 136,311/month — #11,399 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: pybids-0.22.0-py3-none-any.whl

Keywords: BIDS, neuroimaging

Development Status :: 3 - AlphaEnvironment :: ConsoleIntended Audience :: Science/ResearchLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Topic :: Scientific/Engineering

Tags

BIDS dataset interfaceneuroimaging data structurebrain imaging data queryBIDS validator pythonfMRI dataset managementneuroimaging file organization
neuroimagingbids-standarddata-query

More Scientific/Engineering packages