UHI: Universal Histogram Interface
This is a package meant primarily for documenting histogram
indexing and the PlottableHistogram Protocol and any future cross-library
standards. It also contains the code for the PlottableHistogram Protocol, to be
used in type checking libraries wanting to conform to the protocol, and
uhi.testing, a set of tools for testing conformance to UHI indexing.
It is not usually a runtime dependency, but only a type checking, testing,
and/or docs dependency in support of other libraries (such as
boost-histogram 0.13+, hist 2.1+, mplhep 0.2.15+, uproot 4+,
and histoprint 2+). There are a few useful runtime usable components
(listed below). Older versions are available for Python 3.6+. See what's
new.
To assist plotting libraries in accepting Histograms from classic sources, see
uhi.numpy_plottable.ensure_plottable_histogram, which will adapt NumPy style
tuples into a simple PlottableHistogram.
The uhi.io module can read and write histograms in JSON, ZIP, HDF5, and ROOT
(with uproot or PyROOT),
and uhi.io.ops.add sums histograms bin-by-bin. The uhi add command does the
same for files, like ROOT's hadd. The uhi validate command checks files
against the schema (needs the schema extra).
The Protocols provided do support runtime checking, so
isinstance(h, uhi.typing.plottable.PlottableHistogram) is valid at runtime and
might be simpler than manually checking for the expected methods.
Release files for uhi 1.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| uhi-1.2.0.tar.gz | 77.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| uhi-1.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 115.8 kB
Release files / uhi-1.2.0.tar.gz
| Download URL | uhi-1.2.0.tar.gz |
|---|---|
| Size | 77.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3c292bf7884a7c3f35e687e92dc756407e575d19c15c9f99c8197a16fb6708c2
|
|
BLAKE2b-256 checksum How to use checksums |
e813fac61d3027116f874021cbbd97f0ff11483c0776cdbb8c5da1c51b48e878
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 24, 2026.
Transparency logRelease files / uhi-1.2.0-py3-none-any.whl
| Download URL | uhi-1.2.0-py3-none-any.whl |
|---|---|
| Size | 38.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1b2040b9ce7b5d934e463ce2bc607e3ba5987797baac1b8899c57891778a8ac3
|
|
BLAKE2b-256 checksum How to use checksums |
b0c38bd5b1b7c9fd88af01e287f1b5f2e95195d0d81b28f844a3149e804d7957
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 24, 2026.
Transparency log