hamcrest-proto
Hamcrest matchers for Protocol Buffers in Python.
This is forked from proto-matcher which was no longer receiving updates and which was itself based on MessageDifferencer and EqualsProto googletest matcher.
API
This packages provides the following proto-related matchers:
equals_proto
equals_proto(expected: Message | str)
Test the argument equals the given protobuf message.
approximately
approximately(matcher: Matcher[Message],
float_margin: float | None = None,
float_fraction: float | None = None)
Test the argument equals the given protobuf message, while comparing any float field using approximation.
ignoring_field_paths
ignoring_field_paths(field_paths: set[tuple[str, ...]],
matcher: Matcher[Message])
Test the argument equals the given protobuf message, while ignoring those fields specified in the field paths.
ignoring_repeated_field_ordering
ignoring_repeated_field_ordering(matcher: Matcher[Message])
Test the argument equals the given protobuf message, ignoring the ordering of any repeated field.
partially
partially(matcher: Matcher[Message])
Test the argument partially equals the given protobuf message, i.e. if a field is in the argument but not in the expected message, it's ignored in the comparison.
Development
This project uses uv for dependency management and just as a command runner.
just install # create the venv and generate the test protos
just # format, run all checks (ruff, pyright, deptry), and test
See the Justfile for individual recipes.
Metadata
Release files for hamcrest-proto 0.0.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| hamcrest_proto-0.0.8.tar.gz | 13.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| hamcrest_proto-0.0.8-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 30.3 kB
Release files / hamcrest_proto-0.0.8.tar.gz
| Download URL | hamcrest_proto-0.0.8.tar.gz |
|---|---|
| Size | 13.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
522f3424c72390bc6c8e3daab807a0afb4c73f7cbecc78b6600e20638543cab4
|
|
BLAKE2b-256 checksum How to use checksums |
769023d1da38ac157fcca2515ef15be9d776bb64120dfe8a4009242fb3440aec
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
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 Aug 11, 2026.
Transparency logRelease files / hamcrest_proto-0.0.8-py3-none-any.whl
| Download URL | hamcrest_proto-0.0.8-py3-none-any.whl |
|---|---|
| Size | 17.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0ca262eef8371f90b2b3b35c3dc30913d9989bdcbd561c7fa86bda33a5d2f7e4
|
|
BLAKE2b-256 checksum How to use checksums |
96e94f60f14a87e04f0f2330baa07321a8c9102f69716a91d2eb0b9704e474a4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
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 Aug 11, 2026.
Transparency log