Skip to content

ACCESS-NRI/yamanifest

Repository files navigation

yamanifest

General YAML manifest format

https://readthedocs.org/projects/yamanifest/badge/?version=latest

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.

Install

Conda install:

conda install -c access-nri yamanifest

Pip install (into a virtual environment):

pip install yamanifest

Use

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.yaml

Or 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")

Develop

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

About

YAML formatted manifest class with support for multiple checksums per file

Topics

Resources

License

Stars

5 stars

Watchers

3 watching

Forks

Packages

 
 
 

Contributors

Languages