Short, well documented utilities for interacting with webhooks.
Project description
Webhook Utils
A set of utilities for interacting with webhooks.
Installation
pip install webhook-utils
Usage
Crypto
Available hash algorithms for all methods are:
md5(not recommended)sha1sha256(recommended)
Learn more about HMAC signatures here.
Generating HMAC signatures
Bare usage:
from webhook_utils.crypto import generate_sha256_signature
print(generate_sha256_signature(b'secret-key', b'some-message'))
Comparing HMAC signatures
Bare usage:
from webhook_utils.crypto import compare_sha256_signature
is_valid_signature = compare_sha256_signature(
b'secret-key',
b'some-message',
'expected-signature',
)
if not is_valid_signature:
raise ValueError('Invalid signature')
Publishing to PYPI
poetry build
# Verify that everything looks correct on test.pypi.org
poetry publish -r testpypi
poetry publish
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
webhook-utils-0.1.0.tar.gz
(3.0 kB
view details)
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 webhook-utils-0.1.0.tar.gz.
File metadata
- Download URL: webhook-utils-0.1.0.tar.gz
- Upload date:
- Size: 3.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.12 CPython/3.10.1 Darwin/20.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dd4b913cbadbe0f26458c914cdb84c5f076f961b488727ee98104bcd786295f0
|
|
| MD5 |
24a2af69f8ac0cff0940a30134dd48ee
|
|
| BLAKE2b-256 |
b824c512bd98e1315d25c2c7552bd90e8b87f34a93f4b3066aff0a9cc763bd1a
|
File details
Details for the file webhook_utils-0.1.0-py3-none-any.whl.
File metadata
- Download URL: webhook_utils-0.1.0-py3-none-any.whl
- Upload date:
- Size: 3.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.12 CPython/3.10.1 Darwin/20.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
99727551904cafe507d4fddcb053b2be5ae7ae1c6a1bf84baebee260d8afab28
|
|
| MD5 |
b1c70d9e6d0eb970a414586a7a302129
|
|
| BLAKE2b-256 |
6511cb425116566256c9a96d814354352f3932759dc1a0c9367a78f9a020f3c1
|