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

Uploaded Source

Built Distributions

pyhepmc-2.3.0-cp310-cp310-win_amd64.whl (371.1 kB view details)

Uploaded CPython 3.10 Windows x86-64

pyhepmc-2.3.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (465.8 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

pyhepmc-2.3.0-cp310-cp310-macosx_10_9_x86_64.whl (410.7 kB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

pyhepmc-2.3.0-cp310-cp310-macosx_10_9_universal2.whl (761.0 kB view details)

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

pyhepmc-2.3.0-cp39-cp39-win_amd64.whl (371.0 kB view details)

Uploaded CPython 3.9 Windows x86-64

pyhepmc-2.3.0-cp39-cp39-win32.whl (312.7 kB view details)

Uploaded CPython 3.9 Windows x86

pyhepmc-2.3.0-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (425.6 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.12+ x86-64

pyhepmc-2.3.0-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.whl (443.6 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.12+ i686

pyhepmc-2.3.0-cp39-cp39-macosx_10_9_x86_64.whl (410.8 kB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

pyhepmc-2.3.0-cp39-cp39-macosx_10_9_universal2.whl (761.3 kB view details)

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

pyhepmc-2.3.0-cp38-cp38-win_amd64.whl (371.0 kB view details)

Uploaded CPython 3.8 Windows x86-64

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

Uploaded CPython 3.8 Windows x86

pyhepmc-2.3.0-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (425.1 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.12+ x86-64

pyhepmc-2.3.0-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.whl (443.4 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.12+ i686

pyhepmc-2.3.0-cp38-cp38-macosx_10_9_x86_64.whl (410.8 kB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

pyhepmc-2.3.0-cp38-cp38-macosx_10_9_universal2.whl (761.3 kB view details)

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

pyhepmc-2.3.0-cp37-cp37m-win_amd64.whl (369.3 kB view details)

Uploaded CPython 3.7m Windows x86-64

pyhepmc-2.3.0-cp37-cp37m-win32.whl (315.6 kB view details)

Uploaded CPython 3.7m Windows x86

pyhepmc-2.3.0-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (427.2 kB view details)

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

pyhepmc-2.3.0-cp37-cp37m-manylinux_2_12_i686.manylinux2010_i686.whl (447.5 kB view details)

Uploaded CPython 3.7m manylinux: glibc 2.12+ i686

pyhepmc-2.3.0-cp37-cp37m-macosx_10_9_x86_64.whl (404.2 kB view details)

Uploaded CPython 3.7m macOS 10.9+ x86-64

File details

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

File metadata

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

File hashes

Hashes for pyhepmc-2.3.0.tar.gz
Algorithm Hash digest
SHA256 bea5efb8fa950843899b96068b4fdd641afa245c1d842e269c1315cea37f216c
MD5 8aa8e28a6f89bcf7dbd1b3ea0d6e4e13
BLAKE2b-256 4a3268053df1eba242ac57a531073d1ab5a37b8855d1395ef6b1f849dc601899

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyhepmc-2.3.0-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 371.1 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.3.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 a2e53c98547117ac2f80d8aaf76a9e819dd6e9a0d38e05df621d3abb50fb6845
MD5 c0ec0d2e255ac7cf7f7fc2850161723a
BLAKE2b-256 f2dd5a75643983f2840f91e956df84228beb54235b6c8e7f4a78d6020e4306a9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyhepmc-2.3.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8e412053297a30825250715e140763d201b71b8d5c1a2c5443ae249d63d36292
MD5 5aef908264b36c39418b5a2cbc7d021a
BLAKE2b-256 35669fa14bf97aa6f3299491a2f7fdf62e449722bed387158966335120cee2d9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyhepmc-2.3.0-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 4e30a3d37218fce5073c815de05e2f3521edc676d0ea485d2d82392cb03b0ff2
MD5 147c892ada625af461df1c9c1db47bad
BLAKE2b-256 6e57a5be14bf81357bf882e40cc16ece74f5180f390ff88d8091ac2d6d2fe8a8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyhepmc-2.3.0-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 23b5b9060729c9e3c673940edf4b3b1ce8433581ea07dc59d9282af95099773e
MD5 a8504541df798f6022085a3c680dc054
BLAKE2b-256 c83be9ba1a11f484bdfaee14cd3a6133e3fc22ce0807e72b37a6e0695b0b1f14

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyhepmc-2.3.0-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 371.0 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.3.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 2323268578abc08c0d4394f8293adc3b27a4fe288fbc6c23438bd3e3b00438c0
MD5 5eba64151bfaf86466ebe75493bf32ec
BLAKE2b-256 fe88ea1811df5a979cbfa52eb2453493f67879ad783e4eb7604609f630ef462e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyhepmc-2.3.0-cp39-cp39-win32.whl
  • Upload date:
  • Size: 312.7 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.3.0-cp39-cp39-win32.whl
Algorithm Hash digest
SHA256 a14628fb639c5ed5e7d2ba4d004f6a5954e01d94ea61f224999d5692ee9d40a2
MD5 6f1a704ce346ba89351b62ce9ba95af1
BLAKE2b-256 6a59dd434877652d451984ea4701f3c7ade2c798bef2750d2f8e472fcc3fddf8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyhepmc-2.3.0-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 d72727a143cd2eac1a466a218883dd43a48b063c1a6230cd0a37b1630dcd698b
MD5 1ab9157aebb491c1e4591bdee13cdf85
BLAKE2b-256 0c5778d93fda61feea7fc7d650df50f54917591e3b6c500941f83e4d07684b2a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyhepmc-2.3.0-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.whl
Algorithm Hash digest
SHA256 ca285f1266ca4bb188cae2f700981d032ce4eebc4edae2f33f1a125156820af0
MD5 59903a1e1fe3c77007de503984f03ffa
BLAKE2b-256 d3deb2bf3e0eadf9ec36fe78fbda0397eced22ab5db0937a19ba77c5eab7ca4a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyhepmc-2.3.0-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 08861748defd8d07bd891c74aa8ab563a55291fc7030a019e0c6bb969c26689e
MD5 aa7aa041792fbc64609e84732b922211
BLAKE2b-256 dea224be819cf2af34999ce2a32a9be018cbd473b51393e27cc34cfdd1f7f1f8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyhepmc-2.3.0-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 341b389a52a9cda776a81ac3d00290afc4f98eaa28f588b39ae7285f495bc35b
MD5 e1b9a5c0110be11c7fc3e2258b97ce1c
BLAKE2b-256 36accda1afbb47020851f37284a72d44124f1d1d6e4aa0c9a10fc07d6124081f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyhepmc-2.3.0-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 371.0 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.3.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 65bef192a9d088e70f521141536e64ab53c58a605088801a27f15868d81070fa
MD5 bcdd6418a7c835d0aadad5b811b423a2
BLAKE2b-256 86141bd7404daaef9b3faba365fba497e650348d693bfcfd14a68ad84e32df82

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyhepmc-2.3.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.3.0-cp38-cp38-win32.whl
Algorithm Hash digest
SHA256 f0e06d95e3235f5b602c1ca62c90abe30fcfd739a7ad8819152f7f37258bc922
MD5 441e51c12e207f86e58bbf48d56c9ddb
BLAKE2b-256 c2a1ec6339cd3f0e20fa56baf42d56210ef16d18e1381b4af40546fa56824822

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyhepmc-2.3.0-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 90ccff3a920b6eff4f2737cb7cc3396685a458dbf2e41461f78d5daa935f8462
MD5 4d173572ffb707f9d4cdf0b075312b52
BLAKE2b-256 da05845bd4dac764001f70a22176c0451b3cadb02b69c15bc5520210edf99b8b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyhepmc-2.3.0-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.whl
Algorithm Hash digest
SHA256 59459a31834c8e801478be0ce6a16287d2b34a10e55f4a5cf7a89d7f5c7682fe
MD5 645df2f237aa652cb664f7a854287db6
BLAKE2b-256 bd09a268639472915312c42c690800277bb61d09caa34813c9d7a490811491fb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyhepmc-2.3.0-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 1de64312f17c8854aec6c609ba69fef1793a6e5a0781456105f6cbde84c748bf
MD5 eef9af806ca8361187d2e718bd54d553
BLAKE2b-256 b2dc01d92e654fec41d8704bd55ee7f8c83e1071864c65ff0aad2ed0a4b77e2d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyhepmc-2.3.0-cp38-cp38-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 042cac0c9a6cfcf56516f0db79e5c40d40908f728831de47e1bea6e03ebb2b69
MD5 37156deca226fbbc2c76e06699478420
BLAKE2b-256 7547e29aa68af3009dd6a3a790a5a205b38feaf1cb402dd7f3d0cf73945e20c5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyhepmc-2.3.0-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 369.3 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.3.0-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 12a35ad195c2cb1fa83469edd14c88b3d22cc35e7ad2af48970a09d09bfe562a
MD5 ceeacb3a38a3a5ea01bd5dc7de7266bc
BLAKE2b-256 ec9a227014a8cf038a43a5f99a2e10c252b26c65dd60f5f69337b519f33490d2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyhepmc-2.3.0-cp37-cp37m-win32.whl
  • Upload date:
  • Size: 315.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

Hashes for pyhepmc-2.3.0-cp37-cp37m-win32.whl
Algorithm Hash digest
SHA256 9b6ec42c61ebd9edb6295e06a83f58372113c010a6280f50fd525af6750c93ac
MD5 7c8a5315aa1becc35fd1ece680f71e86
BLAKE2b-256 2dd5e9de1af875ed3ff81dadcc450c4a1c7247fc603ed68c580b295f95d7725b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyhepmc-2.3.0-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 2f1cc2e2e65042c6d7d9e25e5d7bba3840446bc182b614670788efb5125bed01
MD5 d845218cb5d4947d25f6cc0bfa92c152
BLAKE2b-256 275f339e18eff8e76fb710b94cd6c3fa8a3f0cb146ec3d229159a9ceaf5174ce

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyhepmc-2.3.0-cp37-cp37m-manylinux_2_12_i686.manylinux2010_i686.whl
Algorithm Hash digest
SHA256 5f39ea3fa7dbb1bb6aad39620f0e541d9a22a613b83a11abbd6a348688ad03d6
MD5 89161a7e4ec5406a67375e25cf9c1f58
BLAKE2b-256 8930c5f27f3ae166fc5d673d167d007124c8396ab672635a8f610a16cb32feb5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyhepmc-2.3.0-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 837e3bf4bc932413991dd05950277236a5dd0f98ea0ccb53b4ec706dd86ee16d
MD5 def8bdbd196d41e9dd4636a648fd58b8
BLAKE2b-256 9874ae7d84c2367e6762f81cd0a06d9837f6d2c9f777eedac39ade103b7daace

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