py-uproot

ROOT I/O in pure Python and NumPy.

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

Science Score: 77.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 4 DOI reference(s) in README
  • Academic publication links
    Links to: zenodo.org
  • Committers with academic emails
    13 of 60 committers (21.7%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (14.5%) to scientific vocabulary

Keywords

analysis big-data bigdata file-format hep hep-ex hep-py numpy python root root-cern scikit-hep

Keywords from Contributors

apache-arrow cern-root columnar-format jagged-array ragged-array rdataframe histogram high-energy-physics particle-physics closember
Last synced: 4 months ago · JSON representation ·

Repository

ROOT I/O in pure Python and NumPy.

Basic Info
  • Host: GitHub
  • Owner: scikit-hep
  • License: bsd-3-clause
  • Language: Python
  • Default Branch: main
  • Homepage: https://uproot.readthedocs.io
  • Size: 4.3 MB
Statistics
  • Stars: 252
  • Watchers: 19
  • Forks: 84
  • Open Issues: 86
  • Releases: 141
Topics
analysis big-data bigdata file-format hep hep-ex hep-py numpy python root root-cern scikit-hep
Created over 5 years ago · Last pushed 4 months ago
Metadata Files
Readme Contributing License Citation

README.md

PyPI version Conda-Forge Python 3.9‒3.13 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.

bash pip install uproot

Uproot is also available using conda.

bash 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):

bash 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

bash 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 NumPy and packaging. Strict dependencies are automatically installed by pip (or conda).

Awkward Array is highly recommended and is automatically installed by pip (or conda), though it is possible to use Uproot without it. If you need a minimal installation, pass --no-deps to pip and pass library="np" to every array-fetching function, or globally set uproot.default_library to get NumPy arrays instead of Awkward Arrays.

  • awkward: Uproot 5.x requires Awkward 2.x.

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 ROOT files, compressed different ways:

  • lz4 and xxhash: if reading ROOT files that have been LZ4-compressed.
  • zstandard: if reading ROOT files that have been ZSTD-compressed.
  • ZLIB and LZMA are built in (Python standard library).

For accessing remote files:

  • minio: 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

💻

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

Owner

  • Name: Scikit-HEP Project
  • Login: scikit-hep
  • Kind: organization
  • Email: scikit-hep-forum@googlegroups.com

A community project for High Energy Physics data analysis in Python

Citation (CITATION.cff)

cff-version: 1.2.0
title: "Uproot"
message: "If you use this software, please cite it as below."
doi: "10.5281/zenodo.4340632"
date-released: "2017-09-13"
authors:
- family-names: "Pivarski"
  given-names: "Jim"
  affiliation: "Princeton University"
  orcid: "https://orcid.org/0000-0002-6649-343X"
  email: "jpivarski@gmail.com"
- family-names: "Schreiner"
  given-names: "Henry"
  affiliation: "Princeton University"
  orcid: "https://orcid.org/0000-0002-7833-783X"
  email: "henryfs@princeton.edu"
- family-names: "Hollands"
  given-names: "Angus"
  affiliation: "University of Birmingham"
  orcid: "https://orcid.org/0000-0003-0788-3814"
  email: "goosey15@gmail.com"
- family-names: "Das"
  given-names: "Pratyush"
  affiliation: "Purdue University"
  orcid: "https://orcid.org/0000-0001-8140-0097"
  email: "reikdas@gmail.com"
- family-names: "Kothari"
  given-names: "Kush"
  affiliation: "Veermata Jijabai Technological Institute"
  orcid: "https://orcid.org/0000-0001-8593-722X"
  email: "kushkothari2001@gmail.com"
- family-names: "Roy"
  given-names: "Aryan"
  affiliation: "Manipal Institute of Technology"
  orcid: "https://orcid.org/0000-0001-5220-8725"
  email: "aryanroy5678@gmail.com"
- family-names: "Ling"
  given-names: "Jerry"
  affiliation: "Harvard University"
  orcid: "https://orcid.org/0000-0002-3359-0380"
  email: "jling@g.harvard.edu"
- family-names: "Smith"
  given-names: "Nicholas"
  affiliation: "Fermilab"
  orcid: "https://orcid.org/0000-0002-0324-3054"
  email: "nick.smith@cern.ch"
- family-names: "Burr"
  given-names: "Chris"
  affiliation: "CERN"
  orcid: "https://orcid.org/0000-0002-5155-1094"
  email: "christopher.burr@cern.ch"
- family-names: "Stark"
  given-names: "Giordon"
  affiliation: "Santa Cruz Institute for Particle Physics"
  orcid: "https://orcid.org/0000-0001-6616-3433"
  email: "gstark@cern.ch"
- family-names: "Rios Tascon"
  given-names: "Andres"
  affiliation: "Princeton University"
  orcid: "https://orcid.org/0000-0003-3282-2634"
  email: "ariostas@princeton.edu"

GitHub Events

Total
  • Create event: 89
  • Release event: 6
  • Issues event: 70
  • Watch event: 20
  • Delete event: 80
  • Member event: 2
  • Issue comment event: 229
  • Push event: 250
  • Pull request review comment event: 86
  • Pull request review event: 167
  • Pull request event: 170
  • Fork event: 13
Last Year
  • Create event: 89
  • Release event: 6
  • Issues event: 70
  • Watch event: 20
  • Delete event: 80
  • Member event: 2
  • Issue comment event: 229
  • Push event: 250
  • Pull request review comment event: 86
  • Pull request review event: 167
  • Pull request event: 170
  • Fork event: 13

Committers

Last synced: 10 months ago

All Time
  • Total Commits: 953
  • Total Committers: 60
  • Avg Commits per committer: 15.883
  • Development Distribution Score (DDS): 0.482
Past Year
  • Commits: 128
  • Committers: 25
  • Avg Commits per committer: 5.12
  • Development Distribution Score (DDS): 0.781
Top Committers
Name Email Commits
Jim Pivarski j****i 494
pre-commit-ci[bot] 6****] 96
allcontributors[bot] 4****] 67
Luis Antonio Obis Aparicio 3****s 43
ioanaif i****m@g****m 33
Henry Schreiner h****r@c****h 29
dependabot[bot] 4****] 29
Andres Rios Tascon a****s@g****m 22
Angus Hollands g****5@g****m 13
Kush Kothari 5****1 13
Lindsey Gray l****y@g****m 12
Nicholas Smith n****h@c****h 12
Dmitry Kalinkin d****n@g****m 8
Aryan Roy 5****y 7
Doug Davis d****s@d****o 5
Jerry Ling p****n@j****v 5
Nikolai Hartmann n****e@p****e 5
Chris Burr c****r 5
Ianna Osborne i****e@c****h 5
Peter Fackeldey p****y@r****e 3
Zoë Bilodeau 7****a 3
Giordon Stark k****g@g****m 3
Ryunosuke O'Neil r****l@c****h 2
Matthew Feickert m****t@c****h 2
Jonas Rübenach j****h@d****e 2
Ben Greiner c****e@b****e 1
Andrzej Novak n****j@g****m 1
Benjamin Tovar b****r@n****u 1
Andrea Serafini 4****a 1
jpivarski j****i@p****n 1
and 30 more...
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 4 months ago

All Time
  • Total issues: 208
  • Total pull requests: 565
  • Average time to close issues: 5 months
  • Average time to close pull requests: 10 days
  • Total issue authors: 106
  • Total pull request authors: 46
  • Average comments per issue: 2.15
  • Average comments per pull request: 1.49
  • Merged pull requests: 474
  • Bot issues: 1
  • Bot pull requests: 171
Past Year
  • Issues: 48
  • Pull requests: 205
  • Average time to close issues: 18 days
  • Average time to close pull requests: 6 days
  • Issue authors: 33
  • Pull request authors: 22
  • Average comments per issue: 0.65
  • Average comments per pull request: 1.06
  • Merged pull requests: 167
  • Bot issues: 1
  • Bot pull requests: 79
Top Authors
Issue Authors
  • jpivarski (41)
  • alexander-held (8)
  • ariostas (6)
  • lobis (5)
  • nikoladze (5)
  • Esword618 (4)
  • lgray (4)
  • ivukotic (4)
  • matthewfeickert (4)
  • acampove (4)
  • oshadura (3)
  • chrisburr (3)
  • bockjoo (3)
  • kratsg (3)
  • nsmith- (3)
Pull Request Authors
  • pre-commit-ci[bot] (92)
  • jpivarski (88)
  • ariostas (69)
  • dependabot[bot] (51)
  • ioanaif (43)
  • lobis (40)
  • allcontributors[bot] (28)
  • lgray (23)
  • ianna (16)
  • henryiii (16)
  • nsmith- (12)
  • agoose77 (8)
  • zbilodea (8)
  • pfackeldey (8)
  • douglasdavis (6)
Top Labels
Issue Labels
bug (unverified) (77) feature (53) bug (37) docs (13) big-project (7) tests (6) performance (5) installation (3) policy (2) next-release (2) needs-test-file (2) cleanup (2) good first issue (1) dependencies (1) ci (1)
Pull Request Labels
dependencies (51) next-release (6) inactive (5) github_actions (5) feature (1) tests (1)

Packages

  • Total packages: 4
  • Total downloads:
    • pypi 216,726 last-month
  • Total docker downloads: 77,414
  • Total dependent packages: 95
    (may contain duplicates)
  • Total dependent repositories: 280
    (may contain duplicates)
  • Total versions: 533
  • Total maintainers: 3
pypi.org: uproot

ROOT I/O in pure Python and NumPy.

  • Versions: 324
  • Dependent Packages: 83
  • Dependent Repositories: 240
  • Downloads: 216,726 Last month
  • Docker Downloads: 77,414
Rankings
Dependent packages count: 0.2%
Downloads: 0.8%
Dependent repos count: 1.0%
Docker downloads count: 1.1%
Average: 2.2%
Stargazers count: 4.7%
Forks count: 5.4%
Maintainers (2)
Last synced: 4 months ago
spack.io: py-uproot

ROOT I/O in pure Python and NumPy. Uproot is a reader and a writer of the ROOT file format using only 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.

  • Versions: 31
  • Dependent Packages: 2
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Average: 14.0%
Dependent packages count: 28.1%
Maintainers (1)
Last synced: 4 months ago
conda-forge.org: uproot

uproot (originally μproot, for "micro-Python ROOT") is a reader and a writer of the ROOT file format using only 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 calls to rapidly cast data blocks in the ROOT file as Numpy arrays.

  • Versions: 90
  • Dependent Packages: 9
  • Dependent Repositories: 32
Rankings
Dependent packages count: 6.5%
Dependent repos count: 6.5%
Average: 15.8%
Forks count: 23.3%
Stargazers count: 26.7%
Last synced: 5 months ago
conda-forge.org: uproot-base

uproot (originally μproot, for "micro-Python ROOT") is a reader and a writer of the ROOT file format using only 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 calls to rapidly cast data blocks in the ROOT file as Numpy arrays.

  • Versions: 88
  • Dependent Packages: 1
  • Dependent Repositories: 8
Rankings
Dependent repos count: 12.2%
Average: 22.8%
Forks count: 23.3%
Stargazers count: 26.7%
Dependent packages count: 29.0%
Last synced: 5 months ago

Dependencies

.github/workflows/build-test.yml actions
  • actions/checkout v4 composite
  • actions/setup-python v4 composite
  • conda-incubator/setup-miniconda v2 composite
.github/workflows/deploy.yml actions
  • actions/checkout v4 composite
  • actions/download-artifact v3 composite
  • actions/upload-artifact v3 composite
  • pypa/gh-action-pypi-publish release/v1 composite
.github/workflows/semantic-pr-title.yml actions
  • amannn/action-semantic-pull-request v5 composite
docs-sphinx/requirements.txt pypi
  • sphinx >=2.4.4
pyproject.toml pypi
  • awkward >=2.0.0
  • importlib-metadata python_version<"3.8"
  • numpy *
  • packaging *