Skip to main content
Version: 0.0.5 (stable)

agrag.common.schema_fingerprint.schema_fingerprint

schema_fingerprint(schema:GraphSchema) -> str

Return the hash of the structure of a schema.

The hash covers entity types, parents, properties (type, required, enum), relations, patterns, cardinality and symmetry. It ignores every description, the schema name and the schema version, and the order of entities, relations, patterns, parents and enum values.

Parameters:

Returns:

  • str – The first 16 hex characters of the SHA-256 of the canonical structure.