Skip to main content

ROOT I/O in pure Python and NumPy.

Reason this release was yanked:

The release introduced a bug that could cause a failure when trying to extend a root file past 2GB.

Project description

PyPI version Conda-Forge Python 3.10‒3.14 BSD-3 Clause License Continuous integration tests

Scikit-HEP DOI 10.5281/zenodo.4340632 Documentation Gitter

NSF-1836650 NSF-2121686 NSF-2323298

Uproot is a library for reading and writing ROOT files in pure Python and NumPy.

Unlike the standard C++ ROOT implementation, Uproot is only an I/O library, primarily intended to stream data into machine learning libraries in Python. Unlike PyROOT and root_numpy, Uproot does not depend on C++ ROOT. Instead, it uses Numpy to cast blocks of data from the ROOT file as Numpy arrays.

Installation

Uproot can be installed from PyPI using pip.

pip install uproot

Uproot is also available using conda.

conda install -c conda-forge uproot

If you have already added conda-forge as a channel, the -c conda-forge is unnecessary. Adding the channel is recommended because it ensures that all of your packages use compatible versions (see conda-forge docs):

conda config --add channels conda-forge
conda update --all

Getting help

Start with the tutorials and reference documentation.

Installation for developers

Uproot is an ordinary Python library; you can get a copy of the code with

git clone https://github.com/scikit-hep/uproot5.git

and install it locally by calling pip install -e . in the repository directory.

If you need to develop Awkward Array as well, see its installation for developers.

Dependencies

Uproot's only strict dependencies are Awkward, Cramjam, xxhash, fsspec, NumPy, packaging. Strict dependencies are automatically installed by pip (or conda).

The following libraries are also useful in conjunction with Uproot, but are not necessary. If you call a function that needs one, you'll be prompted to install it. (Conda installs most of these automatically.)

For accessing remote files:

  • s3fs: if reading files with s3:// URIs.
  • xrootd: if reading files with root:// URIs.
  • HTTP/S access is built in (Python standard library).

For distributed computing with Dask:

For exporting TTrees to Pandas:

  • pandas: if library="pd".
  • awkward-pandas: if library="pd" and the data have irregular structure ("jagged" arrays), see awkward-pandas.

For exporting histograms:

  • boost-histogram: if converting histograms to boost-histogram with histogram.to_boost().
  • hist: if converting histograms to hist with histogram.to_hist().

Acknowledgements

Support for this work was provided by NSF cooperative agreements OAC-1836650 and PHY-2323298 (IRIS-HEP), grant OAC-1450377 (DIANA/HEP), and PHY-2121686 (US-CMS LHC Ops).

Thanks especially to the gracious help of Uproot contributors (including the original repository).

Jim Pivarski
Jim Pivarski

💻 📖 🚇 🚧
Pratyush Das
Pratyush Das

💻 🚇
Chris Burr
Chris Burr

💻 🚇
Dmitri Smirnov
Dmitri Smirnov

💻
Matthew Feickert
Matthew Feickert

🚇
Tamas Gal
Tamas Gal

💻
Luke Kreczko
Luke Kreczko

💻 ⚠️
Nicholas Smith
Nicholas Smith

💻
Noah Biederbeck
Noah Biederbeck

💻
Oksana Shadura
Oksana Shadura

💻 🚇
Henry Schreiner
Henry Schreiner

💻 🚇 ⚠️
Mason Proffitt
Mason Proffitt

💻 ⚠️
Jonas Rembser
Jonas Rembser

💻
benkrikler
benkrikler

💻
Hans Dembinski
Hans Dembinski

📖
Marcel R.
Marcel R.

💻
Ruggero Turra
Ruggero Turra

💻
Jonas Rübenach
Jonas Rübenach

💻
bfis
bfis

💻
Raymond Ehlers
Raymond Ehlers

💻
Andrzej Novak
Andrzej Novak

💻
Josh Bendavid
Josh Bendavid

💻
Doug Davis
Doug Davis

💻
Chao Gu
Chao Gu

💻
Lukas Koch
Lukas Koch

💻
Michele Peresano
Michele Peresano

💻
Edoardo
Edoardo

💻
JMSchoeffmann
JMSchoeffmann

💻
alexander-held
alexander-held

💻
Giordon Stark
Giordon Stark

💻
Ryunosuke O'Neil
Ryunosuke O'Neil

💻
ChristopheRappold
ChristopheRappold

📖
Cosmin Deaconu
Cosmin Deaconu

⚠️ 💻
Carlos Pegueros
Carlos Pegueros

📖 💡 ⚠️
Benjamin Tovar
Benjamin Tovar

💻
Duncan Macleod
Duncan Macleod

🚇
mpad
mpad

💻
Peter Fackeldey
Peter Fackeldey

💻
Kush Kothari
Kush Kothari

💻
Aryan Roy
Aryan Roy

💻
Jerry Ling
Jerry Ling

💻
kakwok
kakwok

💻
Dmitry Kalinkin
Dmitry Kalinkin

💻 🚇
Nikolai Hartmann
Nikolai Hartmann

💻
Kilian Lieret
Kilian Lieret

📖
Daniel Cervenkov
Daniel Cervenkov

💻
Beojan Stanislaus
Beojan Stanislaus

💻
Angus Hollands
Angus Hollands

💻 🚧
Luis Antonio Obis Aparicio
Luis Antonio Obis Aparicio

💻
renyhp
renyhp

💻
Lindsey Gray
Lindsey Gray

💻
ioanaif
ioanaif

💻
OTABI Tomoya
OTABI Tomoya

⚠️
Jost Migenda
Jost Migenda

📖
Gaétan Lepage
Gaétan Lepage

⚠️
HaarigerHarald
HaarigerHarald

💻
Ben Greiner
Ben Greiner

⚠️
Robin Sonnabend
Robin Sonnabend

💻
Bo Johnson
Bo Johnson

💻
Miles
Miles

💻
djw9497
djw9497

💻
Piotr Sobczyński
Piotr Sobczyński

💻
Giedrius Juškevičius
Giedrius Juškevičius

💻
MatousVozak
MatousVozak

💻
Andrea Serafini
Andrea Serafini

💻
Andres Rios Tascon
Andres Rios Tascon

💻
Iason Krommydas
Iason Krommydas

💻
fstrug
fstrug

💻
Zach Marshall
Zach Marshall

💻
Mingrun Li
Mingrun Li

💻
Ianna Osborne
Ianna Osborne

💻
Rachit931
Rachit931

📖
Wouter Deconinck
Wouter Deconinck

💻
Karan Singh
Karan Singh

💻
Nick Prouse
Nick Prouse

💻

💻: code, 📖: documentation, 🚇: infrastructure, 🚧: maintainance, ⚠: tests/feedback, 🤔: foundational ideas.

Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

uproot-5.7.3.tar.gz (1.0 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

uproot-5.7.3-py3-none-any.whl (395.8 kB view details)

Uploaded Python 3

File details

Details for the file uproot-5.7.3.tar.gz.

File metadata

  • Download URL: uproot-5.7.3.tar.gz
  • Upload date:
  • Size: 1.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for uproot-5.7.3.tar.gz
Algorithm Hash digest
SHA256 71ec0469ce8060655e9b450cd0bd63f172804ec0aa1ed002362e0c94f896fb04
MD5 7ae15e81448af8b98c35f398d0985709
BLAKE2b-256 142b465e19332b3e470d87f6e2b48653a4c71c8807db57511dffc651aca8407d

See more details on using hashes here.

Provenance

The following attestation bundles were made for uproot-5.7.3.tar.gz:

Publisher: deploy.yml on scikit-hep/uproot5

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file uproot-5.7.3-py3-none-any.whl.

File metadata

  • Download URL: uproot-5.7.3-py3-none-any.whl
  • Upload date:
  • Size: 395.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for uproot-5.7.3-py3-none-any.whl
Algorithm Hash digest
SHA256 aeb096ab2ef10f96c3914fcf981352b69e350fac58a4658586f7eb9e3326b957
MD5 a43b41fce2de486f451c32e187972123
BLAKE2b-256 c45585e2732345dd8b66437cddedac4ee7ef2d9c25bf8792830b095f2ee658f3

See more details on using hashes here.

Provenance

The following attestation bundles were made for uproot-5.7.3-py3-none-any.whl:

Publisher: deploy.yml on scikit-hep/uproot5

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page