Skip to main content

Pythonic interface to the HepMC3 C++ library licensed under LGPL-v3.

Project description

A Pythonic wrapper for the HepMC3 C++ library.

https://scikit-hep.org/assets/images/Scikit--HEP-Project-blue.svg https://badge.fury.io/py/pyhepmc.svg https://coveralls.io/repos/github/scikit-hep/pyhepmc/badge.svg?branch=main https://zenodo.org/badge/DOI/10.5281/zenodo.7013498.svg

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, Numpy-friendy, and Jupyter notebook-friendly

pyhepmc is a hand-crafted mapping of C++ code to Python, see documentation for details, while the official HepMC3 bindings are generated by a script. The pyhepmc API has been optimised for safety, usability, and efficiency by a human expert, something that an automatic tool cannot provide. pyhepmc brings these unique features:

  • Python idioms are supported where appropriate.

  • Simple IO with pyhepmc.open.

  • An alternative Numpy API accelerates event processing up to 70x compared to the standard API.

  • The public API is fully documented with Python docstrings.

  • Objects are inspectable in Jupyter notebooks (have useful repr strings).

  • Events render as graphs in Jupyter notebooks (see next item).

pyhepmc supports visualizations powered by graphviz

pyhepmc can optionally visualize events, using the mature graphviz library as a backend.

docs/_static/pyhepmc.svg

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. It is developed in close collaboration with the HepMC3 project.

pyhepmc is thoroughly unit tested

We have close to 100% coverage for the Python API.

Documentation

Documentation is available here, and includes some examples (Jupyter notebooks). Furthermore, you can use Python’s help() browser to learn about the API. The documentation is generated from Python docstrings, which are translated from the HepMC3 library, which is documented here.

License

The pyhepmc code is covered by the BSD 3-clause license, but its main functionality comes from bundled software which is released under different licenses. The HepMC3 library is licensed under LGPL-v3 and bundles other software which is released under different licenses. See the files LICENSE and LICENSE_bundled in the source directory for details.

Project details


Download files

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

Source Distribution

pyhepmc-2.13.2.tar.gz (371.0 kB view details)

Uploaded Source

Built Distributions

pyhepmc-2.13.2-cp311-cp311-win_amd64.whl (484.3 kB view details)

Uploaded CPython 3.11 Windows x86-64

pyhepmc-2.13.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (619.9 kB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

pyhepmc-2.13.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (573.0 kB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ ARM64

pyhepmc-2.13.2-cp311-cp311-macosx_10_9_x86_64.whl (563.8 kB view details)

Uploaded CPython 3.11 macOS 10.9+ x86-64

pyhepmc-2.13.2-cp311-cp311-macosx_10_9_universal2.whl (1.0 MB view details)

Uploaded CPython 3.11 macOS 10.9+ universal2 (ARM64, x86-64)

pyhepmc-2.13.2-cp310-cp310-win_amd64.whl (484.2 kB view details)

Uploaded CPython 3.10 Windows x86-64

pyhepmc-2.13.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (619.9 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

pyhepmc-2.13.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (572.3 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ ARM64

pyhepmc-2.13.2-cp310-cp310-macosx_10_9_x86_64.whl (563.8 kB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

pyhepmc-2.13.2-cp310-cp310-macosx_10_9_universal2.whl (1.0 MB view details)

Uploaded CPython 3.10 macOS 10.9+ universal2 (ARM64, x86-64)

pyhepmc-2.13.2-cp39-cp39-win_amd64.whl (484.3 kB view details)

Uploaded CPython 3.9 Windows x86-64

pyhepmc-2.13.2-cp39-cp39-win32.whl (412.3 kB view details)

Uploaded CPython 3.9 Windows x86

pyhepmc-2.13.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (572.6 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ ARM64

pyhepmc-2.13.2-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (559.4 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.12+ x86-64

pyhepmc-2.13.2-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.whl (577.7 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.12+ i686

pyhepmc-2.13.2-cp39-cp39-macosx_10_9_x86_64.whl (564.0 kB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

pyhepmc-2.13.2-cp39-cp39-macosx_10_9_universal2.whl (1.0 MB view details)

Uploaded CPython 3.9 macOS 10.9+ universal2 (ARM64, x86-64)

pyhepmc-2.13.2-cp38-cp38-win_amd64.whl (484.6 kB view details)

Uploaded CPython 3.8 Windows x86-64

pyhepmc-2.13.2-cp38-cp38-win32.whl (412.8 kB view details)

Uploaded CPython 3.8 Windows x86

pyhepmc-2.13.2-cp38-cp38-macosx_10_9_x86_64.whl (564.6 kB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

pyhepmc-2.13.2-cp38-cp38-macosx_10_9_universal2.whl (1.0 MB view details)

Uploaded CPython 3.8 macOS 10.9+ universal2 (ARM64, x86-64)

File details

Details for the file pyhepmc-2.13.2.tar.gz.

File metadata

  • Download URL: pyhepmc-2.13.2.tar.gz
  • Upload date:
  • Size: 371.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for pyhepmc-2.13.2.tar.gz
Algorithm Hash digest
SHA256 8906f1713f0bd093b8c8507c6b6743b45e7400213a8069cf238dfc5bfdb54340
MD5 5cb4774afac3c89ee283d2b9dda7e9fd
BLAKE2b-256 214a4bf269e422b92547b69366f53b29d5b224517817ac110332514c9c01e44a

See more details on using hashes here.

File details

Details for the file pyhepmc-2.13.2-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: pyhepmc-2.13.2-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 484.3 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for pyhepmc-2.13.2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 a228bc5fdb3562a5363a6a9a295e9af9d3fe748d9b4064d582f84818ff16f031
MD5 6c393c69d912615e15781d15f8b24ba4
BLAKE2b-256 6d211114296827cb166d31c8110b8767800b5d836c24d848bc738f30bdca3995

See more details on using hashes here.

File details

Details for the file pyhepmc-2.13.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pyhepmc-2.13.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 dbe3fcd06bff69629d9742de5ddbac26c4eea617770e69a0fca7962649626715
MD5 dffd7d77a018f71d38c24059d9af8f42
BLAKE2b-256 a0af54bddba9d0b4bf566c65c528f7f1a218c7d433f22a9e64b849a0581d6cec

See more details on using hashes here.

File details

Details for the file pyhepmc-2.13.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for pyhepmc-2.13.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 cda721dacade14e3fc2530668325bba3a0c542aa2e5431a02bc5a808eb4abd9a
MD5 57ab57ae5f7050806db8c26382c61cb5
BLAKE2b-256 935bdf3032ff83a6a403f48aec228fa93366b60c8ae7cb42a66a32b2002a579c

See more details on using hashes here.

File details

Details for the file pyhepmc-2.13.2-cp311-cp311-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for pyhepmc-2.13.2-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 637d9a58b0768841909b3df871ba1ac235c39ce3b9d916bf33e5bd9a2216d745
MD5 9e67b00710b9736b10c34e2a7cbf7f50
BLAKE2b-256 bcb9e29d0d424bf87c4bed966251f9ea38833bd0e4a0167627810dd7029e17e4

See more details on using hashes here.

File details

Details for the file pyhepmc-2.13.2-cp311-cp311-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for pyhepmc-2.13.2-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 49005da8d7c2ff8c9aee191bf54c659b67dab4b03a7074a0d3aac6aeefe47390
MD5 6e6c0fbd25616d5f1d0da8e9adf651e5
BLAKE2b-256 d25102a3bdd3c7e7194594bb1bf1f39360f2e2b35f04afcc7aa95496831da7c7

See more details on using hashes here.

File details

Details for the file pyhepmc-2.13.2-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: pyhepmc-2.13.2-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 484.2 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for pyhepmc-2.13.2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 85e11eeae41b9f2baabb1fd8dbf3b7a9e790e20b78c16ec3947cdc4498bfad55
MD5 5457375e6aca69f33869a80dd2fc59fc
BLAKE2b-256 e41af60403becb913573d964b4ebd2400ff3e3dd284b8dd7db68be3f407dcf85

See more details on using hashes here.

File details

Details for the file pyhepmc-2.13.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pyhepmc-2.13.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 21c1055bff51fd2cfe949f0f5806182f5b7ef9120cf2bd0d9271d84eddf8ca16
MD5 8d3e93bc6c7802d29ce73bb4b816c9a0
BLAKE2b-256 73cddbf596135cb8c06fe41ce02ead64a649fb451eb66b4ce473c36cee8c90aa

See more details on using hashes here.

File details

Details for the file pyhepmc-2.13.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for pyhepmc-2.13.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 7ea4bed8d1affefca3ab0caa02dea6b4a420566ef9ac3e894719972b81044c36
MD5 26efb5a7d87fc395a1fdb20a50ad3515
BLAKE2b-256 fe845b1c83caabfd35571776f2bc6a94471cf8b8ca8b16e717a0fb4184cccfd5

See more details on using hashes here.

File details

Details for the file pyhepmc-2.13.2-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for pyhepmc-2.13.2-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 0a78b77753748f6af94ba5aa36d08b5650e7ca41ec481dc673418fa289d54040
MD5 e9e08d3eae6e976f72b7e89b32997f32
BLAKE2b-256 0d912a3b9de978151542aa8ea5c07cb37f1c8d98d82861973186cc50e8639454

See more details on using hashes here.

File details

Details for the file pyhepmc-2.13.2-cp310-cp310-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for pyhepmc-2.13.2-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 108962f5c9933aabfa1a8e811205422f9cd3b0edaf8229f91ff5faf61cdad2f5
MD5 d0dc1b2cb2fb347f046c51bbfec8f5ee
BLAKE2b-256 d843f2677f6b52dad0c66509d3e8c6b0c213aad03c0303ed4dc26965c880fc35

See more details on using hashes here.

File details

Details for the file pyhepmc-2.13.2-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: pyhepmc-2.13.2-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 484.3 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for pyhepmc-2.13.2-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 4b68c2694d3d4f4c7bfbcf30e9eab002bd914315fbecd831b162fde01752949a
MD5 9190e42e898c2ab1906296dd6efe2f45
BLAKE2b-256 76a46dbc47d68351bbced25b235f3e3efeefbf9683eb2edd06d2fac2e93cc601

See more details on using hashes here.

File details

Details for the file pyhepmc-2.13.2-cp39-cp39-win32.whl.

File metadata

  • Download URL: pyhepmc-2.13.2-cp39-cp39-win32.whl
  • Upload date:
  • Size: 412.3 kB
  • Tags: CPython 3.9, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for pyhepmc-2.13.2-cp39-cp39-win32.whl
Algorithm Hash digest
SHA256 4e94f71dfbb08c50e355cd080044c6cc21f5de3aec8623ce56049d986e7a2d31
MD5 b40b9e219303a14c1c6c21a74ff9744d
BLAKE2b-256 7991e52783457cf40cf39771382b96402c9f7dea19a68807c6b9d764939b8a4a

See more details on using hashes here.

File details

Details for the file pyhepmc-2.13.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for pyhepmc-2.13.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 8659b581b9b51e714e0280e285c5ac3a3ddfa10614d4f60091749ac8d4499369
MD5 4b077f78053cd618f1502b0460501ef4
BLAKE2b-256 03de262919d3a74fe2db2641d5545bc095daba03763e1696c9af11665399bb22

See more details on using hashes here.

File details

Details for the file pyhepmc-2.13.2-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for pyhepmc-2.13.2-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 29160949d793e9b58fd85f06205f5e1ec5e09f784065aed8c1c8fd3eb21067f2
MD5 11a5056fb09ae679e235c875ee46961c
BLAKE2b-256 4b2a9eb0dede4869a4689ca87fba69cd144b3dba941ee939afe6eef93efeec96

See more details on using hashes here.

File details

Details for the file pyhepmc-2.13.2-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.whl.

File metadata

File hashes

Hashes for pyhepmc-2.13.2-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.whl
Algorithm Hash digest
SHA256 862690f43fe0f3259ec646c22218d28d2ae68f69b137bace4c4c3197a3f1adc1
MD5 d6cf6e1b86ede8700ceaa5ccc5ee3dbb
BLAKE2b-256 b06495e5db5abd343dc5ed29ce87e65d8f5ba6dcc46cc50751e3d8bbe8f8c711

See more details on using hashes here.

File details

Details for the file pyhepmc-2.13.2-cp39-cp39-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for pyhepmc-2.13.2-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 e27f8581c9d5adab0d5e4ba15520c136d33623292044ee0efd8a5a137939ed31
MD5 b0a76ce658bdc183a8f39fa8a2f17785
BLAKE2b-256 6e6a590a35fef8b3aa3e15fadffd3331f685025c97dc910a41b5db95749c0cdd

See more details on using hashes here.

File details

Details for the file pyhepmc-2.13.2-cp39-cp39-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for pyhepmc-2.13.2-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 d3493b30a58ff9f7a2ffa32969492ee085ab5727724977b281fc8b73afc6e3fe
MD5 b7eb268597190a3cf31530b50a0547ec
BLAKE2b-256 9a6b0e8ce695dad18b2ae0f672c16776b8f8216c1eb34b4bf7ed45e1559e7a04

See more details on using hashes here.

File details

Details for the file pyhepmc-2.13.2-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: pyhepmc-2.13.2-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 484.6 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for pyhepmc-2.13.2-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 429c5296fe52479664ed36e2ce23eb35296bca540c6c4fd01531509059524d7b
MD5 b9013429db51006a3860165f18f3e117
BLAKE2b-256 17566d1550294cf2d95d494214c245618e54368f12fb9843da601ce9a4bc1847

See more details on using hashes here.

File details

Details for the file pyhepmc-2.13.2-cp38-cp38-win32.whl.

File metadata

  • Download URL: pyhepmc-2.13.2-cp38-cp38-win32.whl
  • Upload date:
  • Size: 412.8 kB
  • Tags: CPython 3.8, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for pyhepmc-2.13.2-cp38-cp38-win32.whl
Algorithm Hash digest
SHA256 04fac734dc73a7a99960fac6e0a965c676d2487dbe9628c740fd8c4d22dee654
MD5 d6039dd2c927014bada3da8872770392
BLAKE2b-256 ae560c63b4940eb333a9d5102f5cce0263417e8503ec7e98879f297622a7ceb0

See more details on using hashes here.

File details

Details for the file pyhepmc-2.13.2-cp38-cp38-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for pyhepmc-2.13.2-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 40e80b815cde498826d7f13ca9a7861eb7b7c92fa7062f13996d7e29258f0305
MD5 c751f9397f5efc551d8dfdbc70a2adab
BLAKE2b-256 9ad2ac8da2b283a52d292e52b75f3003741290332bc696a4e2ce836cf9f027b1

See more details on using hashes here.

File details

Details for the file pyhepmc-2.13.2-cp38-cp38-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for pyhepmc-2.13.2-cp38-cp38-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 710b1e9ae7fc75a8562c4b067042e1588c59d8110cef67764d5ac3f896d0c314
MD5 ad5c71e678dd4d1468797d7d2f0603f0
BLAKE2b-256 ac6c31b47d9aa9c8fab78271e6948998954d2e538ba20206a3e86d2a23b58603

See more details on using hashes here.

Supported by

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