evgraph-core
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 raiseValueErrorimmediately, so a graph that exists is always internally consistent.EvidenceLevel— an orderedIntEnum(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 deriveFinding.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.AdapterErroris 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
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
149355d225e7db1606aa0e798e9e29b64be59b3af4b7ef73a6157092f2322d60
|
|
| MD5 |
aea246dcaf95c3b55aede08d63b2b229
|
|
| BLAKE2b-256 |
293609a0d1e3bca2828ddd9a22ea83cc1e5745c1faa9cceac4adb9595124e090
|
Provenance
The following attestation bundles were made for evgraph_core-0.1.2.tar.gz:
Publisher:
publish.yml on SVamseekar/evgraph
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
evgraph_core-0.1.2.tar.gz -
Subject digest:
149355d225e7db1606aa0e798e9e29b64be59b3af4b7ef73a6157092f2322d60 - Sigstore transparency entry: 2583302920
- Sigstore integration time:
-
Permalink:
SVamseekar/evgraph@398b9a45a0758353b4585d18df98966be2b4c6f9 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/SVamseekar
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@398b9a45a0758353b4585d18df98966be2b4c6f9 -
Trigger Event:
push
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8197f6942e54fff7d1a62306770e4e32f01fc2441772a817e78c63c98ccf643e
|
|
| MD5 |
8b90ba88021d4576cd09089c30a7d6be
|
|
| BLAKE2b-256 |
dcd20c659e1ee6a492fe2188d6dd9ff830deea23c0b7de71abf8903cc1bb55f6
|
Provenance
The following attestation bundles were made for evgraph_core-0.1.2-py3-none-any.whl:
Publisher:
publish.yml on SVamseekar/evgraph
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
evgraph_core-0.1.2-py3-none-any.whl -
Subject digest:
8197f6942e54fff7d1a62306770e4e32f01fc2441772a817e78c63c98ccf643e - Sigstore transparency entry: 2583302926
- Sigstore integration time:
-
Permalink:
SVamseekar/evgraph@398b9a45a0758353b4585d18df98966be2b4c6f9 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/SVamseekar
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@398b9a45a0758353b4585d18df98966be2b4c6f9 -
Trigger Event:
push
-
Statement type: