data // PythonPROJECT
Python — Shallow Snapshot Schema Diff
Compare normalized object dictionaries to identify keys that were added, removed or changed between exports.
pythonsnapshotdiffmetadatasfmc-auditor
Trust & provenancePROJECT
Evidence tierPROJECTOfficial sources0Other sources0Last verified2026-10-05
Evidence tier describes my hands-on relationship with the content. Official sources describe platform contracts/documentation. Production observations should not automatically be treated as official limits.
Validating metadata drift between two normalized inventories.
def diff_record(before: dict, after: dict) -> dict:
keys = set(before) | set(after)
return {
key: {"before": before.get(key), "after": after.get(key)}
for key in sorted(keys)
if before.get(key) != after.get(key)
}Stable normalized keys turn noisy raw API payloads into comparable records.
For nested metadata, canonicalize ordering and remove volatile fields before hashing/comparison.
Keep raw payloads for traceability when a normalized field changes unexpectedly.