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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3c4455ff8cb2eba9021d0f49b3aaa3287e46ab1dd6f4d110927a648926583f47 |
|
MD5 | 41add111e11e1d2a6cd5020f0d87e3d4 |
|
BLAKE2b-256 | 0437d7d1a0b1231201a8c17d246ceac99ba851696d4fbb1f7168f04ee7dbc76e |
File details
Details for the file data_hasher_package-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: data_hasher_package-0.1.1-py3-none-any.whl
- Upload date:
- Size: 2.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2992ecf549f8c0861e510deb0f1f10c992dca0e2df041e8f68587197935b156a |
|
MD5 | 59c388c11f0454162408305485dc50b3 |
|
BLAKE2b-256 | 6c39059f79977e8727c8b181f6424c7e90852344e3207de900eeeb60a4864507 |