{"slug": "build-a-local-file-manifest-for-creative-project-handoffs-in-python", "title": "Build a local file manifest for creative project handoffs in Python", "summary": "A developer published a Python script that builds a read-only SHA-256 manifest of a creative project folder, recording each regular file's relative path, byte length and hash as sorted JSON using only the standard library. The script skips symbolic links, reads files in chunks, and halts on unreadable files rather than silently omitting them; the author notes the output should be written outside the scanned folder to avoid capturing its own incomplete output.", "body_md": "A creative project can produce several small files that look almost identical: a source image, exports for different chat placements, a comparison grid, an outfit concept and a song draft. Before handing them off, it helps to know exactly which files you are sending and whether a file changed after review.\n\n**Disclosure:** I build Emote Resizer, Free Image Merger, TryOnSwap and Songifted, which are mentioned as examples below. This article was drafted with AI assistance and is my own educational resource, not an independent review.\n\nA manifest lists a file's relative path, byte length and SHA-256 digest. Comparing two manifests helps detect changes in file content; it does not prove the content is correct, licensed, safe, accessible or approved. A hash also does not hide a sensitive file name. Store and share the manifest only with people who may see the file names.\n\n```\ncreative-project/\n  sources/\n    original.png\n  exports/\n    emote-small.png\n    image-comparison.png\n    outfit-concept.png\n  music/\n    approved-lyrics.txt\n    preview-audio.mp3\n```\n\nUse only files that belong to the actual project; the names above are examples. Emote exports might come from [Emote Resizer](https://emoteresize.com/) and a comparison image from [Free Image Merger](https://freeimagemerger.com/). A fashion concept can come from [TryOnSwap](https://tryonswap.com/), and a lyrics-and-audio gift from [Songifted](https://songifted.com/). These tools have different functions, preview terms and prices; a manifest does not change those terms. Keep private or unapproved images out of the folder you plan to share.\n\nSave the following as `manifest.py`. It uses only the Python standard library and reads files without changing them. It skips symbolic links, reads in chunks, and prints sorted relative paths, byte sizes and hashes as JSON. Do not modify files while it runs; like any simple scan, it is not an atomic snapshot.\n\n``` bash\n#!/usr/bin/env python3\n\"\"\"Create a read-only SHA-256 inventory of regular files in a project folder.\"\"\"\nimport hashlib\nimport json\nimport pathlib\nimport sys\n\ndef inventory(root: pathlib.Path) -> list[dict[str, object]]:\n    records = []\n    for path in sorted(root.rglob('*')):\n        if path.is_symlink() or not path.is_file():\n            continue\n        digest = hashlib.sha256()\n        with path.open('rb') as stream:\n            for chunk in iter(lambda: stream.read(1024 * 1024), b''):\n                digest.update(chunk)\n        records.append({'path': path.relative_to(root).as_posix(),\n                        'bytes': path.stat().st_size, 'sha256': digest.hexdigest()})\n    return records\n\nif __name__ == '__main__':\n    if len(sys.argv) != 2 or not pathlib.Path(sys.argv[1]).is_dir():\n        raise SystemExit('Usage: python3 manifest.py PROJECT_FOLDER')\n    print(json.dumps(inventory(pathlib.Path(sys.argv[1]).resolve()), indent=2))\n```\n\nRun it from a terminal, replacing the paths with your own:\n\n```\npython3 manifest.py /path/to/creative-project > /path/outside-project/manifest.json\n```\n\nWrite the output **outside** the scanned folder. Shell redirection creates the output file before the script starts; placing it inside the folder can cause the script to include its own incomplete output. If a file cannot be read, the program stops with an error rather than silently omitting it. Correct the permission or remove the file from the handoff folder and run again.\n\n`path`, `bytes` and `sha256` values. Different hashes indicate different bytes; the same hash is a useful integrity check, not a substitute for reviewing content.", "url": "https://wpnews.pro/news/build-a-local-file-manifest-for-creative-project-handoffs-in-python", "canonical_source": "https://dev.to/winsonaibuilder/build-a-local-file-manifest-for-creative-project-handoffs-in-python-2o60", "published_at": "2026-10-28 12:09:37+00:00", "updated_at": "2026-10-28 12:11:23.867486+00:00", "lang": "en", "topics": ["developer-tools"], "entities": ["Emote Resizer", "Free Image Merger", "TryOnSwap", "Songifted"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/build-a-local-file-manifest-for-creative-project-handoffs-in-python", "markdown": "https://wpnews.pro/news/build-a-local-file-manifest-for-creative-project-handoffs-in-python.md", "text": "https://wpnews.pro/news/build-a-local-file-manifest-for-creative-project-handoffs-in-python.txt", "jsonld": "https://wpnews.pro/news/build-a-local-file-manifest-for-creative-project-handoffs-in-python.jsonld"}}