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.3.0.tar.gz (16.4 kB view details)

Uploaded Source

Built Distribution

pyntegrity-1.3.0-py3-none-any.whl (18.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyntegrity-1.3.0.tar.gz
  • Upload date:
  • Size: 16.4 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.3.0.tar.gz
Algorithm Hash digest
SHA256 ff76236d7fb6fc75991a30e25bd22db3808dacd0ed59cc3996ca01c1e8559ac5
MD5 97225981b3d58cff5865b00e78490525
BLAKE2b-256 32eb8cb5b0ff5a637116e8cf0d5a50fed87e31f7cac0dcbe6e4a893d28b8f8ca

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyntegrity-1.3.0-py3-none-any.whl
  • Upload date:
  • Size: 18.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.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 74a6ea12ed9c171a87972471bc6d99151c82186a14d341d4e3e612acf16dd111
MD5 206fe50a47712fa291ef44f0c2d92bb5
BLAKE2b-256 080b3b707730bce0b5db47f539a62c6a6393b1e8fd8cabc838deebe388aa395b

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