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). 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 packageevgraph-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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

evgraph_core-0.1.2.tar.gz (11.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

evgraph_core-0.1.2-py3-none-any.whl (9.8 kB view details)

Uploaded Python 3

File details

Details for the file evgraph_core-0.1.2.tar.gz.

File metadata

  • Download URL: evgraph_core-0.1.2.tar.gz
  • Upload date:
  • Size: 11.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for evgraph_core-0.1.2.tar.gz
Algorithm Hash digest
SHA256 149355d225e7db1606aa0e798e9e29b64be59b3af4b7ef73a6157092f2322d60
MD5 aea246dcaf95c3b55aede08d63b2b229
BLAKE2b-256 293609a0d1e3bca2828ddd9a22ea83cc1e5745c1faa9cceac4adb9595124e090

See more details on using hashes here.

Provenance

The following attestation bundles were made for evgraph_core-0.1.2.tar.gz:

Publisher: publish.yml on SVamseekar/evgraph

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file evgraph_core-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: evgraph_core-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 9.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for evgraph_core-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8197f6942e54fff7d1a62306770e4e32f01fc2441772a817e78c63c98ccf643e
MD5 8b90ba88021d4576cd09089c30a7d6be
BLAKE2b-256 dcd20c659e1ee6a492fe2188d6dd9ff830deea23c0b7de71abf8903cc1bb55f6

See more details on using hashes here.

Provenance

The following attestation bundles were made for evgraph_core-0.1.2-py3-none-any.whl:

Publisher: publish.yml on SVamseekar/evgraph

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 files

0.1.1

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page