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
bagit_profile.py is a single-file python module that you can drop into your project as needed or you can install globally with:
git clone https://github.com/bagit-profiles/bagit-profiles-validator.git
cd bagit-profiles-validator
sudo python setup.py install
or:
pip install bagit_profile
Usage
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('http://example.com/bagitprofile.json')
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"
else:
print "Serialization does not validate"
Validate the rest of the profile.
if my_profile.validate(bag):
print "Validates"
else:
print "Does not validate"
Or from the commandline:
bagit_profile.py 'http://uri.for.profile/profile.json' path/to/bag
Test suite
python setup.py test
Development
Do something awesome!
Submit a pull request explianing what your code does
License
CC0
Metadata
Release files for bagit-profile 1.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| bagit_profile-1.3.1.tar.gz | 8.5 kB | Without provenance | Details |
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| bagit_profile-1.3.1-py3.7.egg | Legacy Egg format | - | - | Details |
| bagit_profile-1.3.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 44.6 kB
Release files / bagit_profile-1.3.1.tar.gz
| Download URL | bagit_profile-1.3.1.tar.gz |
|---|---|
| Size | 8.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
57798cdcf98b32a413edb29382d85f4f8c44d3204940d7e12d84998521a98c3f
|
|
BLAKE2b-256 checksum How to use checksums |
fc301768557c9f93e20ca2873df0f826c699cb31818099c6856d9b01d50e039b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.3.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.0 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3
|
Release files / bagit_profile-1.3.1-py3.7.egg
| Download URL | bagit_profile-1.3.1-py3.7.egg |
|---|---|
| Size | 21.3 kB |
| Tags | Egg |
|
SHA-256 checksum How to use checksums |
19df2f726dbd27e50d785195d5891336aa3a2931b8cfc0c508bb3325a09e7a70
|
|
BLAKE2b-256 checksum How to use checksums |
fe6409516cf70650cdaa19f9fec82aea1035c36fec67a6bd3aa76a41af9cb717
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.3.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.0 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3
|
Release files / bagit_profile-1.3.1-py3-none-any.whl
| Download URL | bagit_profile-1.3.1-py3-none-any.whl |
|---|---|
| Size | 14.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7565a95902cbdc9a646eece0939cfec025d77b00764d10538fd3d5962fa1c2b7
|
|
BLAKE2b-256 checksum How to use checksums |
a68ea780f9d13ecfcd69e22cd6ba4497248abf82463386f616330f03da2b8a37
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.3.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.0 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3
|
Security for bagit-profile 1.3.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.