Open Source / Python Automation / Daily Build

File Hash Ledger

View source ↗Scroll to explore ↓
File Hash Ledger project cover
/ Overview

A dependency-free Python CLI that records sequential SHA-256 file snapshots in a tamper-evident JSONL chain.

NameFile Hash Ledger

ClientPersonal open-source project

IndustriesDeveloper and operations tooling

Date2026

/ Challenge

A single checksum verifies one file version, but it does not preserve a chronological record of later snapshots or reveal whether that history was edited.

/ Provided services

Clear thinking.
Practical delivery.

01

Integrity model

Defined compact append-only records containing timestamp, path, size and SHA-256 without storing tracked file contents.

02

Defensive ledger handling

Canonicalized entry data for stable hashes, verified every link, and blocked new records when prior history failed validation.

03

Current-state checks

Compared each latest recorded file hash with the current file and reported unchanged, changed or missing status.

File Hash Ledger feature visual
/ Solution

I built a standard-library Python CLI that appends file metadata and streaming SHA-256 hashes to JSONL, linking every entry to the previous entry hash and refusing to append to a damaged chain.

/ Impact

Sequential file-hash history

Tamper-evident hash chaining

Changed and missing-file checks

Nine passing standard-library tests

/ Tech stack

Python

hashlib, pathlib and chunked reads create portable SHA-256 snapshots without third-party dependencies.

JSON Lines

One canonical JSON object per line keeps records appendable, inspectable and suitable for local tooling.

Unittest

Nine tests cover known hashes, chain links, tampering, safe append refusal, file status, invalid JSON and symlink rejection.

Next project

Shipment SaaS System

View case study ↗