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

Uploaded Source

Built Distributions

pyhepmc-2.4.0-cp310-cp310-win_amd64.whl (374.7 kB view details)

Uploaded CPython 3.10 Windows x86-64

pyhepmc-2.4.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (466.0 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

pyhepmc-2.4.0-cp310-cp310-macosx_10_9_x86_64.whl (410.8 kB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

pyhepmc-2.4.0-cp310-cp310-macosx_10_9_universal2.whl (761.2 kB view details)

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

pyhepmc-2.4.0-cp39-cp39-win_amd64.whl (374.7 kB view details)

Uploaded CPython 3.9 Windows x86-64

pyhepmc-2.4.0-cp39-cp39-win32.whl (313.7 kB view details)

Uploaded CPython 3.9 Windows x86

pyhepmc-2.4.0-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (425.8 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.12+ x86-64

pyhepmc-2.4.0-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.whl (443.8 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.12+ i686

pyhepmc-2.4.0-cp39-cp39-macosx_10_9_x86_64.whl (411.0 kB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

pyhepmc-2.4.0-cp39-cp39-macosx_10_9_universal2.whl (761.5 kB view details)

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

pyhepmc-2.4.0-cp38-cp38-win_amd64.whl (374.8 kB view details)

Uploaded CPython 3.8 Windows x86-64

pyhepmc-2.4.0-cp38-cp38-win32.whl (313.5 kB view details)

Uploaded CPython 3.8 Windows x86

pyhepmc-2.4.0-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (425.3 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.12+ x86-64

pyhepmc-2.4.0-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.whl (443.6 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.12+ i686

pyhepmc-2.4.0-cp38-cp38-macosx_10_9_x86_64.whl (410.9 kB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

pyhepmc-2.4.0-cp38-cp38-macosx_10_9_universal2.whl (761.4 kB view details)

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

pyhepmc-2.4.0-cp37-cp37m-win_amd64.whl (372.6 kB view details)

Uploaded CPython 3.7m Windows x86-64

pyhepmc-2.4.0-cp37-cp37m-win32.whl (316.2 kB view details)

Uploaded CPython 3.7m Windows x86

pyhepmc-2.4.0-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (427.4 kB view details)

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

pyhepmc-2.4.0-cp37-cp37m-manylinux_2_12_i686.manylinux2010_i686.whl (447.6 kB view details)

Uploaded CPython 3.7m manylinux: glibc 2.12+ i686

pyhepmc-2.4.0-cp37-cp37m-macosx_10_9_x86_64.whl (404.4 kB view details)

Uploaded CPython 3.7m macOS 10.9+ x86-64

File details

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

File metadata

  • Download URL: pyhepmc-2.4.0.tar.gz
  • Upload date:
  • Size: 351.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.0.tar.gz
Algorithm Hash digest
SHA256 86b5e045737e2b6b5930e24c9a6d32e6ee109261c217780975c03951d70fe213
MD5 2ee8f3421c464b91541387518dd402fd
BLAKE2b-256 1e86c0a6107bf04bdcc3a3edf9143c52c785aa1bb74d351edcacc927d5827008

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyhepmc-2.4.0-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 374.7 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.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 76bdf0d37f24eb7263bae53c2374b86ec2fe8ba169f35b1162330e5345abddf2
MD5 201bf459d3ab09513358e4a94d8a3742
BLAKE2b-256 4e47fe2c9322d2e81b45089e6b5f93b3f64d5a54354c53f5ce979bc7ec043754

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyhepmc-2.4.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4c117a1ffc454dc52fe996532818e734933f32d3aaa309a4415980cb41c7f7f3
MD5 2db3338d0bdbb5963802b381f56652f3
BLAKE2b-256 3329bc02e42662207018f55cb945b4b7df710d4514e7b60082a5462dd86e7a91

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyhepmc-2.4.0-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 7ac2da01f2cb6435a554197328e94b465da50ce530d092357cb1612b83484a98
MD5 a39235942e2a3fc7fd18b04553bb9760
BLAKE2b-256 5f45ed670b7b33264ad573c3d9c92edfdca280b67f0732897fa3d1de431a7232

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyhepmc-2.4.0-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 11cb0763eb7a03f64f3a4670aa54054309eb5420d55307cca198aad74a1572a2
MD5 5580877a853811533a1bffdc8c6defdc
BLAKE2b-256 05fe63923741d7e01527ce5619f8ad392883f2b1793c894bdf3c6b68c6f06e0a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyhepmc-2.4.0-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 374.7 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.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 7054cc9828eae6e725f164701f3e7ece10563e49ddad2a099a3050db09d293ef
MD5 eb5c7499f35f6ff8d942abe08c156c47
BLAKE2b-256 c2439aa8db0e9a1cf24c54a88ee44f742780bcbaf19a08b85bb12aadb4584a84

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyhepmc-2.4.0-cp39-cp39-win32.whl
  • Upload date:
  • Size: 313.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.4.0-cp39-cp39-win32.whl
Algorithm Hash digest
SHA256 2cc5553db8536a4dc1a49cbceaccff4ffa4fe91aade0f9e7dfe431db805b3323
MD5 562c74814cca3d01f8ed47805420165d
BLAKE2b-256 fee22e4655a908a50792d5bffb184097c1bdc9d648d92b7c7dd15a627545f113

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyhepmc-2.4.0-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 5887d07e0cd4ff388d2e7c639f9fae8b217900ec9a52a9d4c60fabe8fd2da527
MD5 a1aa399bbc91bb64485bea165a8d0bfc
BLAKE2b-256 1542249ebb141d2b8be820d19044f4920b9c9eb3e2b1e0e61cf01d2205848c71

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyhepmc-2.4.0-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.whl
Algorithm Hash digest
SHA256 7e7c172e12a4cbf31514fa34d98b0fbb3a1e9484cc63d6685996b0a64a8de33b
MD5 f9d5066bd254c25f5b89059ec3ab51f0
BLAKE2b-256 5a9bf1b21102f8b2132d8bc25b3263b13050174f49ed8b66efc4e63c9fd1b8f8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyhepmc-2.4.0-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 ef6f4dc498b2dd491d90360c562dbb5729f06c4bdf80c6c221b205d7ea4cafd3
MD5 326097575fa9ab44ddac9ca738b9838e
BLAKE2b-256 7ab62efdac45f424c01c5f742dfea2db216a929c62b5c111d7aa43c9fba3f3d0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyhepmc-2.4.0-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 8428db2325cc1cc7f04f3e521f7fd8781e6564446a5f874a007bff3f37bb413e
MD5 f552ac6f8c33762844355310eefedb3b
BLAKE2b-256 a8d93fe92b8397e4e9db281c82995b2ee2d760b7a93ea85c31e1010b7c23574b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyhepmc-2.4.0-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 374.8 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.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 ee1985a02b06b264fe323792b1d95bc39edccf91382acbfa156984301f2abd7e
MD5 1da71368891fe572a41cb330c032a279
BLAKE2b-256 36bdabf08d790a6228ed9fdf1e7a03d44e4b6e54e3033dc40097b400444125f1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyhepmc-2.4.0-cp38-cp38-win32.whl
  • Upload date:
  • Size: 313.5 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.0-cp38-cp38-win32.whl
Algorithm Hash digest
SHA256 fb5b403473e609549c30b2f7d8ec79606a58fe8c0a4d0e74d2924fa9bad53374
MD5 3b7b3a6cfadce64f159268a34679e331
BLAKE2b-256 c64bfbdd85842c7508f5d388bc32023bc18467f99b9ac90cd15417c2833a8171

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyhepmc-2.4.0-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 3a16f00537e3d27b6b730493a795b2dfdda54dd4bbaab12d75601f76ef17f3e0
MD5 51729b20eebc9ee654337f6d221bcc3f
BLAKE2b-256 e8f4b26987fb65a5c1729366be18ff9ee4ccb18789f20ecd3bb9e90ac27f237e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyhepmc-2.4.0-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.whl
Algorithm Hash digest
SHA256 1d798c8b159fa8ed3dd7f9edfaafd2f5d021155a2b02f767fc6c35ce593ca3e9
MD5 5106aaaf651c103ef59a1329f69806a6
BLAKE2b-256 7f8810c49fba33534ca7f6132ac9f9a2c76ea5b3ec2b2c4f2146aa740aa4a4aa

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyhepmc-2.4.0-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 3b1757f4f9d89a412c841341e2ba3be790bc7ad75ff0f08342c1c497e374212f
MD5 b697c4ceb9e9722f6a3cb1ec9b472d75
BLAKE2b-256 74b1e751080fa3beeb0143d12beb0ae401ad59e8fb5ee66601e8b9cdf60d889e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyhepmc-2.4.0-cp38-cp38-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 22ef3a484aab00edb28229bf9a4d09378fd7e378d94557d28826877b34ad1e94
MD5 36b427399701137a085f88acb46fcfbf
BLAKE2b-256 81b05b2d6a28d29e9c3a50495ec486a4fb8bace72d3d01d2d908e84268ccf1e5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyhepmc-2.4.0-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 372.6 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.0-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 436005a56fc3fee7eff4d543fc34da5dc15072f59908940af9a345372944ee4a
MD5 ea56a86754620f6cadcaddec91998323
BLAKE2b-256 e0eea2a05e112702cb98cfcb190d08cdf935aed57b8dfc67533f910084e843d5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyhepmc-2.4.0-cp37-cp37m-win32.whl
  • Upload date:
  • Size: 316.2 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.0-cp37-cp37m-win32.whl
Algorithm Hash digest
SHA256 c1a86759b47a50f0394200f0577ae9da6cbb7e6f708500b509b6b9d28cc6ab72
MD5 2394aa3b5265bf186bbdfb4249b10e97
BLAKE2b-256 deecbe0d8815e0f80a12f14df21fd40f13b97f55c0d1945a3b3c3024d2c609d5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyhepmc-2.4.0-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 bd9c39b35b02c7a1f0897dc28eef199d761f9e32fbde47800ffc067506317f58
MD5 26f577179ee5976b162df902d716b68f
BLAKE2b-256 7b5dc22f8f9dd77b895803170f75fed9ff7369a962470fe32f7953c5332eb5b9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyhepmc-2.4.0-cp37-cp37m-manylinux_2_12_i686.manylinux2010_i686.whl
Algorithm Hash digest
SHA256 e82a6f23226e0e3194959e204a5a4c2f7d9c3427afcffeb97248a1486ee5007a
MD5 ae998e96e912955e108c5743e11f9d86
BLAKE2b-256 e956e490a5ea5dd1d5bd1965439e030dc098b1529669e67b1212014237bfaed2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyhepmc-2.4.0-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 2084ded3bb5216e96e075c6f30af963b00db6cf1811b3aab0c431846fd06d5df
MD5 7c44c53c87970c324a8d0a8b3d9baaa9
BLAKE2b-256 3be88c1df1d824d3efbed450a41047c98068de16652f993d4306a2ff5639df20

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