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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: data_hasher_package-0.1.1.tar.gz
  • Upload date:
  • Size: 2.6 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.1.tar.gz
Algorithm Hash digest
SHA256 3c4455ff8cb2eba9021d0f49b3aaa3287e46ab1dd6f4d110927a648926583f47
MD5 41add111e11e1d2a6cd5020f0d87e3d4
BLAKE2b-256 0437d7d1a0b1231201a8c17d246ceac99ba851696d4fbb1f7168f04ee7dbc76e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for data_hasher_package-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2992ecf549f8c0861e510deb0f1f10c992dca0e2df041e8f68587197935b156a
MD5 59c388c11f0454162408305485dc50b3
BLAKE2b-256 6c39059f79977e8727c8b181f6424c7e90852344e3207de900eeeb60a4864507

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