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

Uploaded Source

Built Distributions

pyhepmc-2.4.1-cp310-cp310-win_amd64.whl (374.8 kB view details)

Uploaded CPython 3.10 Windows x86-64

pyhepmc-2.4.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (466.1 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

pyhepmc-2.4.1-cp310-cp310-macosx_10_9_x86_64.whl (410.9 kB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

pyhepmc-2.4.1-cp310-cp310-macosx_10_9_universal2.whl (761.3 kB view details)

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

pyhepmc-2.4.1-cp39-cp39-win_amd64.whl (374.9 kB view details)

Uploaded CPython 3.9 Windows x86-64

pyhepmc-2.4.1-cp39-cp39-win32.whl (313.8 kB view details)

Uploaded CPython 3.9 Windows x86

pyhepmc-2.4.1-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (425.9 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.12+ x86-64

pyhepmc-2.4.1-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.whl (443.9 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.12+ i686

pyhepmc-2.4.1-cp39-cp39-macosx_10_9_x86_64.whl (411.1 kB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

pyhepmc-2.4.1-cp39-cp39-macosx_10_9_universal2.whl (761.6 kB view details)

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

pyhepmc-2.4.1-cp38-cp38-win_amd64.whl (374.9 kB view details)

Uploaded CPython 3.8 Windows x86-64

pyhepmc-2.4.1-cp38-cp38-win32.whl (313.7 kB view details)

Uploaded CPython 3.8 Windows x86

pyhepmc-2.4.1-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (425.4 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.12+ x86-64

pyhepmc-2.4.1-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.whl (443.7 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.12+ i686

pyhepmc-2.4.1-cp38-cp38-macosx_10_9_x86_64.whl (411.1 kB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

pyhepmc-2.4.1-cp38-cp38-macosx_10_9_universal2.whl (761.6 kB view details)

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

pyhepmc-2.4.1-cp37-cp37m-win_amd64.whl (372.7 kB view details)

Uploaded CPython 3.7m Windows x86-64

pyhepmc-2.4.1-cp37-cp37m-win32.whl (316.3 kB view details)

Uploaded CPython 3.7m Windows x86

pyhepmc-2.4.1-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (427.5 kB view details)

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

pyhepmc-2.4.1-cp37-cp37m-manylinux_2_12_i686.manylinux2010_i686.whl (447.7 kB view details)

Uploaded CPython 3.7m manylinux: glibc 2.12+ i686

pyhepmc-2.4.1-cp37-cp37m-macosx_10_9_x86_64.whl (404.5 kB view details)

Uploaded CPython 3.7m macOS 10.9+ x86-64

File details

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

File metadata

  • Download URL: pyhepmc-2.4.1.tar.gz
  • Upload date:
  • Size: 352.3 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.1.tar.gz
Algorithm Hash digest
SHA256 deea33afb0c1562a5663c4c58f21ceca9d4ec2eb6d829cd49c3076a464fca6d8
MD5 8e300a8ff510264d8d89746181f0e1e6
BLAKE2b-256 5b45b199ccc80e35e453c76035002b14db078f6230653d61b993540d9a2eb104

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyhepmc-2.4.1-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 374.8 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.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 b6ae1556c654496c501a06efcfd79f8a816e3b23df6524c18c5956b9a031d59c
MD5 f3ef36b3cd8163e5ebe2e987bfd88a13
BLAKE2b-256 85eb32edfa4323984f5df102f73e55547338d88dd5a8fa348698779c6d698892

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyhepmc-2.4.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 804c26d4a10f32aa258eba0c31bdba6b3e3ea217b6f6c906198ee4f7b9089966
MD5 05ae510233e11cc58f0d1e4403537f7f
BLAKE2b-256 28ee553c1415cf0b2e2fbdeaf272bfbb8cc8c377e2d63cae120d1b26c42d9e7a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyhepmc-2.4.1-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 c04822facad4448bff5140f970a262c99425030a5ca2942fa5f9d2c20176479e
MD5 2f0cc5cfc948a6b837e55bb0c1441630
BLAKE2b-256 b3115895f5a8e39e4db531ced53a3b77328b1ffa8a1d3ae72250680a45c59189

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyhepmc-2.4.1-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 4d782900839f7e911e525730e7e21c86eeb654b134a633bcb1ec1fb54ae69d8f
MD5 09ce54f0f21499190a7c9119def1fc66
BLAKE2b-256 594237d9bb25ec153149af687bb896c1e9e213d43ea10e11f1b59ab12b664a51

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyhepmc-2.4.1-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 374.9 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.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 27df8c473fb15e641fd312cc58a3d1f0c315f45e334e17a6f91f38d3839f87d6
MD5 a010690f419b9208957f798add5e3a92
BLAKE2b-256 5402f4bc104e04b4aab621d5861daf69448f4e830fcd79695cfb60066102fdbe

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyhepmc-2.4.1-cp39-cp39-win32.whl
  • Upload date:
  • Size: 313.8 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.1-cp39-cp39-win32.whl
Algorithm Hash digest
SHA256 bfd2333c28b79fd7944151958969daa0283a986d55bbc5937c60a855195b8545
MD5 cdaf6e31ca50ed8da0c5ea7bb70b14bb
BLAKE2b-256 82c3e87d749e55a97f5a57a15366d8d0e1f4a59691c33c7f775e9d9afbc80bba

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyhepmc-2.4.1-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 5e92f87be34d35afb6561fb4d4faaef18f590fe4869dd34cdcbf10b568dee150
MD5 90c31002ec8286ade99f7778d66a234f
BLAKE2b-256 eb87fe087cc731dae2a9b7b9d6656d8654e239f9bb33739d93bda92740f3b93b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyhepmc-2.4.1-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.whl
Algorithm Hash digest
SHA256 8d4932c014fbae1ce25569f0b27d5a27d51c13738b78b9b2699db130c8ef65f1
MD5 27abdb886bc1e1172ab485ccf0beb1a9
BLAKE2b-256 325fcf75de191601d87c8dabf87da97b30fc4840a5a4e046d1f5a3d2bea42279

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyhepmc-2.4.1-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 cd177fee87e6ffb146052295268467c6225c1dc6d7935202b7479fb9e81977f1
MD5 a1085570790d276c0fd55e04f09e2d3b
BLAKE2b-256 734b423da381b2dc2ac2f867456a1fe50345470061b6af8ecea0ad4892f08dcc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyhepmc-2.4.1-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 50538c7f7d426f8cd198ae06bf2df08677e33d74e1e338ae4c6e5bc678e036b6
MD5 a5df4adc5aee77cd0f8fe40dfce20005
BLAKE2b-256 851c96ec0c70904bc47a3344195b46c196469a4921f7788a49e67c7029fa591c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyhepmc-2.4.1-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 374.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.4.1-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 68fa50d83ed06adb86506e58a8c55fe274c7ec87d421f35c2490a5bcd7bdfff6
MD5 9af2edc613ef4732b11ca6fe922955b2
BLAKE2b-256 880629253cbef26d9570800e75a02b48c2b4daeb9d4e3a459a2cc351f7456518

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyhepmc-2.4.1-cp38-cp38-win32.whl
  • Upload date:
  • Size: 313.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.4.1-cp38-cp38-win32.whl
Algorithm Hash digest
SHA256 1b69bbe8f77352f10c59619e2728eb9afd2e276e869a0b76aca5ccf380f9f2da
MD5 08020e7f06217546a7085fe169bfbfbf
BLAKE2b-256 abc37694266f1d0e29ba47bf0dcded161c266363cea8a4689f9a30e0ba6d30af

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyhepmc-2.4.1-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 7fa6b661f0400377662fcf598f9b94c40ff98c4beb981f062cb334cd7d1efb20
MD5 aac722032f50084af5e3139627785460
BLAKE2b-256 e382fbe8eeb25acbf9e4b880d81a7f388b74ff9a1ef6737f0c7361adb059e294

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyhepmc-2.4.1-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.whl
Algorithm Hash digest
SHA256 66fc91ddafac17c2f3336832d3ab4394432eedcde168bbcaa721df3bb45b2c37
MD5 5ce2f02a0c1dbb59ea2af8d331966524
BLAKE2b-256 eec8f5752fdbb9a9ed2c13dd0be13d246fcbd2ec175a5443a9ab1a924763e15a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyhepmc-2.4.1-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 dd962932646ae9404b10a7b8a75f8bd2906c820a3bae4c07958e5f8edea47c9c
MD5 bb73f93838d621d767f85a50173a3065
BLAKE2b-256 ae53278b8e44651ad490c12d2cc5472f84ec78f05db5150b90d9d9e85624d134

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyhepmc-2.4.1-cp38-cp38-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 5dcf96569faf54fa5929a558905946953760feef83c288ae4aedf286b6bbdc38
MD5 8d54cffb5b61c3bed9b75e80aaacd2a9
BLAKE2b-256 abc92a00f17fa3f97ac958a9ee98f9f2712b8d26c38bc4e159f13b0010ba339b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyhepmc-2.4.1-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 372.7 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.1-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 786748317a336b0db57d25dae4dc766b159d848ea6d85de4820735f842edc49c
MD5 7c93c492db9d20506414fb86bcf2f6ee
BLAKE2b-256 fb88d8b3d48003a9ef8837e279729c21a56582886e127808e8eb2aa6ae3b9d07

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyhepmc-2.4.1-cp37-cp37m-win32.whl
  • Upload date:
  • Size: 316.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.4.1-cp37-cp37m-win32.whl
Algorithm Hash digest
SHA256 3170dd43648e77516c83a4a661aa1d03090c7c4f8a6265872b9191e0e0f2d8f1
MD5 272c5ffe9a23d5c64c12773a6ae858c9
BLAKE2b-256 ed350d02f0d875fa4a2dae6801303889e26f9118fdaea92f92c4b964d4cb49ee

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyhepmc-2.4.1-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 c1aac1505acdade37c0fcd7af7edc4fc2799bace6d10081d98808ac2eb827d89
MD5 7e9859d89f1c320fa00427d77763e315
BLAKE2b-256 93edfc6d25812444e1849f07a9c2355ec74ed81076fad9a53b924dd4bc50b081

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyhepmc-2.4.1-cp37-cp37m-manylinux_2_12_i686.manylinux2010_i686.whl
Algorithm Hash digest
SHA256 d477510e2012ee72f88a3169759f6b0a75d5dfcfbb2134b6e9a4530dcab7da8c
MD5 270934d7166d210561c00df5df527cff
BLAKE2b-256 48dbb9de6512d6d73502b81c3d6dd31f05b9652882e60324f2e7a535540a933d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyhepmc-2.4.1-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 9a3e28eb33f48ab6ce13e10d4d66d81ce0c3748cb413cc22d7e99680570efb0d
MD5 db83c680fb1a52512fe0d7f80bc88f1c
BLAKE2b-256 63437886719699aac250b4940ba4372c2ca179db0053108b00ec88a420dc0f19

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