Skip to main content

This module can be used to validate BagitProfiles.

Project description


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

This module is intended for use with bagit-python 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-validator
  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




Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for bagit-profile, version 1.3.1
Filename, size File type Python version Upload date Hashes
Filename, size bagit_profile-1.3.1-py3.7.egg (21.3 kB) File type Egg Python version 3.7 Upload date Hashes View
Filename, size bagit_profile-1.3.1-py3-none-any.whl (14.8 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size bagit_profile-1.3.1.tar.gz (8.5 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page