uproot
ROOT I/O in pure Python and NumPy.
What it is and what it does
Uproot is a pure-Python I/O library for reading and writing ROOT files, the standard data format in high-energy physics experiments. It streams data directly into NumPy arrays and other Python data structures without depending on the C++ ROOT library, making it lightweight and suitable for machine learning pipelines. The package integrates with NumPy, Awkward Array for irregular data, and optional libraries like Pandas and Dask for downstream analysis.
Unlike PyROOT or root_numpy, Uproot does not require a C++ ROOT installation, reducing setup complexity. It handles both simple columnar data and complex nested structures through its Awkward Array dependency. The library supports reading from local files and remote sources (S3, XRootD, HTTP) via fsspec, and can export to Pandas DataFrames or Dask collections for distributed computing.
Use it for:
- Stream particle physics detector data from ROOT files into NumPy arrays for machine learning model training.
- Convert ROOT histograms and TTrees to Pandas DataFrames for statistical analysis and plotting.
- Read remote ROOT files from S3 or XRootD servers in a distributed Dask workflow without downloading locally.
- Extract nested or jagged array structures from ROOT files using Awkward Array for complex event data.
- Integrate ROOT data into Python-native analysis pipelines without installing the full C++ ROOT framework.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Uproot reads and writes ROOT files (the data format used in high-energy physics) directly in Python using NumPy, without requiring the C++ ROOT library.
Yes. Uproot is production-stable (Development Status 5), actively maintained, has no known vulnerabilities, and solves a specific problem—reading ROOT files in pure Python—with low install friction. It is the standard choice for HEP researchers and ML engineers working with CERN data who want to avoid C++ ROOT dependencies. Install it if you work with ROOT files or need to integrate them into Python data pipelines.
Install
uproot on PyPI
pip
pip install uprootuv
uv add uprootpoetry
poetry add uprootInstalling uproot
Before you install
Low friction: pure Python wheel with seven runtime dependencies (awkward, cramjam, fsspec, numpy, packaging, typing-extensions, xxhash) that pip installs automatically. Active maintenance with a recent release 41 days ago.
License in practice
BSD-3-Clause is permissive; you can use, modify, and distribute this package freely in both open-source and commercial projects, provided you include the license notice.
Quickstart
pip install uproot
import uproot
file = uproot.open('data.root')
tree = file['tree_name']
array = tree['branch_name'].array()
Requires Python 3.10 or later.
Verify before relying
- Whether remote file access (s3://, root://) requires optional dependencies to be installed separately.
- Performance characteristics when handling very large ROOT files or streaming into distributed frameworks like Dask.
Package facts
| License | BSD-3-Clause (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 7 — awkward, cramjam, fsspec, numpy, packaging, typing-extensions, xxhash |
| Maintenance | actively maintained — 41 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,162,583/month — #4,283 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: uproot-5.7.5-py3-none-any.whl
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
uproot3Reads and writes ROOT files (the data format…
permissive · top 15,000 on PyPI
uproot3-methodsAdds physics-oriented methods to ROOT file…
permissive · top 15,000 on PyPI
coffeacoffea provides columnar data analysis tools…
permissive · top 15,000 on PyPI
hepconverthepconvert converts between columnar file…
permissive · top 15,000 on PyPI
xrootdProvides Python bindings to XRootD, a…
copyleft · top 5,000 on PyPI
correctionlibProvides a JSON-based format and evaluator for…
permissive · top 15,000 on PyPI
hepunitsProvides units and physical constants in the…
permissive · top 15,000 on PyPI
mplhepmplhep provides matplotlib styling and helper…
permissive · top 15,000 on PyPI
boost-histogramboost-histogram provides Python bindings to…
permissive · top 5,000 on PyPI
npTDMSRead and write TDMS files (LabVIEW data format)…
copyleft · top 15,000 on PyPI