jimr / noterator

The Noterator: adding notification to your iteration.

Home Page:http://noterator.readthedocs.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The Noterator

Latest Release

Build Status

Test Coverage

Documentation Status

Adding notification to your iteration.

>>> from noterator import noterate, EMAIL, TWILIO
>>> for obj in noterate(my_objects, EMAIL|TWILIO):
...     do_something_slow(obj)
... 
>>> 

When the loop completes, The Noterator will notify you by all the methods you passed in. In this case it'll email you and send an SMS to your configured number with Twilio. Other supported notification methods are HipChat (send a notification to a room) and desktop.

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

It's possible to use The Noterator without a configuration file, but it's a little less concise. See the configuration docs for more detail.

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.

TODO

  • New notification plugins: Slack, Mattermost, logging, ...
  • Notication during iteration, a la tqdm.write

License

MIT.

Credits

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.

About

The Noterator: adding notification to your iteration.

http://noterator.readthedocs.io/

License:MIT License


Languages

Language:Python 91.3%Language:Makefile 8.7%