Skip to main content

GraphCheck

Release Python License

Semantic observability for property graphs.

GraphCheck command-line demo

The problem

Property graphs can stay queryable while silently losing required properties, cardinalities, relationship direction, or the answers an application depends on. Those failures are difficult to review consistently because schema expectations, business questions, and drift thresholds usually live in separate tools and ad hoc queries. GraphCheck turns those expectations into version-controlled YAML and produces deterministic, evidence-backed JSON and offline HTML reports for local runs and CI.

Quickstart

For complete setup, credential, authoring, redaction, baseline, and configuration instructions, see the full user guide.

GraphCheck requires Python 3.12 or 3.13 and a supported Neo4j server. See the compatibility matrix for the tested Neo4j and Cypher versions.

Install the published CLI and scaffold a project:

pip install graphcheck

mkdir graph-health
cd graph-health
graphcheck init

Install either optional add-on separately if you need its commands:

pip install "graphcheck[generate]"
pip install "graphcheck[mcp]"

The generate add-on enables AI-assisted check authoring, while mcp enables the MCP server.

graphcheck init creates the following local project:

graphcheck.yml          Project paths and runtime settings
profiles.yml            Neo4j connection profiles; ignored by Git
checks/example.yml      Example check suite
.graphcheck/            Baselines, run history, JSON, and HTML reports

Edit profiles.yml with the URI, database, and credential for your Neo4j instance. Enterprise and Developer deployments must use a user assigned only Neo4j's built-in reader role plus the automatic PUBLIC role; GraphCheck rejects missing, additional, or custom roles. Community deployments cannot enforce read-only roles, so GraphCheck instead rejects every customer-authored query unless Neo4j plans it as read-only.

Verify the connection, replace the generated suite with the baseline-free example below, and run it:

graphcheck debug
graphcheck run

Each prepared run writes immutable history plus convenient latest copies:

.graphcheck/runs/<run-id>/results.json
.graphcheck/runs/<run-id>/report.html
.graphcheck/runs/latest/results.json
.graphcheck/runs/latest/report.html

The HTML report is self-contained and works offline. Exit codes are stable for CI: 0 means all executed checks passed, 1 means an error-severity finding or execution error, 2 means a warning or incomplete evaluation, and 3 means the run could not be prepared or completed.

For development, use the locked environment instead:

uv sync --group dev
uv run graphcheck --version

Example

Replace checks/example.yml with a suite that matches labels in your graph:

suite: customer-health
defaults:
  severity: error
  tags: [production]

conformance:
  - id: customer-name-present
    check: completeness
    with:
      label: Customer
      property: name
      threshold: 0.98

competency:
  - id: customers-can-be-counted
    question: Can customers be counted?
    query: MATCH (c:Customer) RETURN count(c) AS count
    expect:
      rows: { exactly: 1 }
      columns: [count]

Then select it directly or by tag:

graphcheck run --suite customer-health
graphcheck run --select tag:production

A suite can combine three kinds of checks:

  • Conformance applies reusable rules for completeness, uniqueness, types, formats, cardinality, relationship direction, temporal sanity, outliers, and sampled PII signals.
  • Competency runs authored read-only Cypher and asserts its rows, columns, uniqueness, emptiness, or returned values.
  • Drift compares node counts, relationship counts, or property coverage with a stored baseline.

Suite YAML is strict: duplicate keys, unknown fields, invalid payloads, and inconsistent expectations fail before execution. Runtime evaluation is rule-based; generated check suggestions remain inert until a person reviews and activates them.

For the full contracts, see the check YAML specification, results.json specification, and engine and CLI specification. The agent guide, telemetry disclosure, and contributor guide cover integration and operational workflows.

Non-goals

  • GraphCheck does not mutate, repair, or migrate the graph.
  • GraphCheck does not decide which business rules are sufficient for a domain or claim complete schema coverage.
  • GraphCheck does not use an LLM as the judge for check results; execution and evaluation are deterministic.
  • Sampled PII checks are heuristics, not a guarantee of complete PII discovery.
  • GraphCheck's read-query guard is defense in depth, not a replacement for Neo4j authorization where server-enforced read-only roles are available.

License

Apache-2.0. See LICENSE.

Download files

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

Source Distribution

graphcheck-0.2.0.tar.gz (802.7 kB view details)

Uploaded Source

Built Distribution

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

graphcheck-0.2.0-py3-none-any.whl (220.1 kB view details)

Uploaded Python 3

File details

Details for the file graphcheck-0.2.0.tar.gz.

File metadata

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

File hashes

Hashes for graphcheck-0.2.0.tar.gz
Algorithm Hash digest
SHA256 b5e86904581ffc2badacfb8539e1c2f7ca418af7f5c3912fed1811a32635e141
MD5 47fddc54bf6a4fca6a38ca325b21ee50
BLAKE2b-256 c99409f6be6a7ac78912718361617f4cf60115b2fcc9f6da0afd928fdd456a0e

See more details on using hashes here.

Provenance

The following attestation bundles were made for graphcheck-0.2.0.tar.gz:

Publisher: release.yml on graphora/graphcheck

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

File details

Details for the file graphcheck-0.2.0-py3-none-any.whl.

File metadata

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

File hashes

Hashes for graphcheck-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8720f0c3ccaa4bee29772911653f61cfac3dba1a1f9bfba431f9bb738315a219
MD5 8047aeca8500c6881be58effbdb630f3
BLAKE2b-256 c66a33ed06c74e03aec5815f78cbea4e87fb09bb3e9abf4624fefc0f700e37f4

See more details on using hashes here.

Provenance

The following attestation bundles were made for graphcheck-0.2.0-py3-none-any.whl:

Publisher: release.yml on graphora/graphcheck

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

Supported by

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