OCFL S3 Validator
A Python OCFL Object validator for content in S3.
This validator is a simple wrapper for one small part of the Python OCFL validation utility: ocfl-py. This validator only exposes OCFL Object validation for objects that are stored in an S3 object store. The validator has been tested with: AWS, Wasabi, and IBM's S3 storage appliance, "ECS". This validator takes S3 credentials, an optional "endpoint URL" for non-AWS S3 stores, an S3 bucket name, and the S3 path to the OCFL Object root of an OCFL Object. A validation result object is returned for each OCFL Object validation request.
Usage
- Create an ObjectValidator with:
- S3 bucket name
- S3 access key ID
- S3 secret access key
- S3 endpoint URL (optional: needed for non-AWS S3 providers)
- Invoke 'validate()' method with:
- S3 path to single OCFL object
- The 'validate()' method returns a result object with:
- object_id (str): The ID of the object.
- ocfl_object_path (str): The path to the OCFL object.
- validation_status (bool): The status of the validation.
- error_message (str): The error message, if any.
- validation_timestamp (datetime): The timestamp of the validation.
- The result object has a JSON representation by calling: 'result.as_json()'
Example usage
- See object_validator.py 'main'
from ocfl_s3_validator import ObjectValidator
def example():
# Define variables used below: 'bucket_name', 'access_key_id', etc
validator = ObjectValidator(bucket_name,
access_key_id,
secret_access_key,
endpoint_url)
result = validator.validate(object_id, object_path)
print(result.as_json())
Developer quick start
A quick set of commands to run after initial cloning this repository
uv venv --python 3.12.0
source .venv/bin/activate
uv sync
pytest
Metadata
Release files for ocfl-s3-validator 0.1.3
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 |
|---|---|---|---|---|
| ocfl_s3_validator-0.1.3.tar.gz | 23.4 kB | Without provenance | Details for ocfl_s3_validator-0.1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ocfl_s3_validator-0.1.3-py3-none-any.whl | Python 3 | none | any | Details for ocfl_s3_validator-0.1.3-py3-none-any.whl |
Total release size: 31.8 kB
Release files / ocfl_s3_validator-0.1.3.tar.gz
| Download URL | ocfl_s3_validator-0.1.3.tar.gz |
|---|---|
| Size | 23.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8ab6740d62d74855a6dd6c6961012add499dda91247849f6b822c98d519caf8b
|
|
BLAKE2b-256 checksum How to use checksums |
6020dae51392df05c997ab0837482dde56a11aa9dfc67123568b787321efc5c4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.6.11
|
Release files / ocfl_s3_validator-0.1.3-py3-none-any.whl
| Download URL | ocfl_s3_validator-0.1.3-py3-none-any.whl |
|---|---|
| Size | 8.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e1d666908fd459661de4f259a01d42b200907c2583a04b787d7e607379293eb9
|
|
BLAKE2b-256 checksum How to use checksums |
dec4ad87583cbadec83040de441b69b870538fb02e89fb1c51ff1a1257ca082c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.6.11
|
Security for ocfl-s3-validator 0.1.3
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.