Day 024 / Frappe / Schema Comparison

DocType Field Diff

View source ↗Scroll to explore ↓
DocType Field Diff project cover
/ Overview

A dependency-free Python CLI that compares two exported Frappe DocType definitions without connecting to a site or exposing record data.

NameDocType Field Diff

ClientIndependent daily build

IndustriesDeveloper and operations tooling

DateDay 024 · September 23, 2026

/ Challenge

Frappe DocType exports can change between environments or revisions, but reviewing complete JSON files makes it easy to miss field additions, removals, ordering changes and important schema flags.

/ Provided services

Clear thinking.
Practical delivery.

01

Schema comparison

Maps fields by fieldname and separates additions, removals, property changes and order movement into reviewable groups.

02

Privacy-conscious reports

Ignores labels, descriptions, defaults and arbitrary metadata so diagnostic output stays focused on structural facts.

03

Automation-ready behavior

Provides text or JSON output and distinct exit codes for no change, differences found and invalid input.

DocType Field Diff feature visual
/ Solution

DocType Field Diff validates two supplied JSON definitions, indexes fields by fieldname and produces deterministic text or JSON reports for added, removed, changed and reordered fields. It compares only an explicit set of structural properties.

/ Impact

Added and removed field detection

Safe structural property comparison

Field-order change reporting

Labels, descriptions and defaults omitted

No site connection or schema mutation

Ten passing standard-library tests

/ Tech stack

Python standard library

Argparse, pathlib and JSON provide the complete dependency-free command-line workflow.

Frappe DocType metadata

Models fieldname identity, field order and allowlisted structural flags found in exported DocType definitions.

Unittest

Ten tests cover differences, ordering, privacy boundaries, validation, formatting and command-line behavior.

Next project

Album Finder

View case study ↗