Skip to main content

evgraph

PyPI License Python

The main Python library for Evgraph — adapters, reporters, and the public scan() API.

What is it

evgraph is the package most users install directly: it is where the governance artifacts you already have (a Model Card, an approval record, a deployment record, a dataset manifest, an MLflow registry) get turned into an EvidenceGraph, evaluated against every rule installed on the system, and formatted for a human, a CI pipeline, or a standards tool to consume. It sits on top of evgraph-core (the graph and evidence-level vocabulary) and evgraph-rules (the built-in checks), and is what most of the rest of the Evgraph documentation means when it talks about "running a scan."

A scan is always three steps, regardless of which adapter or reporter is used: an adapter builds a graph, every discovered rule evaluates that graph and returns findings, and a reporter formats the graph plus findings for whoever is reading the output.

Main features

  • scan(model_card_path, approval_path, deployment_path) — runs the Model Card / JSON adapter across the three linked documents that make up a model's story (what it is, who approved it, where it was deployed), producing one Report.
  • scan_dataset_manifest(manifest_path) — runs the dataset-manifest / CSV adapter, converting one row per dataset into an EvidenceGraph.
  • AdaptersModel Card (JSON: model card + approval + deployment, linked into one graph), dataset manifest (CSV: one Dataset node per row), and MLflow model registry (maps RegisteredModel, ModelVersion, and Run from a real MLflow tracking server; deliberately narrow scope — experiments, metrics, params, artifacts, and stage/alias transitions are not yet mapped). Every adapter interprets reality; none of them invent a relationship the source artifact doesn't state.
  • discover_rules() — finds every Rule registered under the evgraph.rules entry-point group across all installed packages via importlib.metadata, not just the built-in evgraph-rules pack. This is what lets a third-party rule pack affect scan() output purely by being pip install-ed, with no code change to evgraph itself.
  • ReportersReport (the object every scan returns) can render itself as JSON, Markdown, SARIF (so findings show up as CI annotations in tools that already speak SARIF), and OSCAL Assessment Results (for interoperability with NIST's compliance-automation standard). One graph, one set of findings, four representations — pick the one your downstream tool understands.

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
pip install "evgraph[mlflow]"   # optional, for the MLflow adapter

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
pip install -e reference/python/evgraph
pip install -e "reference/python/evgraph[mlflow]"

Dependencies

  • evgraph-core — installed automatically as a dependency.
  • evgraph-rules — installed automatically as a dependency, so a fresh pip install evgraph gets useful findings immediately, not an empty rule set.
  • mlflow>=2.0 — optional, only needed for the MLflow adapter (pip install "evgraph[mlflow]").

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

Quickstart

from evgraph import scan, scan_dataset_manifest

report = scan(
    model_card_path="model_card.json",
    approval_path="approval.json",
    deployment_path="deployment.json",
)

print(report.to_json())
for finding in report.findings:
    print(finding.rule_id, finding.outcome, finding.level)

# Trace exactly which nodes and edges a finding rests on:
report.trace(report.findings[0].cited_node_ids[0])

# Same graph, different audiences:
report.to_markdown()                      # human-readable review
report.to_sarif()                         # CI annotations
report.to_oscal_assessment_results()      # compliance tooling
manifest_report = scan_dataset_manifest("dataset_manifest.csv")

Runnable, end-to-end versions of these examples live under examples/ in the main repository.

Documentation

For Start here
Design principles and decisions docs/ARCHITECTURE.md
Normative specs (adapters, reporting, plugins) docs/specs/
Built-in rule pack evgraph-rules package README
Command-line usage evgraph-cli package README
Runnable examples examples/
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.

Download files

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

Source Distribution

evgraph-0.1.1.tar.gz (22.1 kB view details)

Uploaded Source

Built Distribution

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

evgraph-0.1.1-py3-none-any.whl (20.1 kB view details)

Uploaded Python 3

File details

Details for the file evgraph-0.1.1.tar.gz.

File metadata

  • Download URL: evgraph-0.1.1.tar.gz
  • Upload date:
  • Size: 22.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.12

File hashes

Hashes for evgraph-0.1.1.tar.gz
Algorithm Hash digest
SHA256 a985d284d88fff5a900a77ee2afccc560e5a11e199c84e4e656901ee97581011
MD5 e197ae98e4ec5dbcf0800ca0698f4073
BLAKE2b-256 45edb2622b1d4883ac57132a9ef72ff10ca70e5c438ce60bb7c1bf1a4f6f303e

See more details on using hashes here.

File details

Details for the file evgraph-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: evgraph-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 20.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.12

File hashes

Hashes for evgraph-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0be920136ce28ae6117bfafa92827ada04037146cfe41b0cd657b5f8d125d7a1
MD5 e5ca687f80ee70b74d9886d69036ef54
BLAKE2b-256 f99a0d98f39090b0a5eb4cb1262d3a2144f55e0881030c6748e155066102bcf8

See more details on using hashes here.

Release history Release notifications | RSS feed

0.1.2

2 files

This release

0.1.1 This release

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