Pythonic interface to the HepMC3 C++ library.
Project description
A Pythonic wrapper for the HepMC3 C++ library.
pyhepmc was formerly known as pyhepmc-ng. The development of pyhepmc-ng continues in the pyhepmc package.
HepMC3 has its own Python bindings. Why should you use these?
pyhepmc is easy to install
The command pip install pyhepmc just works on all common platforms. Since we publish binary wheels, you don’t need to compile anything. Since we include the HepMC3 library, you don’t need to install it separately either.
However, building from source is also easy. External software is not required. Just download the repository with git clone --recursive and run pip install -v -e ..
pyhepmc is Pythonic and Jupyter notebook-friendly
pyhepmc is a hand-crafted mapping of C++ code to Python, see documentation for details. Python idioms are supported where appropriate. The classes are designed to render well in Jupyter notebooks.
C++ methods which act like properties are represented as properties, e.g. GenParticle::set_status and GenParticle::status are mapped to a single GenParticle.status field in Python.
Tuples and lists are implicitly convertible to FourVector and ToolInfo objects.
Vectors of objects on the C++ side are mapped to Python lists.
Reader and Writer classes support the context manager protocol. Reader objects can be iterated over.
A convenient open function is provided for reading and writing HepMC files.
pyhepmc supports visualizations powered by graphviz
pyhepmc can optionally visualize events, using the mature graphviz library as a backend.
pyhepmc is actively maintained
pyhepmc is part of the Scikit-HEP project, which aims to provide all tools needed by particle physicists to do data analysis in Python. There is also official collaboration with the HepMC3 project.
pyhepmc is thoroughly unit tested
We aim for 100% coverage, not quite there yet.
Documentation
pyhepmc mirrors the C++ interface of the HepMC3 library, which is documented here. The documentation is mostly copied from HepMC3 and available as Python docstrings, so you can use Python’s help() browser to learn about the API. Alternatively, you can consult our online reference generated from these docstrings.
License
pyhepmc is covered by the BSD 3-clause license, see the LICENSE file for details. This license only applies to the pyhepmc code. The connected external libraries HepMC3 and pybind11 are covered by other licenses, as described in their respective LICENSE files.
Project details
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
Built Distributions
File details
Details for the file pyhepmc-2.5.1.tar.gz
.
File metadata
- Download URL: pyhepmc-2.5.1.tar.gz
- Upload date:
- Size: 450.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c91fc1769d516c4549e50b11219c9f2f787eaa492ee3a9c78bb95459b30c0471 |
|
MD5 | 7fa4a2e9226a0d8104f723a2d08e6e48 |
|
BLAKE2b-256 | 60220f78c69d65c6e97ba8093244e2086ab5a77be6ef8d6da0fe799125b56169 |
File details
Details for the file pyhepmc-2.5.1-cp310-cp310-win_amd64.whl
.
File metadata
- Download URL: pyhepmc-2.5.1-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 429.5 kB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 495059ed0a8d94ef0f92348d04c51ea6712f167f573b529e86dec5af4ad50447 |
|
MD5 | 2527c30284fe9968a9dee0c40730a1e3 |
|
BLAKE2b-256 | 37ca1d8f0ccc36a7771cd6416d4b1bb31c7584bdc7a9db5743718f1cbd10f6a5 |
File details
Details for the file pyhepmc-2.5.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: pyhepmc-2.5.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 549.7 kB
- Tags: CPython 3.10, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4bad021d94dfd84fc44c6be305dc20479f0a6cc7d0d45557131c05b945bc8ed5 |
|
MD5 | 72128575d3a398bfa2e52ea17fc2539f |
|
BLAKE2b-256 | 41febd90e6d9f35188fe40e9c7ff464e02faf85732325f24c1140b8aaa17a32f |
File details
Details for the file pyhepmc-2.5.1-cp310-cp310-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: pyhepmc-2.5.1-cp310-cp310-macosx_10_9_x86_64.whl
- Upload date:
- Size: 493.0 kB
- Tags: CPython 3.10, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c9b547f04d5aa62951534cd4f3adad77269bca6fd2fbf90d3754cfd28e196932 |
|
MD5 | c990bae42efbaf32b4a732793b026913 |
|
BLAKE2b-256 | 6fcce02a09ea839fa5733ed0332ed474bbe4223c94825aa2f27c81002b85fea3 |
File details
Details for the file pyhepmc-2.5.1-cp310-cp310-macosx_10_9_universal2.whl
.
File metadata
- Download URL: pyhepmc-2.5.1-cp310-cp310-macosx_10_9_universal2.whl
- Upload date:
- Size: 907.4 kB
- Tags: CPython 3.10, macOS 10.9+ universal2 (ARM64, x86-64)
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bc46fccafeb2b3ef2f770046d386b88bd1d0bbe449b0795273397095be608688 |
|
MD5 | a01f0d03ab5f3d16fefbb167d598bcf0 |
|
BLAKE2b-256 | 0ce35cd5ce2080a84b3af6645784391c2b8a6bf1a946522c8c8dcb92c29bfc18 |
File details
Details for the file pyhepmc-2.5.1-cp39-cp39-win_amd64.whl
.
File metadata
- Download URL: pyhepmc-2.5.1-cp39-cp39-win_amd64.whl
- Upload date:
- Size: 429.7 kB
- Tags: CPython 3.9, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9ed701e690cb403cc662fcfb2a9caef93e9c815ea5012d9b6e93371f0b124624 |
|
MD5 | bc23dc2f0ce01d8c8e2f125d1e780f17 |
|
BLAKE2b-256 | 0ec6a4d54c1c723b156c7d3cd3e29c660305564e6efe9ab000a7dafcaf30ef8a |
File details
Details for the file pyhepmc-2.5.1-cp39-cp39-win32.whl
.
File metadata
- Download URL: pyhepmc-2.5.1-cp39-cp39-win32.whl
- Upload date:
- Size: 364.3 kB
- Tags: CPython 3.9, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c3a30e60d4d4971f6721a880568c26a48ec7a80758fb9186f129bcf36fd69355 |
|
MD5 | db111d8b652185dc9a60b184b6e860b9 |
|
BLAKE2b-256 | 4885b9e96d804b2ef6ac023a8b3793b8d610248b14b94959eb49b2ea50b6788b |
File details
Details for the file pyhepmc-2.5.1-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
.
File metadata
- Download URL: pyhepmc-2.5.1-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
- Upload date:
- Size: 497.3 kB
- Tags: CPython 3.9, manylinux: glibc 2.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c4fe3ee1f4126d0f08f236412a99d32f5fc708d89e15f57eff880e105f4d72dd |
|
MD5 | 34fa18d20a5f7ee940403155e74a3245 |
|
BLAKE2b-256 | 9b2f71141fabb4bcf996808072a8ef257262d76e8c2791dc2b334d9512e9a586 |
File details
Details for the file pyhepmc-2.5.1-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.whl
.
File metadata
- Download URL: pyhepmc-2.5.1-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.whl
- Upload date:
- Size: 516.8 kB
- Tags: CPython 3.9, manylinux: glibc 2.12+ i686
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 901c96274d491c6a77854f8902be4a519b9cdc32550ebe886172bcd9e79de8de |
|
MD5 | 05aa6ebcfba19728cb329e753663ab8a |
|
BLAKE2b-256 | f5c445de80c822c41fa3bacc51ac7ab82cd74072648e9574b4c227a48d20443d |
File details
Details for the file pyhepmc-2.5.1-cp39-cp39-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: pyhepmc-2.5.1-cp39-cp39-macosx_10_9_x86_64.whl
- Upload date:
- Size: 493.1 kB
- Tags: CPython 3.9, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3e84009652c92e2b65f61366c0108696b87222e0e638e7666df465d20a0c6621 |
|
MD5 | 4d4f3383ec1b110a149e0488043f65a1 |
|
BLAKE2b-256 | 35c68a5df89c76e4c6598a43a25c37ae063a533f0c2e66fc2d82069ef46abba4 |
File details
Details for the file pyhepmc-2.5.1-cp39-cp39-macosx_10_9_universal2.whl
.
File metadata
- Download URL: pyhepmc-2.5.1-cp39-cp39-macosx_10_9_universal2.whl
- Upload date:
- Size: 907.6 kB
- Tags: CPython 3.9, macOS 10.9+ universal2 (ARM64, x86-64)
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5bd6c549b8308398853d8a2b1a82806501c15e9d210d9676f898f71757b5f973 |
|
MD5 | 66d96ea2396a360ad5d86c0088343364 |
|
BLAKE2b-256 | e29a8b008168870d8e94a9dff23d220207ca954e906e892e56eedd968c228e41 |
File details
Details for the file pyhepmc-2.5.1-cp38-cp38-win_amd64.whl
.
File metadata
- Download URL: pyhepmc-2.5.1-cp38-cp38-win_amd64.whl
- Upload date:
- Size: 429.2 kB
- Tags: CPython 3.8, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | de3bdbd7d2ed8105c449daaad4f2fa0f598b593c7778f3f2371462b10d1efaac |
|
MD5 | f78d613a0e323cf17bb2dbe23e988037 |
|
BLAKE2b-256 | f73c42246c620a552c8cdc714b4e4390c498e846a38c3f6b64c914947003850a |
File details
Details for the file pyhepmc-2.5.1-cp38-cp38-win32.whl
.
File metadata
- Download URL: pyhepmc-2.5.1-cp38-cp38-win32.whl
- Upload date:
- Size: 364.3 kB
- Tags: CPython 3.8, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 362177ee471a1ebb1c8c13bbed09185297c69cf7cbbfc40b9fd5f9e11a30124f |
|
MD5 | 09f7b4a401b89ec8f4ed2c7d27ac714c |
|
BLAKE2b-256 | 54e3a8b95bbeee198e2132cf979ded56d626a5bf839be935c159fce7f0b7cb3e |
File details
Details for the file pyhepmc-2.5.1-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
.
File metadata
- Download URL: pyhepmc-2.5.1-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
- Upload date:
- Size: 497.0 kB
- Tags: CPython 3.8, manylinux: glibc 2.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4f6c790eb5d710f994c8db640aa36d2f2c01b7b9b6f7e3bf028a98d532e3eac7 |
|
MD5 | 75281669d5b568ea33522ea6228ac28b |
|
BLAKE2b-256 | 5074ce8a711bba8676a2c45c3895b62ddb3930422dda32ac7a46613796d01413 |
File details
Details for the file pyhepmc-2.5.1-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.whl
.
File metadata
- Download URL: pyhepmc-2.5.1-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.whl
- Upload date:
- Size: 516.9 kB
- Tags: CPython 3.8, manylinux: glibc 2.12+ i686
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6891345c987583e94f5ededa20257eb58e0bf24362454eb4cee5fc6b3ada13d1 |
|
MD5 | ed59d87e0decaee91669976870856f40 |
|
BLAKE2b-256 | 4dc91d91138cb249d0e08e20d857b52fb98f4452d0eb253a8e28f5dca51108cc |
File details
Details for the file pyhepmc-2.5.1-cp38-cp38-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: pyhepmc-2.5.1-cp38-cp38-macosx_10_9_x86_64.whl
- Upload date:
- Size: 493.1 kB
- Tags: CPython 3.8, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f49a15675f68f249b14c5405a6695fbf9971196314c8c8bf0e9a501e6ce54572 |
|
MD5 | ccfc6a0633df206c42daad1b7966219f |
|
BLAKE2b-256 | 57fc837f45bc4d73ef898ccaa91894fc56416c3cda35d9ec26d1e4298a22ee66 |
File details
Details for the file pyhepmc-2.5.1-cp38-cp38-macosx_10_9_universal2.whl
.
File metadata
- Download URL: pyhepmc-2.5.1-cp38-cp38-macosx_10_9_universal2.whl
- Upload date:
- Size: 907.5 kB
- Tags: CPython 3.8, macOS 10.9+ universal2 (ARM64, x86-64)
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b3c205e778d7de02933ba4f76d0bf46787b95e70d37eab8ec1693f1300aeeae5 |
|
MD5 | a7a837a022b6152dfd8dc4fcfb808080 |
|
BLAKE2b-256 | 39cf82a9af2ab76bc31389929d15a6293271d57c28cbfa6324f6ddf63d692144 |
File details
Details for the file pyhepmc-2.5.1-cp37-cp37m-win_amd64.whl
.
File metadata
- Download URL: pyhepmc-2.5.1-cp37-cp37m-win_amd64.whl
- Upload date:
- Size: 427.5 kB
- Tags: CPython 3.7m, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 177a2607d65e9ab109a729c15de574297d52a59104ad59b6fe9167661ee21f01 |
|
MD5 | 56b5024dfc1a45e518300ef30ac5c0ab |
|
BLAKE2b-256 | 5aef7dfc4fc97fcf57a954eb985544a37efd6d841de723f453c35f4273dd8e99 |
File details
Details for the file pyhepmc-2.5.1-cp37-cp37m-win32.whl
.
File metadata
- Download URL: pyhepmc-2.5.1-cp37-cp37m-win32.whl
- Upload date:
- Size: 366.6 kB
- Tags: CPython 3.7m, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c1fa40faff22954986806ee6eca8323c0240db502ce6fb7374f20ebc9bded4b6 |
|
MD5 | 58e1bd8e32d045a11547262b44e434ea |
|
BLAKE2b-256 | d7a9c37dee88173527def939c07dc58653e203a32c003b1f41eb50a11656b157 |
File details
Details for the file pyhepmc-2.5.1-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
.
File metadata
- Download URL: pyhepmc-2.5.1-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
- Upload date:
- Size: 500.8 kB
- Tags: CPython 3.7m, manylinux: glibc 2.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 64d670acf48340e36ea2c05dd13a2385971463a264782a765c3909b8b51f4482 |
|
MD5 | b4447cc167a25305011143e04fd406c0 |
|
BLAKE2b-256 | 48551c0d51bd5142ea55dfb1efb62e3328d2bc35a7193c2c80ce7866aa6e1a1b |
File details
Details for the file pyhepmc-2.5.1-cp37-cp37m-manylinux_2_12_i686.manylinux2010_i686.whl
.
File metadata
- Download URL: pyhepmc-2.5.1-cp37-cp37m-manylinux_2_12_i686.manylinux2010_i686.whl
- Upload date:
- Size: 521.4 kB
- Tags: CPython 3.7m, manylinux: glibc 2.12+ i686
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 169839eda768902326f16f50974493f3180a8ca2922bac99a24a1614703a2e09 |
|
MD5 | b5515d93dc733233e263bf8dc8e1a99e |
|
BLAKE2b-256 | db6ed9bba11edb64b4fb9e1b9d663637103c7caba3d964651c975b51b4936665 |
File details
Details for the file pyhepmc-2.5.1-cp37-cp37m-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: pyhepmc-2.5.1-cp37-cp37m-macosx_10_9_x86_64.whl
- Upload date:
- Size: 484.9 kB
- Tags: CPython 3.7m, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dd31f66dc194e7899ea3ed9ce999dc4d3f9f84cd0a347e81b4410a169c2ab9d5 |
|
MD5 | b503f35fe4901c8de50a5fb0e4175f49 |
|
BLAKE2b-256 | 540ccae53beac2a2b5583ce1d2a98badc25f8b3c9f7fab80408319c007e32bf5 |