oais-utilities
Utilities to work with the CERN OAIS artifacts, such as Submission Information Packages.
Features
Validate CERN SIP
Validates the folder in the given path according to the CERN SIP specification, following these steps:
- Verify directory structure
- Validate the manifest file against the desired sip JSON schema. By default uses sip-schema-v1.json, also shipped in this package
- Validate the folder as a BagIt package
- file are allowed to be missing if the manifest specifies it's a "lightweight" SIP.
- Checks if every content file mentioned in the manifest is actually present in the payload
Usage:
from oais_utils import validate
validate("name_of_the_sip_folder")
sip.json schemas
SIP manifest JSON schemas are also shipped and exposed with this package.
To get a python dictionary with the schema short name as keys and the parsed (as python object) schema as value for the corresponding schema name, run:
import oais_utils
schemas = oais_utils.schemas
schemas.keys()
# ['v1']
schemas['v1']
# [...]
# (Returns the sip JSON schema "v1" as parsed python object)
schemas['v1']['$id']
# https://gitlab.cern.ch/digitalmemory/sip-spec/-/raw/main/versions/sip-schema-v1.json
Install
Install from PyPi
pip install oais-utils
For development, you can clone this repository and then install it with the -e flag:
# Clone the repository
git clone https://gitlab.cern.ch/digitalmemory/oais-utils
cd oais-utils
pip install -e .
Use
from oais_utils import validate
validate("../bagit-create/bagitexport::cds::2751237")
Metadata
Release files for oais-utils 0.4.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 | Actions |
|---|---|---|---|---|
| oais_utils-0.4.1.tar.gz | 20.5 kB | Without provenance | Details for oais_utils-0.4.1.tar.gz |
Release files / oais_utils-0.4.1.tar.gz
| Download URL | oais_utils-0.4.1.tar.gz |
|---|---|
| Size | 20.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c1179c92256fc2d845ca642760d1ebb0f9799b56000d05ef08fd67de902157f4
|
|
BLAKE2b-256 checksum How to use checksums |
2f5e07830fc017d089b05c1b68b02dfde8a867874bee041fad7d655d8ee97d99
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.15
|
Security for oais-utils 0.4.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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.