The Noterator: bringing notification to iteration.
Project description
The Noterator
Adding notification to your iteration.
>>> from noterator import noterate, EMAIL, HIPCHAT, TWILIO
>>> for obj in noterate(my_objects, method=EMAIL|HIPCHAT|TWILIO):
... do_something_slow(obj)
...
>>>
When the loop completes, The Noterator will notify you by all the methods you pass to method. In this case it’ll email you, send a HipChat notification, and send an SMS to your configured number with Twilio.
You can find more usage information in the usage docs.
Configuration
Before The Noterator can do anything, you’ll need a config.ini file (see config.example.ini or the example below to get started).
By default, we check for $HOME/.config/noterator/config.ini, so it’s probably best to keep your config there, but you can pass the config_file parameter to noterate with the path to an alternative location.
You only need to define settings for the methods you wish to use.
[email]
from = The Noterator <noterator@example.org>
to = you@example.org
host = smtp.example.org
port = 25
username = postmaster@example.org
password = password123
[hipchat]
token = abc123
room_id = 123456
from_name = The Noterator
message_colour = green
[twilio]
account_sid = abc123
token = abc123
from_number = +123456
to_number = +456789
License
MIT.
Credits
This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.
History
0.1.0 (2016-09-24)
First release on PyPI.
0.2.0 (2016-09-25)
More safety checks in configuration
Added the every_n parameter to noterate
0.2.1 (2016-09-25)
More appropriate exception usage in config loading / checking
0.2.2 (2016-09-26)
Fixed a packaging error
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for noterator-0.2.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 495f9526e027b98c3e8bcbde388c1d32d88f4753d52e2712fed7ff648c7a5130 |
|
MD5 | 64b7a734ce019cb3b8b9896a7202e359 |
|
BLAKE2b-256 | 64a0ad3fa868732407227d803066b9a723cbff5ad30cbdc0c0cfc8ed97327c6d |