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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: data_hasher_package-0.1.2.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.2.tar.gz
Algorithm Hash digest
SHA256 646d6ad26ebafd93ca644ee577c2ac4ee8e6157d68ce399277d52879edc01b4a
MD5 1ef9bb5ae2fd63b6150b88a4011e35ef
BLAKE2b-256 db692ddda17876012579ec5b844a081c836f176921654b522cd3080662878707

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for data_hasher_package-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e25843f95a9228385bfea79349105a075ac98c206453ba0d34f89f0237f820c9
MD5 493feb77240967757e52049a73c8793c
BLAKE2b-256 337ac5f8c7a27fe20643033d8db2bde8cbf8172eb005316de22eb884e8c83bdb

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