Skip to main content

evgraph-rules

PyPI License Python

The built-in rule pack for Evgraph.

What is it

evgraph-rules is the reference implementation of Evgraph's rule-pack mechanism, and the set of governance checks that ship out of the box. Rules are deliberately shipped as their own package, separate from evgraph-core: policy — what counts as good evidence — should be free to evolve, gain new checks, or be replaced by an organization's own rule pack, without ever touching the stable graph and evidence-level vocabulary that evgraph-core defines. A rule pack participates in Evgraph purely by being pip install-ed; evgraph.discover_rules() finds every rule registered under the evgraph.rules entry-point group at runtime; evgraph-rules is simply the first (and currently only first-party) example of that mechanism, not a privileged one.

Each rule here is a small, pure function over an EvidenceGraph: it takes a graph, cites the specific nodes and edges its conclusion rests on, and returns Findings whose certainty (EvidenceLevel) is never higher than the evidence it cites — enforced by evgraph_core.compute_finding_level(), not by convention.

Main features

  • approval-precedes-deployment — checks that a deployment's REQUIRES_APPROVAL edge points to a HumanApproval whose approved_at precedes the deployment's deployed_at. Reasoning class CONSISTENCY: it cross-references two structural timestamps rather than reading either in isolation. A missing approved_at stays inconclusive. The rule does not invent the timestamp.
  • dataset-manifest-complete — checks that every Dataset node in the graph declares a non-empty license attribute. Reasoning class STRUCTURAL: a direct presence check on a single node, with no cross-referencing between nodes.
  • model-version-has-training-provenance — checks that every node whose type ends in ModelVersion has a TRAINED_BY edge to the run that produced it. Deliberately written against the graph shape (…ModelVersion node, TRAINED_BY edge) rather than against MLflow by name, entirely independent of any one adapter's implementation — so it applies unmodified to any future adapter (a different model registry, for example) that produces the same shape.
  • Entry-point registration — all three rules register under evgraph.rules in this package's pyproject.toml. Installing a third-party rule pack the same way makes scan() pick it up automatically; no changes to evgraph-core or evgraph are required.

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-rules

From source, for contributing:

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

Dependencies

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

Documentation

For Start here
Rule Evaluation Specification (RES) docs/specs/
How rules plug into scan() evgraph package README
Writing a third-party rule pack docs/specs/ (Plugin Extension Specification)
The full library stack Main project README

Getting help

Ask questions and report bugs via GitHub Issues on the main repository.

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-rules 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-rules 0.1.3
File Size Uploaded
evgraph_rules-0.1.3.tar.gz 9.8 kB Details

Built distribution (wheel)

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

Total release size: 18.1 kB

Release files / evgraph_rules-0.1.3.tar.gz

Download URL evgraph_rules-0.1.3.tar.gz
Size 9.8 kB
Tags Source
SHA-256 checksum
How to use checksums
5bdc2a5e143b0c90951f280c3e4aba861629a2338264b6268ded911cc95e88b3
BLAKE2b-256 checksum
How to use checksums
d5a65ff224f2bbd51aee839634fd5ec0ed66666c4cdbf91f981a687fb7d15b63
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_rules-0.1.3-py3-none-any.whl

Download URL evgraph_rules-0.1.3-py3-none-any.whl
Size 8.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8c19f4ecf8a072cdf3489e4e2681e6f8af70c72d1b2546512d94c46fca46da9f
BLAKE2b-256 checksum
How to use checksums
a8113f7b48a414f8daf2b5d6702167f66d9b9ed392155a2cb50e0377cbd56509
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