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)

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

python_pgp_check-0.3.2.tar.gz (5.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

python_pgp_check-0.3.2-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file python_pgp_check-0.3.2.tar.gz.

File metadata

  • Download URL: python_pgp_check-0.3.2.tar.gz
  • Upload date:
  • Size: 5.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.21

File hashes

Hashes for python_pgp_check-0.3.2.tar.gz
Algorithm Hash digest
SHA256 aa65827f4539b7b2c61a0d610048692ddf80a64f6bf10adb0da6bbb655428294
MD5 4e6ecc9014712957f37af9b35a65ef1c
BLAKE2b-256 a50928d16f8a8a0e784b1a7091410c2dfbef2e3f1b3e5dd7372f8e29d754a62e

See more details on using hashes here.

File details

Details for the file python_pgp_check-0.3.2-py3-none-any.whl.

File metadata

File hashes

Hashes for python_pgp_check-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 cc0682e78798ce467aa75887efeace2af543c6bc48b5dd6fd64eb29128ac0a5c
MD5 65a147a7a4a858b4adacab1b1f3f566e
BLAKE2b-256 b0540553b30721b078dbceb496cf85c0e90a9d719a3f31bfe478a3f34a5fb4e0

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.3.2 This release

2 files

0.3.1

2 files

0.2.14

2 files

0.2.13

2 files

0.2.12

2 files

0.2.11

2 files

0.2.10

2 files

0.2.9

2 files

0.2.8

2 files

0.2.7

2 files

0.2.6

2 files

0.2.5

2 files

0.2.1

2 files

0.2.0

2 files

0.1.1

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page