معرفی شرکت ها


django-webhooks2-0.1.0


Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر

توضیحات

Simple webhooks for Django
ویژگی مقدار
سیستم عامل -
نام فایل django-webhooks2-0.1.0
نام django-webhooks2
نسخه کتابخانه 0.1.0
نگهدارنده []
ایمیل نگهدارنده []
نویسنده Byron Ruth
ایمیل نویسنده b@devel.io
آدرس صفحه اصلی https://github.com/cbmi/django-webhooks/
آدرس اینترنتی https://pypi.org/project/django-webhooks2/
مجوز BSD
# django-webhooks [![Build Status](https://travis-ci.org/cbmi/django-webhooks.png?branch=master)](https://travis-ci.org/cbmi/django-webhooks) [![Coverage Status](https://coveralls.io/repos/cbmi/django-webhooks/badge.png?branch=master)](https://coveralls.io/r/cbmi/django-webhooks?branch=master) ## Install ```bash # Yes.. with a two on the end pip install django-webhooks2 ``` ## Setup Add `webhooks` to `INSTALLED_APPS`: ```python INSTALLED_APPS = ( 'webhooks', ... ) ``` ## Settings - `WEBHOOK_TIMEOUT` - Seconds to wait until a request times out - `WEBHOOK_THREADS` - Maximum number of threads to be used in a worker pool - `WEBHOOK_USER_AGENT` - The user-agent string for POST requests. Defaults to the current site name if the Django sites apps is installed. - `WEBHOOK_VERSION` - The webhook version. If not None, this will be added to the user-agent string, e.g. 'Webhooks/1.0'. Default is 1.0. ## Trigger Execution 1. Events are triggered using `webhooks.trigger(event, [*args, [**kwargs]])` 2. If a handler is registered for the event, the arguments are passed into the handler to generate a JSON-serializable payload. 3. All URLs registered for this event are collected and each URL receives a POST request with the JSON payload **Notes:** - If no URLs are registered for the event, the payload is not generated (since it would be wasted computation) - All requests are sent in parallel using threads - Logging is heavily use to catch any undesirable or unexpected behaviors (such as failing requests, errors or data serialization) ## Usage ```python import webhooks # Define and register a handler for an event def handler(): return { ... } webhooks.events.register('event', handler) # Bind a URL to the event webhooks.bind('event', 'http://example.com') # Trigger the event. Any arguments after the event name # will be passed into the handler to produce the data that # will be POSTed to the bound URLs. webhooks.trigger('event') ```


نحوه نصب


نصب پکیج whl django-webhooks2-0.1.0:

    pip install django-webhooks2-0.1.0.whl


نصب پکیج tar.gz django-webhooks2-0.1.0:

    pip install django-webhooks2-0.1.0.tar.gz