Skip to main content

Python PGP Check

PyPI Version PyPI Downloads

License Format Implementation Package Size

A quick python CLI tool to verify file PGP hashes

Installation and usage

Install it with python pip using

pip install python-pgp-check

Usage

Calculate Hash

to calculate the hash of a file:

python-pgp-check <file_path>

Verify Hash

To verify a file against an expected hash:

python-pgp-check <file_path> <expected_hash>

Specifying Hash Algorithm

By default, SHA-256 is used. To use a different algorithm:

python-pgp-check <file_path> [<expected_hash>] --algorithm <algorithm>

Supported algorithms: md5, sha1, sha256, sha512

Examples

Calculate SHA-256 hash:

python-pgp-check /path/to/file

Verify file with SHA-256 hash:

python-pgp-check /path/to/file 5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8

Calculate MD5 hash:

python-pgp-check /path/to/file --algorithm md5

Verify file with SHA-512 hash:

python-pgp-check /path/to/file 3c9909afec25354d551dae21590bb26e38d53f2173b8d3dc3eee4c047e7ab1c1eb8b85103e3be7ba613b31bb5c9c36214dc9f14a42fd7a2fdb84856bca5c44c2 --algorithm sha512

Dev Setup

  1. Create a virtual environment:
# On Windows
python -m venv venv

# On macOS/Linux
python3 -m venv venv
  1. Activate the virtual environment:
# On Windows
venv\Scripts\activate

# On macOS/Linux
source venv/bin/activate

Installation Options

Option 1: Development Installation

  1. Install dependencies:
pip install -r requirements.txt
  1. Run the CLI directly for testing:
python src/pgp_check/cli.py

Option 2: Package Installation

  1. Install the package in editable mode:
pip install -e .

Verification

Test the it installed correctly:

# If installed with Option 2
python-pgp-check --version

Notes

  • Always ensure your virtual environment is activated before running commands (you should see (venv) in your terminal prompt)
  • Use deactivate to exit the virtual environment when done
  • If you encounter permission errors, you may need to use sudo (Linux/macOS) or run as administrator (Windows)

Metadata

Release files for python-pgp-check 0.3.2

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

Source distribution (sdist)

Source distribution for python-pgp-check 0.3.2
File Size Uploaded Provenance Actions
python_pgp_check-0.3.2.tar.gz 5.5 kB Without provenance Details for python_pgp_check-0.3.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for python-pgp-check 0.3.2
File Interpreter ABI Platform Actions
python_pgp_check-0.3.2-py3-none-any.whl Python 3 none any Details for python_pgp_check-0.3.2-py3-none-any.whl

Total release size: 10.5 kB

Release files / python_pgp_check-0.3.2.tar.gz

Download URL python_pgp_check-0.3.2.tar.gz
Size 5.5 kB
Tags Source
SHA-256 checksum
How to use checksums
aa65827f4539b7b2c61a0d610048692ddf80a64f6bf10adb0da6bbb655428294
BLAKE2b-256 checksum
How to use checksums
a50928d16f8a8a0e784b1a7091410c2dfbef2e3f1b3e5dd7372f8e29d754a62e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.21

Release files / python_pgp_check-0.3.2-py3-none-any.whl

Download URL python_pgp_check-0.3.2-py3-none-any.whl
Size 4.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cc0682e78798ce467aa75887efeace2af543c6bc48b5dd6fd64eb29128ac0a5c
BLAKE2b-256 checksum
How to use checksums
b0540553b30721b078dbceb496cf85c0e90a9d719a3f31bfe478a3f34a5fb4e0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.21

Security for python-pgp-check 0.3.2

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