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

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:

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

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.1.tar.gz (17.4 kB view details)

Uploaded Source

Built Distribution

webhooks-0.3.1-py2.py3-none-any.whl (9.8 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

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

File hashes

Hashes for webhooks-0.3.1.tar.gz
Algorithm Hash digest
SHA256 1f938a1c496911a9ed81c4f7bac4f82edabda83911a0c3be57057a548b4c1fc6
MD5 131eca529e9a95eb5c3cb7fea96d486b
BLAKE2b-256 8aa7fb311b9d2a9abd4e7740d2be139260b801cd3080ada7ee3b1b1e875ca73d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for webhooks-0.3.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 040cb814fa2ebee39c6c47dc028f4464ee96a988382ea440ea64d25215a09371
MD5 7c2f43b22b98b37f2eb2e299daa4db69
BLAKE2b-256 127a2e43371cb6dfe10062fdcf95136a1c0b938e9ab988aa4bf1f09998c5a646

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