monarch-dnd

Monarch is a throttle for task/jobs like push notification, sms or emails.


Keywords
monarch, dnd, DoNotDisturb
License
MIT
Install
pip install monarch-dnd==0.1.1

Documentation

Build Status

Monarch

Monarch is a throttle for communication via APN & GCM push notifications.

Install

$ pip install monarch-dnd

Getting Started

import monarch
monarch.configure()
monarch.config.rule.add('notification', 'promotion', 60)

array = []
with monarch.throttle('notification', 10, 'promotion') as pipe:
    if pipe: array.append(1)
with monarch.throttle('notification', 10, 'promotion') as pipe:
    if pipe: array.append(2)

print array
# [1]

Development

    $ python setup.py develop

Tests

  $ python setup.py test