webhooks
Python + Webhooks Made Easy
Free software: BSD license
Documentation: http://webhooks.rtfd.org.
WARNING This project is in a pre-alpha state. It’s not ready for use on ANYTHING.
Python Versions
Currently works in:
Python 2.7
Python 3.3
Existing Features
Easy to integrate into any package or project
Comes with several built-in senders for synchronous webhooks.
Comes with a RedisQ-powered asynchronous webhook.
Extendable functionality through the use of custom senders and hash functions.
Planned Features
Comes with many built-in senders for synchronous and asynchronous webhooks.
Special functions for combining multiple sends of identical payloads going to one target into one.
Follows http://resthooks.org patterns
Great documentation
Compatibility with PyPy
Usage
Follow these easy steps:
Import the webhook decorator.
Define a function that returns a JSON-serializable dictionary or iterable.
Add the webhook decorator and pass in a sender_callable.
Call the function!
Synchronous example (async examples to come soon):
>>> from webhooks import webhook
>>> from webhooks.senders import targeted
>>> @webhook(sender_callable=targeted.sender)
>>> def basic(url, wife, husband):
>>> return {"husband": husband, "wife": wife}
>>> r = basic(url="http://httpbin.org/post", husband="Danny", wife="Audrey")
>>> import pprint
>>> pprint.pprint(r)
{'attempt': 1,
'hash': '29788eb987104b8a87d201292fa459d9',
'husband': 'Danny',
'response': b'{\n "args": {},\n "data": "",\n "files": {},\n "form": {\n "attempt": "1",\n "hash": "29788eb987104b8a87d201292fa459d9",\n "husband": "Danny",\n "url": "http://httpbin.org/post",\n "wife": "Audrey"\n },\n "headers": {\n "Accept": "*/*",\n "Accept-Encoding": "gzip, deflate",\n "Connection": "close",\n "Content-Length": "109",\n "Content-Type": "application/x-www-form-urlencoded",\n "Host": "httpbin.org",\n "User-Agent": "python-requests/2.3.0 CPython/3.3.5 Darwin/12.3.0",\n "X-Request-Id": "d25119e4-08ba-4523-abc4-b9a9ac10225b"\n },\n "json": null,\n "origin": "108.185.146.101",\n "url": "http://httpbin.org/post"\n}',
'status_code': 200,
'url': 'http://httpbin.org/post',
'wife': 'Audrey'}
Projects Powered by Webhooks
History
0.4.2 (2014-05-22)
Convert python-requests bytes to string when using Python 3
0.4.1 (2014-05-22)
Replaced json262 with standardjson package.
0.4.0 (2014-05-20)
Replaced utils.encoders with json262 package.
utf-8 encoding everywhere
Add from `__future__ import absolute_import everywhere.
0.3.2 (2014-05-17)
Brought in simplified cached_property decorator
0.3.1 (2014-05-15)
Added more Senderable attributes to make it easier to track what’s going on.
Added the missing webhooks.sender package to setup.py.
0.3.0 (2014-05-14)
Added extensible Senderable class to expedite creating new senders.
Added async_redis sender.
Added travis-ci.
0.2.0 (2014-05-13)
Added functioning hook decorator.
Ramped up test coverage.
Hash functions placed in their own module.
Cleaned up JSON encoder thanks to Audrey Roy Greenfeld!
0.1.0 (2014-05-07)
First release on PyPI.
Metadata
Release files for webhooks 0.4.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| webhooks-0.4.2.tar.gz | 17.0 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| webhooks-0.4.2-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details |
Total release size: 27.7 kB
Release files / webhooks-0.4.2.tar.gz
| Download URL | webhooks-0.4.2.tar.gz |
|---|---|
| Size | 17.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
092eefbd6da5f182b8629a63f90401b75ebf34a8079da60a747aef309201b2f9
|
|
BLAKE2b-256 checksum How to use checksums |
1075631a233b438e908cb938e16bed0cac176d16d0931d7d251980267bfa3556
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / webhooks-0.4.2-py2.py3-none-any.whl
| Download URL | webhooks-0.4.2-py2.py3-none-any.whl |
|---|---|
| Size | 10.7 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
d705c5d8e6d3b485dae3071657360f22795b78bb0fa2652b00c7b086a2ffc05f
|
|
BLAKE2b-256 checksum How to use checksums |
62837db35bd3e26831bcc7f6970a5ff7668b9dcfb4898bb509e4e5b8a97756d4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for webhooks 0.4.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.