Skip to main content

Pythonic interface to the HepMC3 C++ library.

Project description

pyhepmc

A Pythonic wrapper for the HepMC3 C++ library.

Scikit-HEP PyPI version Coverage DOI

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. It supports Python idioms 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 FourVectors
  • Vectors of objects on the C++ side are mapped to Python lists
  • ReaderAscii and WriterAscii support the context manager protocol
  • 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 unit tested

We aim for 100% coverage, not quite there yet.

Documentation

pyhepmc currently has no separate documentation, but it mirrors the C++ interface of the HepMC3 library, which is documented here: http://hepmc.web.cern.ch/hepmc. Docs will come soon, for now, please use Python's help() browser to learn about the API.

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


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.4.2.tar.gz (352.4 kB view details)

Uploaded Source

Built Distributions

pyhepmc-2.4.2-cp310-cp310-win_amd64.whl (375.6 kB view details)

Uploaded CPython 3.10 Windows x86-64

pyhepmc-2.4.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (466.6 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

pyhepmc-2.4.2-cp310-cp310-macosx_10_9_x86_64.whl (411.8 kB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

pyhepmc-2.4.2-cp310-cp310-macosx_10_9_universal2.whl (763.1 kB view details)

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

pyhepmc-2.4.2-cp39-cp39-win_amd64.whl (375.6 kB view details)

Uploaded CPython 3.9 Windows x86-64

pyhepmc-2.4.2-cp39-cp39-win32.whl (314.4 kB view details)

Uploaded CPython 3.9 Windows x86

pyhepmc-2.4.2-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (426.3 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.12+ x86-64

pyhepmc-2.4.2-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.whl (444.8 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.12+ i686

pyhepmc-2.4.2-cp39-cp39-macosx_10_9_x86_64.whl (411.9 kB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

pyhepmc-2.4.2-cp39-cp39-macosx_10_9_universal2.whl (763.3 kB view details)

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

pyhepmc-2.4.2-cp38-cp38-win_amd64.whl (375.5 kB view details)

Uploaded CPython 3.8 Windows x86-64

pyhepmc-2.4.2-cp38-cp38-win32.whl (314.2 kB view details)

Uploaded CPython 3.8 Windows x86

pyhepmc-2.4.2-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (426.1 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.12+ x86-64

pyhepmc-2.4.2-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.whl (444.5 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.12+ i686

pyhepmc-2.4.2-cp38-cp38-macosx_10_9_x86_64.whl (412.0 kB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

pyhepmc-2.4.2-cp38-cp38-macosx_10_9_universal2.whl (763.3 kB view details)

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

pyhepmc-2.4.2-cp37-cp37m-win_amd64.whl (373.5 kB view details)

Uploaded CPython 3.7m Windows x86-64

pyhepmc-2.4.2-cp37-cp37m-win32.whl (317.1 kB view details)

Uploaded CPython 3.7m Windows x86

pyhepmc-2.4.2-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (428.6 kB view details)

Uploaded CPython 3.7m manylinux: glibc 2.12+ x86-64

pyhepmc-2.4.2-cp37-cp37m-manylinux_2_12_i686.manylinux2010_i686.whl (448.3 kB view details)

Uploaded CPython 3.7m manylinux: glibc 2.12+ i686

pyhepmc-2.4.2-cp37-cp37m-macosx_10_9_x86_64.whl (405.6 kB view details)

Uploaded CPython 3.7m macOS 10.9+ x86-64

File details

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

File metadata

  • Download URL: pyhepmc-2.4.2.tar.gz
  • Upload date:
  • Size: 352.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for pyhepmc-2.4.2.tar.gz
Algorithm Hash digest
SHA256 7236b21525d6478549724b72504cdb52bc899d58eee20c3e9e3ca1cc0e45b034
MD5 abfd09049e4e6bb194db12e889848b44
BLAKE2b-256 b01fd5bc9a3e92c5c39086aa86ddc4ed351292ec09b495579a26af14a72c2f8a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyhepmc-2.4.2-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 375.6 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

Hashes for pyhepmc-2.4.2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 eca22181dca8d32b610b78fb4697ee3e32e46959c869a1f7fee1a6752b3d48a5
MD5 8389718a6774a1135d075fcea88bab0b
BLAKE2b-256 196ddea9d99e5b633ad27762c1b9e29064d7ef5999ee9f24b3c046538e51ea77

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyhepmc-2.4.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8123d8c81155d7b1a8ecdd1301dad821bbbde3afdcc2f649d99edb698fb3bff3
MD5 16f14d325d8c646447b0c06d23b88b40
BLAKE2b-256 06439044faf43b121da133eb5f1da68d5ba0b3be6de9c6513164c51b7e83f1e5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyhepmc-2.4.2-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 3443ca103a7c5c64dedb76c4265f4275ca56a471a40fe401e3428d8beb96c6ba
MD5 82b856ae48529ffee239ba7200113fbb
BLAKE2b-256 8de3be49464ae8b260571f7538e3e720af53fced09284cfefa83dacc68ebd36b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyhepmc-2.4.2-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 6edef5ed5f3a9b1bcb16f6668440fa5cf75238d1557483c7d64acf8cf574f6fe
MD5 f60aab987fabad89da024f24f7a6e322
BLAKE2b-256 4d76dbc878431abf261dbf8ec7ef09dc5e967f5004ac39841aa0ff692d32eb0c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyhepmc-2.4.2-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 375.6 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

Hashes for pyhepmc-2.4.2-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 684fff24b40293d6283d49567d752863ce8391ce37f533919d42474cdbcb9990
MD5 d9da8cc5a1d775aa3128743149445671
BLAKE2b-256 c0e877808373f55f931262df07c0bd2acef405886861c00fcd8a4ad15a7a26d1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyhepmc-2.4.2-cp39-cp39-win32.whl
  • Upload date:
  • Size: 314.4 kB
  • Tags: CPython 3.9, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for pyhepmc-2.4.2-cp39-cp39-win32.whl
Algorithm Hash digest
SHA256 873fc6a61fedacee15c9a7391b3ea1b92bf9378b80acd1d61d8c1fce3beeb5c4
MD5 53fad6c4564fc3c7491ec74ab2662af7
BLAKE2b-256 65eae8811fe5259f439dbb4153952b0eac82323a8fac437b38ad546406d5e174

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyhepmc-2.4.2-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 b4e160f76877e51eafaa35803f4213144f64fdb222670d9e8680f3afd57197b7
MD5 ce1728e034f52f98ae5a32fc2bb95155
BLAKE2b-256 9ca085fc719765344ebfe82e004bfb2c6470027c4dff6cd1546eb0c9d43f9c75

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyhepmc-2.4.2-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.whl
Algorithm Hash digest
SHA256 26dbd118de1053240bd3cabc12c99bee4cc21084fea36000fbf50e37223f399f
MD5 077cdad57bbd67c29324ecd9dbc65dd0
BLAKE2b-256 c49d195ecd470e731b150dbb20e1f44dc147073eac582471376a37daf538c243

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyhepmc-2.4.2-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 ece2429a0835d9be7d9dcffbc59717eaf7166f7f577d4fbbf46079d61ff21810
MD5 3f17436999526a19c1535b1f284ebcf1
BLAKE2b-256 5ff01ba989dd3097553c398393fba5f9063eb1b126d746a0b361d86ea730e95c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyhepmc-2.4.2-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 dd3148d4a7f0e77f80a78abed26712900d0e7e7820478200f76e658e4a665363
MD5 0e5ea9b9c925ed8e5be7424e46d2a326
BLAKE2b-256 90b4b1be45a1f39a0ad1d36f2697eea50874eaaa2d0522e6b4fcef413d90a227

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyhepmc-2.4.2-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 375.5 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

Hashes for pyhepmc-2.4.2-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 2323e73b061f681d1b5b58968305102b132531fa5349ba7866e6fa942d92b8a0
MD5 72451629eda76e5d22116ee308ec5869
BLAKE2b-256 7a82f1db7a22c9fb018a837e313dc33969a36b7684bd0419093a8e30547c6c16

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyhepmc-2.4.2-cp38-cp38-win32.whl
  • Upload date:
  • Size: 314.2 kB
  • Tags: CPython 3.8, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for pyhepmc-2.4.2-cp38-cp38-win32.whl
Algorithm Hash digest
SHA256 48a4b4914c5fd7058d03bd2c2dc01ed2f6c5760b03d8bcd8fa0ae8b4a2d760d3
MD5 03793181134d1435bd412a1113683a3e
BLAKE2b-256 96df1812d83eb0e10b82dd1d875b904bff4f4da6332c5b261b7ec118ab22bb3c

See more details on using hashes here.

File details

Details for the file pyhepmc-2.4.2-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for pyhepmc-2.4.2-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 277a98171b6b367a3ae1f0ffd835798a88eb33518860651d9fc9cefe3a1986e9
MD5 c4aade4dd10aa848db2e9c47fe1dfb9e
BLAKE2b-256 ecf75b6feed1a19d8f2ff7b790784b0a2b35d0b3f75e2ff8e687d596eb656f48

See more details on using hashes here.

File details

Details for the file pyhepmc-2.4.2-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.whl.

File metadata

File hashes

Hashes for pyhepmc-2.4.2-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.whl
Algorithm Hash digest
SHA256 f806884a30ee0acda1ee874a7e9b7bb3ee50dc62bbb7542bea8a180096b7734d
MD5 f59a010c8c3d8d584d9b4b0b553a546d
BLAKE2b-256 7d5745653d9890c4956a7e98b84f06b5046b90bababbd6de1b61804ab5882b74

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyhepmc-2.4.2-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 e10abfb395099f8d642552d0e25cd23c93281f0bddbd6e0ff396d5a4f527a720
MD5 ace5770ce48f88bc1b7b37e3373009b9
BLAKE2b-256 5b68ca30435f204e24d5b1b336c043cdd6b412b42184319db0ed6b77a6698b50

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyhepmc-2.4.2-cp38-cp38-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 0627c17795d766c9b61b78a8064176f72162489782b8cb4756e37604c9246746
MD5 36c9a915027997fd9b4f3a83ed88f066
BLAKE2b-256 b9969129cadcd165ab44547db426043b04f5e9865b9da905e92855d830d97692

See more details on using hashes here.

File details

Details for the file pyhepmc-2.4.2-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: pyhepmc-2.4.2-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 373.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

Hashes for pyhepmc-2.4.2-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 076c5dcd2b27427de2001496e00e8b494ea73c32f5574401b0aaf9db1e4ee96f
MD5 9abf639bc1f5387c9b9e1640e88f68e2
BLAKE2b-256 bf65b7f18c3ef3b47375854f031e970998fe4ca7119c6ea2452ce90ba1bf9bcb

See more details on using hashes here.

File details

Details for the file pyhepmc-2.4.2-cp37-cp37m-win32.whl.

File metadata

  • Download URL: pyhepmc-2.4.2-cp37-cp37m-win32.whl
  • Upload date:
  • Size: 317.1 kB
  • Tags: CPython 3.7m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for pyhepmc-2.4.2-cp37-cp37m-win32.whl
Algorithm Hash digest
SHA256 3dba6186ea6fbe921f0c0cf7114700d450a0165a66dcdc2db7cb24743cb1e63e
MD5 505f1b0f47061badefec94f8984671f6
BLAKE2b-256 9e7b1a3070bf53535a48382aa92a2a7a56e93fb629afab8da8c947fc718e8fd2

See more details on using hashes here.

File details

Details for the file pyhepmc-2.4.2-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for pyhepmc-2.4.2-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 670b7fc0c446e07bb9322c6c0e28215eecf3349597842b864e079fb8920244f8
MD5 a41b2e8d2bd091ce747500b65e0c74d2
BLAKE2b-256 3ca5b5ab251c29127352face379306a241a00576e991cdb73e9b8918cdc3e2c9

See more details on using hashes here.

File details

Details for the file pyhepmc-2.4.2-cp37-cp37m-manylinux_2_12_i686.manylinux2010_i686.whl.

File metadata

File hashes

Hashes for pyhepmc-2.4.2-cp37-cp37m-manylinux_2_12_i686.manylinux2010_i686.whl
Algorithm Hash digest
SHA256 7c0e4f162a974fd9bc2138151abdf3e63c1fdc06c4557705415d92bd9e191810
MD5 1faceaec60b95eefae4ace0dd6f6067a
BLAKE2b-256 ee94de35f62e44e0a121a54edfd6cfb712b61d821e03332d079a0ffef4feea54

See more details on using hashes here.

File details

Details for the file pyhepmc-2.4.2-cp37-cp37m-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for pyhepmc-2.4.2-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 7f40350e9b36932a4569560bf5ec3c3287c2c95fe1d150d32ca05c6e6131a34b
MD5 0bd16250e4e4035a60604454a3412a44
BLAKE2b-256 ba39445a56456701e68e8b45436d030234a8193089d98485cc1bbc3368264244

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