--- id: bagit version: "1.9.0" license: unclear license_treatment: permissive maintenance: aging --- # bagit — Create and validate BagIt packages License: permissive · Maintenance: aging · Downloads: 84.6K/mo ## What it is and what it does bagit is a Python library and command-line tool for creating and validating BagIt packages, a standardized format used in digital preservation and archival work. A BagIt bag is a directory structure that bundles data files with checksums and metadata, ensuring file integrity across storage and transfer. The package lets you create bags from existing directories, add or update metadata, regenerate manifests when payload changes, and validate bags against their stored checksums to detect corruption or tampering. You can use it as a command-line utility (bagit.py) to quickly bag directories with metadata like contact names and checksums, or import it into Python code to programmatically create Bag instances, modify metadata, and run validation checks. It supports multiple checksum algorithms (MD5, SHA1, SHA256, SHA512) and can parallelize both bag creation and validation across multiple CPU cores. No external runtime dependencies are required. Use it for: - Archive digital collections with cryptographic integrity verification before long-term storage - Validate received bags to detect file corruption or tampering during transfer or archival - Batch-create bags from directories with standardized metadata and checksums for institutional workflows - Regenerate manifests after modifying bag contents to keep checksums in sync with payload changes - Integrate bag creation into Python preservation pipelines without external command-line tools ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Create, validate, and manage BagIt-style packages—a standardized format for digital preservation and file transfer that bundles data with checksums and metadata. Yes, if you work with digital preservation, archival systems, or need standardized file packages with integrity verification. The permissive license and zero runtime dependencies make it low-risk to adopt. However, the aging maintenance status (427 days since last release) and high install friction (source tarball only) mean you should verify compatibility before deploying to modern environments. For casual use or one-off bag validation, it's straightforward; for production archival systems, confirm it meets your Python version and support expectations. ## Install pip install bagit uv add bagit poetry add bagit ## Installing bagit Before you install: High install friction: the package is distributed as a source tarball with no pre-built wheels. Maintenance status is aging—last release was 427 days ago—so expect slower response to issues or compatibility problems with newer Python versions. License in practice: Licensed as permissive public domain, imposing no restrictions on use, modification, or distribution in your own projects. Quickstart: pip install bagit import bagit # Create a bag bag = bagit.make_bag('mydir', {'Contact-Name': 'John Kunze'}) # Validate it if bag.is_valid(): print('Bag is valid') Requires Python 3; exact minimum version unspecified in metadata. Verify before relying: - Whether the package works with current Python versions (requires_python is unspecified in metadata) - Current state of the GitHub repository (archived status and commit history not available in fact sheet) - Whether parallel checksum calculation (--processes flag) is thread-safe or process-safe ## Package facts - License: not declared (permissive) - Python support: unspecified - Install friction: high - Maintenance: aging - Downloads: 84.6K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags bagit package creation, digital preservation format, checksum validation, bag manifest generation, file integrity verification, bagit command line tool, metadata persistence, digital-preservation, file-integrity, archival [View on SkillFed](https://skillfed.io/packages/bagit) · [View on PyPI](https://pypi.org/project/bagit/)