Skip to main content

WebhookGuard for Python

PyPI version License: MIT

A secure, modern webhook signature library for Python. WebhookGuard uses asymmetric cryptography (RSA-SHA256 with PSS padding) and replay attack prevention to ensure your webhook endpoints are robust and secure.

The core principle is to sign webhooks with a private key and verify them with a public key, eliminating the need to share secrets.


Features

  • Asymmetric Signatures: Secure RSA key pair authentication.
  • Modern Cryptography: Implements the recommended RSA-PSS padding scheme.
  • Replay Attack Prevention: Built-in support for timestamp and nonce checking.
  • Developer-Friendly: Raises detailed, specific exceptions for easy debugging.

Getting Started

  1. Installation

    pip install webhookguard
    
  2. Key Generation

    # Generate a 2048-bit private key
    openssl genpkey -algorithm RSA -out private_key.pem -pkeyopt rsa_keygen_bits:2048
    
    # Extract the public key from the private key
    openssl rsa -pubout -in private_key.pem -out public_key.pem
    

Documentation

For detailed usage examples, API reference, and security best practices, please see our full documentation.

➡️ View the Full Documentation

Contributing

Contributions are welcome! Please feel free to open an issue or submit a pull request.

Author

License

This project is licensed under the MIT License - see the LICENSE file for details.

Release files for webhookguard 1.0.0

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

Source distribution (sdist)

Source distribution for webhookguard 1.0.0
File Size Uploaded
webhookguard-1.0.0.tar.gz 6.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for webhookguard 1.0.0
File Interpreter ABI Platform
webhookguard-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 11.2 kB

Release files / webhookguard-1.0.0.tar.gz

Download URL webhookguard-1.0.0.tar.gz
Size 6.7 kB
Tags Source
SHA-256 checksum
How to use checksums
e1dd3d51100a696de6412574ca449af908fb0b30edb2b910e26628dac070eac9
BLAKE2b-256 checksum
How to use checksums
aaa165c80d1279586f0c553834c9644a40fbc2fef996428ed76000c1b86630b6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.5

Release files / webhookguard-1.0.0-py3-none-any.whl

Download URL webhookguard-1.0.0-py3-none-any.whl
Size 4.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
23ad479ea26bb4168d9e33dbae0a8a43c772ccfdc7395160b40e63b8522c437e
BLAKE2b-256 checksum
How to use checksums
0e09e5d9943fdff400d8db22681383360ba5ac5ff34dcb96cdf4dd486cf00c98
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.5

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

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