--- id: filehash version: "0.2.dev1" license: MIT license_treatment: permissive maintenance: dormant --- # filehash — Module and command-line tool that wraps around hashlib and zlib to facilitate generating checksums / hashes of files and directories. License: permissive · Maintenance: dormant · Downloads: 749.4K/mo ## What it is and what it does Filehash is a Python module that wraps hashlib and zlib to compute and verify file checksums and hashes. It provides a FileHash class with methods to hash individual files, multiple files, or entire directories, and to verify checksums against SFV files or checksum files in the format used by sha1sum and similar tools. It also includes a command-line tool, chkfilehash, for quick hash computation and verification from the shell. The package supports multiple hashing algorithms—MD5, SHA-1, SHA-224, SHA-256, SHA-384, SHA-512, BLAKE2b, BLAKE2s, CRC32, and Adler-32—and allows configuration of the hash algorithm and chunk size for memory-efficient processing of large files. It has no external runtime dependencies and works across Python 2.7 and Python 3.6 through 3.10. Use it for: - Verify file integrity after download or transfer by comparing computed hashes against expected checksums. - Batch-process directories to generate hash manifests for archival or backup verification. - Validate SFV files to check that a set of downloaded files match their original checksums. - Compute a combined hash for multiple files sorted by their individual hashes for deduplication or integrity checks. - Integrate file hashing into Python scripts without external dependencies for lightweight integrity validation. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Calculates and verifies file checksums and hashes using algorithms like MD5, SHA-1, SHA-2, BLAKE2, CRC32, and Adler-32, with support for single files, multiple files, and entire directories. Yes, if you need lightweight file hashing without external dependencies and don't require active maintenance. The core functionality is stable and well-tested across multiple Python versions. No, if you need ongoing support, bug fixes, or compatibility with Python versions beyond 3.10—the project is dormant and has not been updated since 2021. ## Install pip install filehash uv add filehash poetry add filehash ## Installing filehash Before you install: Low install friction with no runtime dependencies. Maintenance is dormant—last release was in 2021 and last commit in March 2024—so expect no active bug fixes or feature updates, though the package remains functional for its core use case. License in practice: MIT license is permissive, allowing free use, modification, and distribution with minimal restrictions. Quickstart: pip install filehash from filehash import FileHash md5hasher = FileHash('md5') md5hasher.hash_file("./testdata/lorem_ipsum.txt") Verify before relying: - Whether BLAKE2 support on Python 3.6+ is still functional in practice given the dormant maintenance status. - Current compatibility with Python versions beyond 3.10, which was the latest tested version listed in the description. ## Package facts - License: MIT (permissive) - Python support: unspecified - Install friction: low - Maintenance: dormant - Downloads: 749.4K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags file hash checksum calculator, verify file integrity, md5 sha256 file hashing, directory hash verification, sfv checksum verification, bulk file hashing, file integrity checking, file-integrity, checksum-verification, cli-tool [View on SkillFed](https://skillfed.io/packages/filehash) · [View on PyPI](https://pypi.org/project/filehash/)