skillfed

coffea

Basic tools and wrappers for enabling not-too-alien syntax when running columnar Collider HEP analysis.

coffea v2026.7.0 657.9K downloads/30d#5,474 on PyPI145
Permissive license BSD-3-Clause Active released

What it is and what it does

coffea is a Python framework for columnar analysis of high-energy physics data, designed to make working with ROOT files and complex event structures feel natural to scientists familiar with NumPy and Pandas. It wraps uproot for transparent ROOT file access and awkward-array for handling jagged and nested data structures common in particle physics, allowing analysts to write physics logic in a vectorized, array-oriented style rather than event-by-event loops.

The package also provides histogramming, plotting, and lookup-table utilities needed for physics analysis workflows, plus built-in support for horizontal scaling across diverse compute resources—from a laptop to multi-core servers, clusters, and supercomputers—without requiring changes to analysis code. This is achieved through integration with modern distributed computing frameworks like Dask and Parsl, making it possible to prototype locally and scale to production without rewriting.

Use it for:

  • Process and analyze ROOT files from particle detector experiments using columnar operations and NumPy-like syntax.
  • Build scalable physics analysis pipelines that run unchanged on a laptop, multi-core server, or computing cluster.
  • Apply corrections and transformations to Monte Carlo simulation data to match real experimental measurements.
  • Manipulate jagged and nested event structures (e.g., variable-length particle lists per event) efficiently.
  • Prototype analysis logic locally and then scale horizontally to process large datasets without code changes.

Worth the install?

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

coffea provides columnar data analysis tools for high-energy physics (HEP) experiments, enabling efficient manipulation of ROOT file data and event structures using NumPy-like syntax with horizontal scaling support.

Yes, if you are doing high-energy physics analysis with ROOT files and want columnar, vectorized workflows with built-in scaling. The package is actively maintained, has no known vulnerabilities, and carries a permissive license. The 25 dependencies are standard for scientific Python and will not be unusual in a physics environment. The Beta status and 'prototype' framing suggest the API may evolve, but active maintenance and recent releases indicate serious ongoing development.

Install

coffea on PyPI

pip

pip install coffea

uv

uv add coffea

poetry

poetry add coffea

Installing coffea

Before you install

Low friction installation with a pure-wheel distribution. Active maintenance with a recent release 39 days ago and commits through August 2026. The package carries 25 runtime dependencies including heavy scientific stacks (NumPy, SciPy, Numba, Pandas, PyArrow), which are standard for physics analysis but will add meaningful install time.

License in practice

BSD-3-Clause permissive license allows commercial and private use with attribution. No licensing restrictions on derivative works or distribution.

Quickstart

pip install coffea

import coffea
from coffea.nanoevents import NanoEventsFactory

events = NanoEventsFactory.from_root("file.root").events()

Requires Python 3.10 or later. ROOT file access requires uproot and awkward-array, which are installed as dependencies.

Verify before relying

  • Specific performance characteristics when scaling across different resource types (laptop to cluster to supercomputer)
  • Current stability guarantees given the 'Beta' development status and 'prototype' designation in documentation
  • Compatibility with specific ROOT file formats and versions beyond the basic uproot support

Package facts

License BSD-3-Clause (permissive)
Python support supports the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 25 — aiohttp, awkward, cachetools, cloudpickle, correctionlib, fsspec, hist, ipywidgets, loky, lz4, matplotlib, mplhep, numba, numpy, packaging, pandas, pyarrow, pydantic, requests, rich, scipy, toml, tqdm, uproot, vector
Maintenance actively maintained — 39 days since the last release
Last repo commit
First released
Downloads 657,901/month — #5,474 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: coffea-2026.7.0-py3-none-any.whl

Development Status :: 4 - BetaIntended Audience :: DevelopersIntended Audience :: Information TechnologyIntended Audience :: Science/ResearchLicense :: OSI Approved :: BSD LicenseOperating System :: MacOSOperating System :: Microsoft :: WindowsOperating System :: POSIXOperating System :: UnixProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Scientific/EngineeringTopic :: Scientific/Engineering :: Information AnalysisTopic :: Scientific/Engineering :: MathematicsTopic :: Scientific/Engineering :: PhysicsTopic :: Software DevelopmentTopic :: Utilities

Tags

HEP physics data analysiscolumnar ROOT file processingparticle physics event analysisdistributed physics computationawkward array physics workflowscollider experiment analysisscalable physics data pipelines
hep-physicsdistributed-computingdata-analysis

More Software Development packages