Skip to main content

Pyntegrity is a Python package that helps you check a file integrity.

Project description

Pyntegrity

Pyntegrity is Python package that helps you check a file integrity.

master workflow

Supported Python versions

Tested on:

  • Python 3.7
  • Python 3.8
  • Python 3.9
  • Python 3.10

Documentation

Latest version is 1.2.0

Installation

To install Pyntegrity use pip:

pip install pyntegrity

Supported features

Checksum algorithms

The supported checksum algorithms are:

  • md5
  • sha256
  • sha512

Target files sizes

For now mostly small files since it loads the whole file in memory to calculate its checksum

How to use

In your program import the class IntegrityValidator:

from pyntegrity.core import IntegrityValidator

Initialize it with the target file and the expected checksum (it automatically detects which checksum algorithm to use), example:

obj = IntegrityValidator(
            str_path="my_file.txt",
            checksum_str="my_checksum",
        )

Then use the function validate_file_integrity to check the file integrity, it returns True if the target file checksum equal the one passed in the class constructor, if else it returns False, example:

status = obj.validate_file_integrity()

Side note

Right now it will open anyfile in text mode (even binary).

Future features

  • Support more file type modes
  • Support more checksum algorithms
  • Support for big files

License

GPL-3.0 see license content

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyntegrity-1.2.0.tar.gz (15.7 kB view details)

Uploaded Source

Built Distribution

pyntegrity-1.2.0-py3-none-any.whl (17.6 kB view details)

Uploaded Python 3

File details

Details for the file pyntegrity-1.2.0.tar.gz.

File metadata

  • Download URL: pyntegrity-1.2.0.tar.gz
  • Upload date:
  • Size: 15.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.10

File hashes

Hashes for pyntegrity-1.2.0.tar.gz
Algorithm Hash digest
SHA256 a9cff2ff25c5ac5ab8a6531e3c47d72c2c0c8378638b1fda494b9f77be25c948
MD5 db28f6b33afa784cad4833e6a746480e
BLAKE2b-256 c008404cde7982c2426fa44e8d624b913eb779dfa856fd9785f8162cd68f92f5

See more details on using hashes here.

File details

Details for the file pyntegrity-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: pyntegrity-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 17.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.10

File hashes

Hashes for pyntegrity-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b57e8f3cfb31360a966db20805b5c0e976dff7036a3611ef66676b5ad510027f
MD5 c35367b03741cfecfd1cb641cd272c38
BLAKE2b-256 a598c086933c2c97a857e0216721e371b489646f8645fad845b59cd60d30e8fc

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page