checksumdir

1.2.0last stable release 5 years ago
Complexity Score
Low
Open Issues
N/A
Dependent Projects
33
Weekly Downloadsglobal
259,550

License

  • MIT
    • Yesattribution
    • Permissivelinking
    • Permissivedistribution
    • Permissivemodification
    • Nopatent grant
    • Yesprivate use
    • Permissivesublicensing
    • Notrademark grant

Downloads

Readme

Checksumdir

|badge1| |badge2|

.. |badge1| image:: https://img.shields.io/pypi/dm/checksumdir
:alt: PyPI - Downloads :target: https://pypistats.org/packages/checksumdir

.. |badge2| image:: https://badge.fury.io/py/checksumdir.svg :target: https://pypi.org/project/checksumdir/

A simple module for creating a single hash for a directory of files, with file contents; ignoring any metadata such as file name. Options exist to also exclude specific files or files with specific extensions.

===== Usage

.. code-block:: python

from checksumdir import dirhash

directory  = '/path/to/directory/'
md5hash    = dirhash(directory, 'md5')
sha1hash   = dirhash(directory, 'sha1', excluded_files=['package.json'])
sha256hash = dirhash(directory, 'sha256', excluded_extensions=['pyc'])

Or to use the CLI:

.. code-block:: bash

# Defaults to md5.
$ checksumdir /path/to/directory

# Create sha1 hash:
$ checksumdir -a sha1 /path/to/directory

# Exclude files:
$ checksumdir -e <files> /path/to/directory

# Exclude files with specific extensions:
$ checksumdir -x <extensions> /path/to/directory

# Follow soft links:
$ checksumdir --follow-links /path/to/directory

Dependencies

No runtime dependency information found for this package.

CVE IssuesActive
0
Scorecards Score
3.40
Test Coverage
No Data
Follows Semver
Yes
Github Stars
91
Dependenciestotal
0
DependenciesOutdated
0
DependenciesDeprecated
0
Threat Modelling
No
Repo Audits
No

Learn how to distribute checksumdir in your own private PyPI registry

pip install checksumdir
Processing...
Done

13 Releases

PyPI on Cloudsmith

Getting started with PyPI on Cloudsmith is fast and easy.