Example Scripts and BagIt Profile for The Transfer of Digital Records

These example Python scripts create and validate bags with user-supplied payloads. These scripts make use of existing Python libraries for working with BagIt-compliant bags. Both require bagit-python, and validate_bag.py requires bagit-profiles-validator. validate-bag.py validates against organizational-bag-profile.json, an example Rockefeller Archive Center BagIt Profile.

Create a valid bag

create_bag.py creates a valid bag using metadata values hardcoded into the script. The directory to bag (which may contain subdirectories) can either be passed as the first argument or entered when at the script prompt.

Validate bag

validate_bag.py prompts users to specify an existing bag to validate. This validates against the Rockefeller Archive Center BagIt Profile and the BagIt Specification.

Rockefeller Archive Center BagIt Profile

organizational-bag-profile.json is a sample Rockefeller Archive Center BagIt Profile which encodes transfer requirements in a machine-readable format to ensure and facilitate compliance. Each organization has a BagIt Profile which is customized to meet their needs.