skip to navigation
skip to content

bagit_profile 1.0.2

This module can be used to validate BagitProfiles.

Latest Version: 1.1.1


A simple Python module for validating BagIt profiles. See the BagIt Profiles Specification for more information.

This module is intended for use with bagit but does not extend it.

Installation is a single-file python module that you can drop into your project as needed or you can install globally with:

  1. git clone
  2. cd bagit-profiles/python
  3. sudo python install


pip install bagit_profile


import bagit
import bagit_profile

Instantiate an existing Bag using bagit. python bag = bagit.Bag('mydir')

Instantiate a profile, supplying its URI. python my_profile = bagit_profile.Profile('')

Validate ‘Serialization’ and ‘Accept-Serialization’. This must be done before .validate(bag) is called. ‘mydir’ is the path to the Bag.

if my_profile.validate_serialization('mydir'):
    print "Serialization validates"
    print "Serialization does not validate"

Validate the rest of the profile.

if my_profile.validate(bag):
    print "Validates"
    print "Does not validate"

Or from the commandline: 'http://uri.for.profile/profile.json' path/to/bag

Test suite

python test


  1. Fork the repository
  2. Do something awesome!
  3. Submit a pull request explianing what your code does



File Type Py Version Uploaded on Size
bagit_profile-1.0.2.linux-x86_64.tar.gz (md5)
built for Linux-3.11.0-13-generic-x86_64-with-glibc2.4
"dumb" binary any 2013-12-05 7KB
bagit_profile-1.0.2.tar.gz (md5) Source 2013-12-05 5KB