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

Uploaded Source

Built Distributions

pyhepmc-2.2.0-cp310-cp310-win_amd64.whl (370.4 kB view details)

Uploaded CPython 3.10 Windows x86-64

pyhepmc-2.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (465.1 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

pyhepmc-2.2.0-cp310-cp310-macosx_10_9_x86_64.whl (410.0 kB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

pyhepmc-2.2.0-cp310-cp310-macosx_10_9_universal2.whl (760.3 kB view details)

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

pyhepmc-2.2.0-cp39-cp39-win_amd64.whl (370.3 kB view details)

Uploaded CPython 3.9 Windows x86-64

pyhepmc-2.2.0-cp39-cp39-win32.whl (312.0 kB view details)

Uploaded CPython 3.9 Windows x86

pyhepmc-2.2.0-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (424.9 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.12+ x86-64

pyhepmc-2.2.0-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.whl (442.9 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.12+ i686

pyhepmc-2.2.0-cp39-cp39-macosx_10_9_x86_64.whl (410.1 kB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

pyhepmc-2.2.0-cp39-cp39-macosx_10_9_universal2.whl (760.6 kB view details)

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

pyhepmc-2.2.0-cp38-cp38-win_amd64.whl (373.9 kB view details)

Uploaded CPython 3.8 Windows x86-64

pyhepmc-2.2.0-cp38-cp38-win32.whl (312.7 kB view details)

Uploaded CPython 3.8 Windows x86

pyhepmc-2.2.0-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (424.4 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.12+ x86-64

pyhepmc-2.2.0-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.whl (442.7 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.12+ i686

pyhepmc-2.2.0-cp38-cp38-macosx_10_9_x86_64.whl (410.1 kB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

pyhepmc-2.2.0-cp38-cp38-macosx_10_9_universal2.whl (760.6 kB view details)

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

pyhepmc-2.2.0-cp37-cp37m-win_amd64.whl (371.8 kB view details)

Uploaded CPython 3.7m Windows x86-64

pyhepmc-2.2.0-cp37-cp37m-win32.whl (315.3 kB view details)

Uploaded CPython 3.7m Windows x86

pyhepmc-2.2.0-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (426.5 kB view details)

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

pyhepmc-2.2.0-cp37-cp37m-manylinux_2_12_i686.manylinux2010_i686.whl (446.8 kB view details)

Uploaded CPython 3.7m manylinux: glibc 2.12+ i686

pyhepmc-2.2.0-cp37-cp37m-macosx_10_9_x86_64.whl (403.5 kB view details)

Uploaded CPython 3.7m macOS 10.9+ x86-64

File details

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

File metadata

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

File hashes

Hashes for pyhepmc-2.2.0.tar.gz
Algorithm Hash digest
SHA256 e79011cf7d1e1b64d886b0498944d15281fb3cc15b71c9ae2e3c2ec979439693
MD5 92ddb769af0432de95b06db09da8f556
BLAKE2b-256 e66d00956101e871430d30fb579e6dc3f1b005dde747a8c849958207d005958e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyhepmc-2.2.0-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 370.4 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.2.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 863b7c14473fffbf59db90cba03c29b9ba31e0a3f528972f9df16ce4920ae246
MD5 116929feca203de36cff50815d1de625
BLAKE2b-256 3f86cd08c5349f4aa827cf21883d082fb816a23402b48e5f5dedc95c85fa2f97

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyhepmc-2.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9218fd9606ada8401e1174af06969da05edcafafd881677396a62bca7779313b
MD5 c1f8d0535a3760e3c8b966b761f43d71
BLAKE2b-256 996d7f365af34dfd216af0598e8020c2d0741f27c16a26c720faf1a354c78176

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyhepmc-2.2.0-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 43ec49e28f478bfad27978e78e310acf7daf489212f5210c55b89c5d49bdfb97
MD5 47dc79369d7a5a5b1eb95a71d4dbffdb
BLAKE2b-256 14cd02513c86b2b2c391fedd3fce0f192487e3f70c1f4064e767eb247f8d308a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyhepmc-2.2.0-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 372331c9b8f230832376776c64b972f1673b68b773e16a5a819f4722fc5f316f
MD5 1e70bd807279d951aecec00e5449b576
BLAKE2b-256 f37627c2ace08292886e1d9f4bf81680344a9f4ad3f6df91c1413450c5569081

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyhepmc-2.2.0-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 370.3 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.2.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 5610c258307a1da0ccbe84cdb4ad05c66ebc708529fcc0376f56126da9783685
MD5 7125d54c28d6635c150933775cf2aefa
BLAKE2b-256 12370d4032af8bba9ffdb9b86ff05991a2170d0639b483499275d8dea3209cde

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyhepmc-2.2.0-cp39-cp39-win32.whl
  • Upload date:
  • Size: 312.0 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.2.0-cp39-cp39-win32.whl
Algorithm Hash digest
SHA256 f7a066a8622f90b50a96c68724b95786afe21a38495b02e76cf6d5ad6d21f9b5
MD5 4182112042694a82a9000cc1cf44191f
BLAKE2b-256 a71cba102808d693b888497e766262b535dc6823efd8cb5ffac05250b94cfd95

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyhepmc-2.2.0-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 81273088430d53d16d426c2a579e90ec9de4cd6352e575c81eb3566ae9b24d5d
MD5 d23a2ef96a961ccb224cdc4919cae89a
BLAKE2b-256 5dcdce4c2cad0c253b6126425997e646cb2526315b255996306566e3117935ee

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyhepmc-2.2.0-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.whl
Algorithm Hash digest
SHA256 20a4c641903523bdcfda70b8e00e4cee3097b90c3a68e283ef898421e767da27
MD5 e332e5f05325efff292efcfd3046ddaa
BLAKE2b-256 d7718825f6ab94ee94055620ea54a0cc25819fbc8b18d313c2786ca6bc94748c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyhepmc-2.2.0-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 709b564282c2dddd82c2b8ef3b29bf7a1542db9493faf0d571cfd26ded5acfca
MD5 0b72801a42fbddfcbef8bab2072d4efa
BLAKE2b-256 7f165b4daafdaaba0f1fa34dbe59a3613ef29edbdfbba12622a378e4c8b047d0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyhepmc-2.2.0-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 6aa73af86d1e0f0b18ceb616115c02cac36cf48b6a1b9af2731cec999d0c0cae
MD5 dbd2171587656d9be51877a0a7505181
BLAKE2b-256 90725346bc2a453e6a0048f441133fb44338e0fee0ceea718b4baf6f44b3c2a5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyhepmc-2.2.0-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 373.9 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.2.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 fad25e7fd4e920e215809072380d594125e218293a7627e1a8438cfd68fc295b
MD5 55df1ed1c23bfee90e2e3d691d89b4eb
BLAKE2b-256 6bbb28084b5cb0207e92be102e75a199645d87dd299acd98aa4569d40e16adbd

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyhepmc-2.2.0-cp38-cp38-win32.whl
  • Upload date:
  • Size: 312.7 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.2.0-cp38-cp38-win32.whl
Algorithm Hash digest
SHA256 6a93c86fbe733eba0144ee7530f9abc5e78fa6419035e678e8de4d6cff047502
MD5 224a802d21fbc86ff7b83c2e12598ec7
BLAKE2b-256 b60cd6e46fdd51f019c9305562b7a9a4e59fe6ac07d0f3b3dee810d4afd47127

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyhepmc-2.2.0-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 3440e8da2091aeb3456d6ea1a5e57582713b189ccbe7f071ace7cbf382554805
MD5 bc521ea7a0962c53b06edd8384744a37
BLAKE2b-256 86f602345265a5b8f5ef3d2ecaa86b8e0d069b57c2517b44a2fe9bba9d426bbc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyhepmc-2.2.0-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.whl
Algorithm Hash digest
SHA256 1f3b4d7913dcf1833ecf5027cc148967234ec1bf87a77ec2d16861f915b72f7a
MD5 48086a7e69c33c0f71fe7601d3818070
BLAKE2b-256 ada663dec0210c178ee1c776c64bb44891d79eb518b5a795f5b1e1ace16ab1e1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyhepmc-2.2.0-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 67be2c43621b8a3b1960cdf2b707fffc6cb502b35a2998e8dc5fb0d838c16e7e
MD5 587e17c1d8551887698847e8a5b826de
BLAKE2b-256 83bbf5c2100f341ee7c726ebe5c659944766e5824a4f8edfe037bc00a4f90cc5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyhepmc-2.2.0-cp38-cp38-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 7c4e5becc916e2901d016862405bec04e0546fc31a651fc758eab57ad6f831b1
MD5 42d5207eaaa763be7a6f170ab1634066
BLAKE2b-256 ad2f3016864fe7d02aef4fe14e417854a419b6bf2f7448ca89abe722df76a083

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyhepmc-2.2.0-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 371.8 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.2.0-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 9ba8f6b1e979e2a7744bd45b397df6fe2e10c31d30b8bb382aa55f9ba3dab45a
MD5 546e86ae39f334a8e1e5068d24cfdf1c
BLAKE2b-256 1e550b7814c0561c8107c95d2127f5fc60f69a42ae0fc8363c2d127f00661bc2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyhepmc-2.2.0-cp37-cp37m-win32.whl
  • Upload date:
  • Size: 315.3 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.2.0-cp37-cp37m-win32.whl
Algorithm Hash digest
SHA256 5d6faa714fc3f6253ab4ad14f1a8e07abf236e0759ae53282787caf85dfd8bfa
MD5 e23015bd6cd42d5e5f7241b0933d6225
BLAKE2b-256 acab27710c1c4d1cb03ee204fda7e078a53862fb65b854b2c9513cec6c699738

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyhepmc-2.2.0-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 1e1e93c140ea0534872973a07b6e7568eaa2676a32aaec1064b47cfc8241144b
MD5 3cc8a168c36f883594e52cd14de0ff2a
BLAKE2b-256 cf5467caea7cfc590c3b5d08738b8d3405a709fa2fced20bdeb6752ba9cfbf23

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyhepmc-2.2.0-cp37-cp37m-manylinux_2_12_i686.manylinux2010_i686.whl
Algorithm Hash digest
SHA256 1f3e8390fcd586529e25a48cf25c867627ca312cfa431077ddeee81447186fad
MD5 878ad0f0ac90a642317036964c7b3483
BLAKE2b-256 91a040eca99519b20538b204b31e6bde2f33c0541cb7539249270d970ce58d0d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyhepmc-2.2.0-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 79b4059656da0b2e44e7108717882d73ea4bfbaf9f9964c50b43896396429ffe
MD5 540873d22945029e9492f508f63cddab
BLAKE2b-256 71f65b4efc95a7fcb600748b6e94ec2f446a33a203e652f8fa2a212cbfbf35f5

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