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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
646d6ad26ebafd93ca644ee577c2ac4ee8e6157d68ce399277d52879edc01b4a
|
|
| MD5 |
1ef9bb5ae2fd63b6150b88a4011e35ef
|
|
| BLAKE2b-256 |
db692ddda17876012579ec5b844a081c836f176921654b522cd3080662878707
|
File details
Details for the file data_hasher_package-0.1.2-py3-none-any.whl.
File metadata
- Download URL: data_hasher_package-0.1.2-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 |
e25843f95a9228385bfea79349105a075ac98c206453ba0d34f89f0237f820c9
|
|
| MD5 |
493feb77240967757e52049a73c8793c
|
|
| BLAKE2b-256 |
337ac5f8c7a27fe20643033d8db2bde8cbf8172eb005316de22eb884e8c83bdb
|