Bagit Profile (validator)
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 ocrd-fork-bagit-profile 1.3.0.post1
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 | Actions |
|---|---|---|---|---|
| ocrd-fork-bagit_profile-1.3.0.post1.tar.gz | 8.7 kB | Without provenance | Details for ocrd-fork-bagit_profile-1.3.0.post1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ocrd_fork_bagit_profile-1.3.0.post1-py3-none-any.whl | Python 3 | none | any | Details for ocrd_fork_bagit_profile-1.3.0.post1-py3-none-any.whl |
Total release size: 23.7 kB
Release files / ocrd-fork-bagit_profile-1.3.0.post1.tar.gz
| Download URL | ocrd-fork-bagit_profile-1.3.0.post1.tar.gz |
|---|---|
| Size | 8.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d44244bec22d9d2a2c08a47e0c0552d390eddc2bc9346c8522bb2a71fea54f3c
|
|
BLAKE2b-256 checksum How to use checksums |
ad99ee6d5ccdcb555a848ea30e6175b7d5bb54877ac417d85801c4442e73d5ac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.7.12
|
Release files / ocrd_fork_bagit_profile-1.3.0.post1-py3-none-any.whl
| Download URL | ocrd_fork_bagit_profile-1.3.0.post1-py3-none-any.whl |
|---|---|
| Size | 15.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
545d4acd20276de120c811e371ab96845b92f555e6ebc52b4089068b7fcbc6ec
|
|
BLAKE2b-256 checksum How to use checksums |
ea9ea51dd9975c6ebf9b4ed5239c39e4f9df7ed2ffde679f0bd9d46a979510a3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.7.12
|
Security for ocrd-fork-bagit-profile 1.3.0.post1
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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.