Hegel for Python
hegel-python is a property-based testing library for Python. hegel-python is based on Hypothesis, using the Hegel protocol. If you are coming from Hypothesis, the documentation sets out how the two compare.
Installation
To install: pip install hegeltest. The package is imported as hegel and needs Python 3.11 or later.
Quickstart
Here's a quick example of how to write a Hegel test:
import hegel
from hegel import generators as gs
def my_sort(ls):
return sorted(set(ls))
@hegel.test
def test_matches_builtin(tc):
ls = tc.draw(gs.lists(gs.integers()))
assert my_sort(ls) == sorted(ls)
This test will fail when run with pytest! Hegel will produce a minimal failing test case for us:
_____________________________ test_matches_builtin _____________________________
test_readme.py:12: in test_matches_builtin
assert my_sort(ls) == sorted(ls)
E assert [0] == [0, 0]
E Falsifying example:
E ls = [0, 0]
E To reproduce this failure, add this decorator below @hegel.test:
E @hegel.reproduce_failure("AXicY2VgYGBkZOBiZEBhMAAAAd8AIQ==")
Hegel reports the minimal example showing that our sort is incorrectly dropping duplicates. If we change my_sort() to sorted(ls), this test will then pass (because it's just comparing the standard sort against itself).
## Relationship to Hypothesis
The short version is "We're still figuring that out". Hegel and Hypothesis are both very similar libraries, built on very similar ideas. Hegel is more optimised for the sorts of workloads that you are likely to want to run on Antithesis and we are providing it partly because many people want to write their workloads in Python, and avoiding writing a Hegel for Python just because Hypothesis already existed seemed silly.
As a rule of thumb: If you just want to have tests that run as part of your CI and already have Hypothesis tests, you probably want to keep using Hypothesis. If you want to write a workload for Antithesis, you definitely want to use Hegel. Otherwise... probably stick to Hypothesis for now, but there's not a huge amount in it and in some cases Hegel will be better and you should feel free to experiment.
The answer may change in future, but if and when it does it will be very easy to get an LLM to port your tests from Hypothesis to Hegel.
Metadata
Release files for hegeltest 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| hegeltest-0.2.1.tar.gz | 1.6 MB | With provenance | Details |
Built distributions (wheels)
Total release size: 34.0 MB
Release files / hegeltest-0.2.1.tar.gz
| Download URL | hegeltest-0.2.1.tar.gz |
|---|---|
| Size | 1.6 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8bea77bdf9be0aaa6fb65a486d02967a7792c25e0a90427af935b4b7d130f307
|
|
BLAKE2b-256 checksum How to use checksums |
115288370e2e574e90ebcc6e1c2cc391b6ca1383435129b7f6946aaf9107c505
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.
Transparency logRelease files / hegeltest-0.2.1-cp314-cp314-win_amd64.whl
| Download URL | hegeltest-0.2.1-cp314-cp314-win_amd64.whl |
|---|---|
| Size | 2.0 MB |
| Tags | CPython 3.14 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
f1c7848fa87268097cc76ddca300d7e630aa94a9ebb34e1b6cc17789deff2273
|
|
BLAKE2b-256 checksum How to use checksums |
cd5df30fcb32fda4e75ee6fbd302873ca069c7ab2c4e0684cf0f53543b4d5437
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.
Transparency logRelease files / hegeltest-0.2.1-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | hegeltest-0.2.1-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 2.1 MB |
| Tags | CPython 3.14 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
8ffe55e2d5f4c0322035b23351334823cca3e04ada07cdfdfa2b32f5926051f7
|
|
BLAKE2b-256 checksum How to use checksums |
b0edae00827df2c3043fcba4bc7c6f04e1f29f22ccdd583bc3f3c1068d7f96f3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.
Transparency logRelease files / hegeltest-0.2.1-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | hegeltest-0.2.1-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 2.1 MB |
| Tags | CPython 3.14 Linux glibc 2.17+ ARM64 |
|
SHA-256 checksum How to use checksums |
e60ca87301ed1affbf7e8a61f32adb948186f82b84073d92312323e0fdd51f77
|
|
BLAKE2b-256 checksum How to use checksums |
78e401ffb1a1127b560130e8f52714374db44e4f91022fc403d56678a8d8788a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.
Transparency logRelease files / hegeltest-0.2.1-cp314-cp314-macosx_11_0_arm64.whl
| Download URL | hegeltest-0.2.1-cp314-cp314-macosx_11_0_arm64.whl |
|---|---|
| Size | 1.9 MB |
| Tags | CPython 3.14 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
1b730ea66fff7eb7d8311cd49fc189f48e61a747c2c07e09740607868099ecde
|
|
BLAKE2b-256 checksum How to use checksums |
1bcea7e74ac01f2ff4fae93d58ec1bc477c2956a5878d3a9b29722f794cd69b6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.
Transparency logRelease files / hegeltest-0.2.1-cp313-cp313-win_amd64.whl
| Download URL | hegeltest-0.2.1-cp313-cp313-win_amd64.whl |
|---|---|
| Size | 2.0 MB |
| Tags | CPython 3.13 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
e9e9d655b3df52cb1d71996071981c7c3b7862b2886596c22229f3ef5b3f4ac5
|
|
BLAKE2b-256 checksum How to use checksums |
fd840f0686882ba690e982c4fcbe5167c40cb642f9ec1a210dfe2b2e9ca07355
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.
Transparency logRelease files / hegeltest-0.2.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | hegeltest-0.2.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 2.1 MB |
| Tags | CPython 3.13 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
d3408f6b59bdb10ec00bd21cdeefdb5e67df50ece59fb0502064bf07f2702af3
|
|
BLAKE2b-256 checksum How to use checksums |
ee0d2382cb21c261c8e2f6f90ba4512e148dcdf898ff5210588e73e9a6697375
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.
Transparency logRelease files / hegeltest-0.2.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | hegeltest-0.2.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 2.1 MB |
| Tags | CPython 3.13 Linux glibc 2.17+ ARM64 |
|
SHA-256 checksum How to use checksums |
2273dc3407cd8df26586adc96ffa4b8ecb9d4ecbdc9108736f7745075846029b
|
|
BLAKE2b-256 checksum How to use checksums |
580f86708e670780caf1b50cca4f9910c39e8fed53da25b57d47aaa1aa2f4d0d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.
Transparency logRelease files / hegeltest-0.2.1-cp313-cp313-macosx_11_0_arm64.whl
| Download URL | hegeltest-0.2.1-cp313-cp313-macosx_11_0_arm64.whl |
|---|---|
| Size | 1.9 MB |
| Tags | CPython 3.13 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
1e9d030f0ada1e7353a8e45c184748b6f25655a0ca55ee1849f75557d694a4a3
|
|
BLAKE2b-256 checksum How to use checksums |
2f0f292a5097b745db97a7950153993521d93580295cfde09e115c2cd4fe7a3e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.
Transparency logRelease files / hegeltest-0.2.1-cp312-cp312-win_amd64.whl
| Download URL | hegeltest-0.2.1-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 2.0 MB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
b365b29b1108ff0aada1d1dc77a35068a37fd45b5e43119fd501983632418153
|
|
BLAKE2b-256 checksum How to use checksums |
08efe17376e48d89a3e9da8007f7e04d4ec784d4b70bcb0ef0c51717997c0053
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.
Transparency logRelease files / hegeltest-0.2.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | hegeltest-0.2.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 2.1 MB |
| Tags | CPython 3.12 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
9ea858c4a6f518cac7090a18d23bfd466acabb6d82432fff573ae8500ebda767
|
|
BLAKE2b-256 checksum How to use checksums |
3441b9eadb46576fb98efd359e70a34be7f003fe5c0b03058358f30e508dbfdf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.
Transparency logRelease files / hegeltest-0.2.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | hegeltest-0.2.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 2.1 MB |
| Tags | CPython 3.12 Linux glibc 2.17+ ARM64 |
|
SHA-256 checksum How to use checksums |
8111a327f0ac540a636cdae2a04ad54415d1516e6c3e1db881245ee9bee36701
|
|
BLAKE2b-256 checksum How to use checksums |
c1844a5d623095dbe30010e63af767dc50ca4bb5d83f3f7054b9afe7f26107fd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.
Transparency logRelease files / hegeltest-0.2.1-cp312-cp312-macosx_11_0_arm64.whl
| Download URL | hegeltest-0.2.1-cp312-cp312-macosx_11_0_arm64.whl |
|---|---|
| Size | 1.9 MB |
| Tags | CPython 3.12 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
ddccd48ea1a5dbbcbc15f2b929bde895d5cc3ef5e3eb3ea4781382ca8a20b827
|
|
BLAKE2b-256 checksum How to use checksums |
e6ad4617fcd34bfee679698ffbb700d8c30a371237b78422e2199cc4af7f64d3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.
Transparency logRelease files / hegeltest-0.2.1-cp311-cp311-win_amd64.whl
| Download URL | hegeltest-0.2.1-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 2.0 MB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
4c0c88cf5c281efde4d4c0f3b2848b9546808633cb70ba8bc14034b5d6134984
|
|
BLAKE2b-256 checksum How to use checksums |
239c41eec3f67fd7340b2c8ce528955a5f2d834e0b08b2a7c5319fe6de142e47
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.
Transparency logRelease files / hegeltest-0.2.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | hegeltest-0.2.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 2.1 MB |
| Tags | CPython 3.11 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
b974bd178d8e4e63de4ecb90b7cf6b08c9ad78567a543df88780ef52f1df08de
|
|
BLAKE2b-256 checksum How to use checksums |
58c35359bf8ddd36dd70bde685941743c279a45b4f3fc9e5c7619405ae7f2e07
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.
Transparency logRelease files / hegeltest-0.2.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | hegeltest-0.2.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 2.1 MB |
| Tags | CPython 3.11 Linux glibc 2.17+ ARM64 |
|
SHA-256 checksum How to use checksums |
9f7cdddbff757eb135b275e5e149c4295f337ae28e6f95f4444df292cb4deb1f
|
|
BLAKE2b-256 checksum How to use checksums |
a135ef50075b1bceaf26cc1cb6d13633256e54f543dbf719bfc528ddf54ee1bf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.
Transparency logRelease files / hegeltest-0.2.1-cp311-cp311-macosx_11_0_arm64.whl
| Download URL | hegeltest-0.2.1-cp311-cp311-macosx_11_0_arm64.whl |
|---|---|
| Size | 2.0 MB |
| Tags | CPython 3.11 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
ca5b4359bad706e84439e4b7089414a0e1ca106444c5dd821fe0830af72340f7
|
|
BLAKE2b-256 checksum How to use checksums |
7af1a721e390a9d1ff1521416a1e82f3da9f98b80ac9618c9f6cd6d44e2b8ec9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.
Transparency logSecurity for hegeltest 0.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 17 files in this release have been uploaded with provenance metadata.
Attestation for hegeltest-0.2.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.