Skip to main content

evgraph-core

PyPI License Python

Foundational types for the Evgraph evidence-graph stack.

What is it

evgraph-core defines the small, stable vocabulary that every other Evgraph package is built on: what an Evidence Graph is, how certain a piece of evidence is allowed to claim to be, and the contracts an adapter or a rule must honor to participate in that graph. It has no opinion about how evidence gets collected or what should be checked — those are the concerns of evgraph-rules (built-in checks) and evgraph (adapters, reporters, the public scan() API). A missing approval timestamp stays inconclusive in a finding. The graph does not invent the field. evgraph-core only defines the shared data model those higher layers agree on, which is what lets adapters, rule packs, and reporters be written independently and still interoperate.

The types here implement the Evidence Graph Specification (EGS) and the Rule Evaluation Specification (RES) — normative documents in the main repository (docs/specs/) that this package is the reference implementation of. If a detail here and a spec ever disagree, the spec wins and this package has a bug.

Main features

  • EvidenceGraph / EvidenceNode / EvidenceEdge — an immutable, frozen-dataclass model of a directed graph of typed facts. Node and edge identity is enforced at construction: duplicate node ids and edges that reference a missing node both raise ValueError immediately, so a graph that exists is always internally consistent.
  • EvidenceLevel — an ordered IntEnum (STRUCTURAL < CONSISTENCY < HEURISTIC < INTERPRETIVE) expressing how certain a fact or a finding is. Reasoning can only ever get less certain as it propagates through a rule (least_certain() enforces this), never more — so a finding can never claim stronger evidence than the facts it cites.
  • Rule (Protocol) / Finding / Outcome — the contract a rule implementation satisfies (purity, no shared-state side effects, every citation must point at a real node in the input graph) and the immutable, explainable result a rule produces: an outcome (EXPECTATION_MET / EXPECTATION_NOT_MET / INCONCLUSIVE), a level, and the node ids that justify it. compute_finding_level() is the only sanctioned way to derive Finding.level — rule authors never assign it directly, which is what keeps findings honest about their own certainty.
  • Adapter (Protocol) / AdapterError / Assumption — the minimal surface an extractor declares (name, version, evidence level, extraction method, its assumptions) without standardizing how extraction itself is invoked, so adapters stay free to have artifact-appropriate signatures. AdapterError is reserved for failures of interpretation — malformed or unreadable input — never for governance deficiencies in otherwise-valid data.
  • Graph (de)serialization — round-trippable JSON encoding for EvidenceGraph, so a graph built once can be persisted, diffed, or handed to a different process without re-running adapters.

This package has no runtime dependency on any other Evgraph package — evgraph-rules, evgraph, and evgraph-cli all depend on it, never the other way around, which keeps the core vocabulary stable independent of how many rule packs or adapters get built on top of it.

Where to get it

The source is hosted on GitHub at: https://github.com/SVamseekar/evgraph

Binary installers for the latest released version are available at the Python Package Index (PyPI):

pip install evgraph-core

From source, for contributing:

git clone https://github.com/SVamseekar/evgraph.git
cd evgraph
pip install -e reference/python/evgraph-core

Dependencies

None at runtime. pytest>=7 is required for the test suite (pip install "evgraph-core[test]").

Documentation

For Start here
Evidence Graph Specification (EGS) docs/specs/
Rule Evaluation Specification (RES) docs/specs/
Design principles and decisions docs/ARCHITECTURE.md
The full library stack (adapters, rules, reporters, CLI) Main project README

Getting help

Ask questions and report bugs via GitHub Issues on the main repository — this package doesn't track issues separately from the monorepo.

Contributing

All contributions, bug reports, and feature requests are welcome on the main repository. See CONTRIBUTING.md and the Code of Conduct. Security reports: SECURITY.md.

License

BSD 3-Clause.

Metadata

Release files for evgraph-core 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for evgraph-core 0.1.3
File Size Uploaded
evgraph_core-0.1.3.tar.gz 11.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for evgraph-core 0.1.3
File Interpreter ABI Platform
evgraph_core-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 21.7 kB

Release files / evgraph_core-0.1.3.tar.gz

Download URL evgraph_core-0.1.3.tar.gz
Size 11.9 kB
Tags Source
SHA-256 checksum
How to use checksums
21acb24d1b625264df8afc2f13655607955e2744efe3e2253bb30bf0b68be779
BLAKE2b-256 checksum
How to use checksums
de9c429ac6257027eb86daa3e99db429dbf32ee3c667d22472399274703d5387
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 4, 2026.

Transparency log

Release files / evgraph_core-0.1.3-py3-none-any.whl

Download URL evgraph_core-0.1.3-py3-none-any.whl
Size 9.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d7a3b7f249af3c0bd2913efc9f433ea0950f157e4810bbea7790c969e17b0131
BLAKE2b-256 checksum
How to use checksums
f3024d2b816206a854a7def1c9c8da05486e1e663f2cbcc9bfd3194e557a5d32
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 4, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page