Skip to main content

A package to hash data files and verify their hash using MD5.

Project description

Data Hasher Package

This package provides a DataHasher class to generate and verify MD5 hashes of files.

Installation

To install the package, use:

pip install .

Usage

from data_hasher import DataHasher

# Example usage
hasher = DataHasher()

# Hash a file
file_hash = hasher.create_hash("/path/to/file.txt")
print(f"MD5 Hash: {file_hash}")

# Verify file hash
is_valid = hasher.verify_file_hash("/path/to/data_5d41402abc4b2a76b9719d911017c592.txt")
print(f"Is file valid: {is_valid}")

# Hash a DataFrame
import pandas as pd
df = pd.DataFrame({"col1": [1, 2], "col2": ["a", "b"]})
df_hash = hasher.create_hash_from_dataframe(df)
print(f"DataFrame MD5 Hash: {df_hash}")

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

data_hasher_package-0.1.0.tar.gz (2.7 kB view details)

Uploaded Source

Built Distribution

data_hasher_package-0.1.0-py3-none-any.whl (2.9 kB view details)

Uploaded Python 3

File details

Details for the file data_hasher_package-0.1.0.tar.gz.

File metadata

  • Download URL: data_hasher_package-0.1.0.tar.gz
  • Upload date:
  • Size: 2.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.10

File hashes

Hashes for data_hasher_package-0.1.0.tar.gz
Algorithm Hash digest
SHA256 5ca08e6915098978e8fb6dc5c262f55aa6b6fa1a8676da40f1b4f35c5020d9aa
MD5 3bb00c2dcfe6524eafbec1d9c441c6ba
BLAKE2b-256 483707f16805b00b08bc00c85b3957b7b4a26f0f5594fdf2f87ce18d251370c2

See more details on using hashes here.

File details

Details for the file data_hasher_package-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for data_hasher_package-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c4763ca2b6b9019f43977d6c7e40cbcdacb1bc40984f8eddf5629abda8b65dc7
MD5 35f1404f8dff87acaee3d83116a7ad46
BLAKE2b-256 bf83c722358da676152eb73e79b4820694fdd204f05723385d4a3e74745fd333

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