inka-evidence (Python)
The Python binding of the shared inka test
evidence emission layer, plus the
pytest adapter built on top of it. Validation and serialization live in
the Rust crate inka-evidence; this package never restates the wire
schema.
Install
pip install inka-evidence
Wheels for Linux, macOS and Windows (CPython 3.10 and later, abi3) and an sdist are on PyPI and attached to every GitHub Release.
Emission API
from inka_evidence import EvidenceBuilder, Execution
builder = EvidenceBuilder()
builder.capsula_env()
builder.add_test("suite::case", "def test_x(): ...", [Execution("default", "pass")])
text = builder.finish()
pytest adapter
Installing the package registers a pytest plugin (entry point
inka_evidence) that stays inert unless asked to emit:
$ pytest --inka-evidence=evidence.json \
--inka-evidence-provenance source_revision=$(git rev-parse HEAD)
The run itself is untouched: test failures keep pytest's own exit status,
and the evidence file is written for every completed session, failures
included. The CAPSULA_RUN_ID environment variable that capsula run
exports fills the capsula_run_id provenance entry unless an explicit
--inka-evidence-provenance already claimed it.
What is declared and what is reported
The required execution set is declared from the finally selected items —
after -k/-m deselection — never inferred from results:
- a test that ran reports
passorfail(a setup or teardown error is a fail); - a skipped or xfailed test reports
skip; a non-strict xpass is a pass and a strict xpass a fail, following pytest's own verdict; - a declared test the session never reported —
-x, an interrupt — keeps a missing outcome, which never establishes a bind; - a deselected test is not declared at all; a module skipped at
collection time (
pytest.skip(allow_module_level=True),importorskip) likewise contributes nothing, because the skip is a selection-time decision.
The target path is removed when the session starts and written atomically
at the end, so after a suppressed emission (collection errors, a rejected
item, --collect-only, an empty selection) the path is absent — a stale
file can never pass for the run's evidence.
Test-id construction
<nodeid without the parametrization part>
For example tests/test_hash.py::TestRoundtrip::test_roundtrip. Each
parametrization is one required execution whose case is the parameter id
(3-ascii, ...); an unparametrized test has the single case default.
The parameter set is part of the approval interface: adding or removing
parametrizations requires fresh approval.
Contract bodies
The body is the test function's own definition, decorators included,
exactly as inspect.getsource reads it (indentation and trailing newline
preserved — moving a test into or out of a class changes the body and so
the approval interface). Fixture and helper bodies stay excluded: the
contract assigns dependency capture elsewhere. A decorator that replaces
the function without functools.wraps would hide the real source and is
rejected explicitly.
Merging run configurations
python -m inka_evidence.merge_cli (also installed as
inka-evidence-merge) unions per-configuration evidence files into one;
the inka_evidence.merge function exposes the same operation to code.
pytest's cases are its parametrization ids, so label each configuration's
file at merge time (linux=ev-linux.json prefixes its case ids as
linux/<param>).
Topology and version limits
- pytest >= 8 on Python >= 3.10.
- pytest-xdist distribution (
-n/--dist) is rejected explicitly; run the evidence pass without it. - Items that are not function-based tests — doctests among them — are rejected explicitly rather than guessed at.
- With pytest-rerunfailures, the final attempt is the recorded outcome.
- Collection errors and collection-only runs (
--collect-only,--setup-only,--setup-plan) suppress emission entirely: a partially declared set or an all-missing run would mislead. - Tests that wrap subprocesses appear only as the outer pytest test.
Metadata
Release files for inka-evidence 0.0.3
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 | Actions |
|---|---|---|---|---|
| inka_evidence-0.0.3.tar.gz | 83.3 kB | With provenance | Details for inka_evidence-0.0.3.tar.gz |
Built distributions (wheels)
| File | Actions Reset | |||
|---|---|---|---|---|
| inka_evidence-0.0.3-cp310-abi3-win_amd64.whl | CPython 3.10 | abi3 | Windows x86-64 | Details for inka_evidence-0.0.3-cp310-abi3-win_amd64.whl |
| inka_evidence-0.0.3-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl | CPython 3.10 | abi3 | Linux glibc 2.17+ x86-64 | Details for inka_evidence-0.0.3-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl |
| inka_evidence-0.0.3-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl | CPython 3.10 | abi3 | Linux glibc 2.17+ ARM64 | Details for inka_evidence-0.0.3-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl |
| inka_evidence-0.0.3-cp310-abi3-macosx_11_0_arm64.whl | CPython 3.10 | abi3 | macOS 11.0+ ARM64 | Details for inka_evidence-0.0.3-cp310-abi3-macosx_11_0_arm64.whl |
| inka_evidence-0.0.3-cp310-abi3-macosx_10_12_x86_64.whl | CPython 3.10 | abi3 | macOS 10.12+ x86-64 | Details for inka_evidence-0.0.3-cp310-abi3-macosx_10_12_x86_64.whl |
Total release size: 1.9 MB
Release files / inka_evidence-0.0.3.tar.gz
| Download URL | inka_evidence-0.0.3.tar.gz |
|---|---|
| Size | 83.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
635f84a6bb5c46b06f415002746ad44f55292b4190b45faa4107f412b8f76f08
|
|
BLAKE2b-256 checksum How to use checksums |
ba35ca22233b234d80eb39796ce1230a37a93b68a0fa11f43daa528eb95de286
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 16, 2026.
Transparency logRelease files / inka_evidence-0.0.3-cp310-abi3-win_amd64.whl
| Download URL | inka_evidence-0.0.3-cp310-abi3-win_amd64.whl |
|---|---|
| Size | 252.6 kB |
| Tags | CPython 3.10 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
18100fec6c31bcd39da4a1e0a2899316418c9ad9810f929b445f6aa8efab77b9
|
|
BLAKE2b-256 checksum How to use checksums |
9399c6aed23aeeb7526245be28ebd5137e49de9eca439d695cf9b6f005db3381
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 16, 2026.
Transparency logRelease files / inka_evidence-0.0.3-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
| Download URL | inka_evidence-0.0.3-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl |
|---|---|
| Size | 406.7 kB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
5a7b3a8c6bac192a5688df64e3318288e06ce705ca453cbc6e2ea61c92446689
|
|
BLAKE2b-256 checksum How to use checksums |
a7f3490d8bc5eac0424bc3180c9a09f84e43d380059b9d6a90351cb3857eb85a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 16, 2026.
Transparency logRelease files / inka_evidence-0.0.3-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
| Download URL | inka_evidence-0.0.3-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl |
|---|---|
| Size | 391.1 kB |
| Tags | CPython 3.10 Linux glibc 2.17+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
bec14b8d0a8e33b09cb5b39b8909cdfff440828144a288b69854940bdf8e177e
|
|
BLAKE2b-256 checksum How to use checksums |
35b2a6db1f5573910e6ac32106b6b17388108ade730be43771d1f514549ca255
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 16, 2026.
Transparency logRelease files / inka_evidence-0.0.3-cp310-abi3-macosx_11_0_arm64.whl
| Download URL | inka_evidence-0.0.3-cp310-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 358.5 kB |
| Tags | CPython 3.10 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
1289a7084ba22149f1e31d1e7c0de733ba83aa7bd8beedff385dc0e0560cd114
|
|
BLAKE2b-256 checksum How to use checksums |
b83521f8d9fcfafa8b0468707237bacb560a018270820149346887839905b97d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 16, 2026.
Transparency logRelease files / inka_evidence-0.0.3-cp310-abi3-macosx_10_12_x86_64.whl
| Download URL | inka_evidence-0.0.3-cp310-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 365.2 kB |
| Tags | CPython 3.10 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
e1758c425909c89c3c9ad4f87cded817f3dccd9f2034c6bfd2a405ea0c315559
|
|
BLAKE2b-256 checksum How to use checksums |
b06d0883a4dc383565ab5b202f8a0c614f00b4e2369f1bfd0251059001c27c65
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 16, 2026.
Transparency logSecurity for inka-evidence 0.0.3
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 6 files in this release have been uploaded with provenance metadata.
Attestation for inka_evidence-0.0.3.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 Nov 16, 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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.