Skip to main content

PyHashKit

A lightweight Python library and CLI for hashing text and files using multiple cryptographic algorithms.

PyPI version Python versions License


Features

  • 🔐 Hash text strings
  • 📄 Hash files of any size
  • 💻 Built-in CLI support
  • ⚡ Supports multiple algorithms
  • 📦 Zero dependencies
  • 🐍 Python 3.8+
  • 🚀 Lightweight and fast

Why PyHashKit?

PyHashKit provides a simple and beginner-friendly interface for Python's built-in hashing functionality.

Instead of manually working with hashlib, you can hash text and files with a single function call or directly from the command line.


Supported Algorithms

PyHashKit supports most algorithms available through Python's built-in hashlib.

Common examples:

  • SHA-256
  • SHA-512
  • SHA-224
  • SHA-384
  • MD5
  • SHA-1
  • SHA3-224
  • SHA3-256
  • SHA3-384
  • SHA3-512
  • BLAKE2b
  • BLAKE2s

Not Supported

The following algorithms are currently not supported:

  • SHAKE-128 (shake_128)
  • SHAKE-256 (shake_256)

These algorithms require a custom digest length and are intentionally excluded to keep the API simple and consistent.


Installation

pip install PyHashKit

Quick Start

from pyhashkit import hash_text, hash_file

print(hash_text("Hello World"))
print(hash_file("example.txt"))

Command Line Interface (CLI)

PyHashKit includes a built-in command-line interface for hashing text and files directly from your terminal.

Available Commands

text         Hash a text string
file         Hash a file
commands     Show all commands

Flags

-v, -V, --version
             Show version information

Options

-a, --algorithm
             Specify hashing algorithm
             (default: sha256)

Examples

Hash text:

pyhashkit text "Hello World"

Hash text using MD5:

pyhashkit text "Hello World" -a md5

Hash a file:

pyhashkit file example.txt

Hash a file using SHA-512:

pyhashkit file example.txt -a sha512

Show version information:

pyhashkit -v

Show all available commands:

pyhashkit commands

Python API

Hash Text

from pyhashkit import hash_text

result = hash_text("Hello World")

print(result)

Hash Text Using MD5

from pyhashkit import hash_text

result = hash_text(
    "Hello World",
    algorithm="md5"
)

print(result)

Hash File

from pyhashkit import hash_file

result = hash_file("example.txt")

print(result)

Hash File Using SHA-512

from pyhashkit import hash_file

result = hash_file(
    "example.txt",
    algorithm="sha512"
)

print(result)

Version Information

from pyhashkit import __version__

print(__version__)

Available Exports

from pyhashkit import (
    hash_text,
    hash_file,
    algorithms,
    __version__
)

algorithms

Returns a list of supported hashing algorithms available on the current Python installation.

from pyhashkit import algorithms

print(algorithms())

Example Output

a591a6d40bf420404a011733cfb7b190d62c65bf0bcda32b57b277d9ad9f146e

Project Structure

PyHashKit/
├── pyhashkit/
│   ├── __init__.py
│   ├── hashing.py
│   ├── cli.py
│   └── version.py
├── tests/
│   └── test_hashing.py
├── pyproject.toml
├── LICENSE
└── README.md

Contributing

Contributions, bug reports, and feature requests are welcome.

  1. Fork the repository
  2. Create a new branch
  3. Make your changes
  4. Submit a pull request

Author

Developed by JackMa

GitHub: https://github.com/Fmasterpro27


Links

Homepage: https://github.com/Fmasterpro27/PyHashKit

Issues: https://github.com/Fmasterpro27/PyHashKit/issues

PyPI: https://pypi.org/project/pyhashkit/


License

Licensed under the Apache License 2.0.

Metadata

Release files for PyHashKit 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for PyHashKit 0.2.1
File Size Uploaded Provenance Actions
pyhashkit-0.2.1.tar.gz 9.9 kB Without provenance Details for pyhashkit-0.2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for PyHashKit 0.2.1
File Interpreter ABI Platform Actions
pyhashkit-0.2.1-py3-none-any.whl Python 3 none any Details for pyhashkit-0.2.1-py3-none-any.whl

Total release size: 19.5 kB

Release files / pyhashkit-0.2.1.tar.gz

Download URL pyhashkit-0.2.1.tar.gz
Size 9.9 kB
Tags Source
SHA-256 checksum
How to use checksums
a5a13b8cf7ca86a6766b7c1bfb922756e73152a7ce84cb3da783ee4dac47c552
BLAKE2b-256 checksum
How to use checksums
1b274b80e42c5400c669b27a01942f11a159c88504cb3b7c7d266140254ab781
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.13

Release files / pyhashkit-0.2.1-py3-none-any.whl

Download URL pyhashkit-0.2.1-py3-none-any.whl
Size 9.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d6195176116c3ae915516bace2d087116f63ca95d9c9cbbcaf6852b72465042a
BLAKE2b-256 checksum
How to use checksums
89c9d5b7c495890e81d9c1bc52540a905ddc48c80ef974e0cd68288bdaf3db00
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.13

Security for PyHashKit 0.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page