Skip to main content

Python + Webhooks mMade Easy

Project description

https://pypip.in/d/webhooks/badge.png https://badge.fury.io/py/webhooks.png Build Status Wheel Status

Python + Webhooks Made Easy

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

  • PyPy

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

  • Great tests

Usage

Follow these easy steps:

  1. Import the webhook decorator.

  2. Define a function that returns a JSON-serializable dictionary or iterable.

  3. Add the webhook decorator and pass in a sender_callable.

  4. 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}

basic(url="http://httpbin.org/post", "Danny", "Audrey")

Projects Powered by Webhooks

History

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.

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

webhooks-0.3.0.tar.gz (15.3 kB view details)

Uploaded Source

Built Distribution

webhooks-0.3.0-py2.py3-none-any.whl (7.1 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file webhooks-0.3.0.tar.gz.

File metadata

  • Download URL: webhooks-0.3.0.tar.gz
  • Upload date:
  • Size: 15.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for webhooks-0.3.0.tar.gz
Algorithm Hash digest
SHA256 45ef159125480462afb2bdb7fe897b0f0f00b040cbf50fff650879040669497b
MD5 dbd2a3d25e6c40cdea5e10cabc07b62b
BLAKE2b-256 a3b597d835bb44a389b3a82fa69952f4e915cf6f4f47785891db03b913f5bbc6

See more details on using hashes here.

File details

Details for the file webhooks-0.3.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for webhooks-0.3.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 b1927be5889dfbe31e06643629957c83d3df33c1509c7edc66e410e67be72deb
MD5 ed601c89244bd9833a6067533d2121a0
BLAKE2b-256 37559be231aaa4a457e19cdfe96534247e920cced80f82e7ed6776d5c05b6fbc

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page