General YAML manifest format
Python package to generate YaML formatted manifests. This means multiple checksums can be stored for each file, allowing cheap checksum operations to cascade to more expensive hashes if required.
Conda install:
conda install -c access-nri yamanifest
Pip install (into a virtual environment):
pip install yamanifest
See the full usage documentation for comprehensive examples and API reference.
Quick example:
yamf add -n manifest.yaml file1.txt file2.txt
yamf check -n manifest.yamlOr programmatically:
from yamanifest import Manifest
manifest = Manifest('manifest.yaml')
manifest.add(['file1.txt', 'file2.txt'])
manifest.dump()
# Later, verify files
manifest = Manifest('manifest.yaml').load()
if manifest.check():
print("Files are valid")Development install:
git checkout https://github.com/ACCESS-NRI/yamanifest cd yamanifest conda env create -f .conda/env_dev.yml source activate yamanifest-dev
Run tests:
python -m pytest -s