The Noterator
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.
[desktop]
sound = true
[email]
from_mail = The Noterator <noterator@example.org>
recipient = 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
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.
History
0.4.3 (2016-10-31)
Fix a packaging issue relating to moved requirements
0.4.2 (2016-10-20)
Prevent test failure due to timing errors
Minor testing & packaging fixes
0.4.1 (2016-10-13)
Minor cleanups & fixes
0.4.0 (2016-09-30)
Desktop notification (Mac & Linux)
Improvements to testing
Test coverage reporting to codecov.io
0.3.0 (2016-09-28)
Allow the construction of re-usable Noterators with the Noterator class
Configuration is now possible without a config file (instance.configure_plugin)
Plugin validation is now triggred when iteration begins, not when the Noterator is built
Changed email plugin configuration keys to be consistent with, e.g. Django
Added tests for configuration file validation & all plugins
Travis CI + coverage / Coveralls integration
0.2.2 (2016-09-26)
Fixed a packaging error
0.2.1 (2016-09-25)
More appropriate exception usage in config loading / checking
0.2.0 (2016-09-25)
More safety checks in configuration
Added the every_n parameter to noterate
0.1.0 (2016-09-24)
First release on PyPI.
Metadata
Release files for noterator 0.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| noterator-0.5.0.tar.gz | 23.9 kB | Without provenance | Details for noterator-0.5.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| noterator-0.5.0-py3-none-any.whl | Python 3 | none | any | Details for noterator-0.5.0-py3-none-any.whl |
Total release size: 34.4 kB
Release files / noterator-0.5.0.tar.gz
| Download URL | noterator-0.5.0.tar.gz |
|---|---|
| Size | 23.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
20d7be374ce184732146333ba1cb1deec45bb3947173e8c9e4fbf16b0f249cd4
|
|
BLAKE2b-256 checksum How to use checksums |
19cc36bc8f5842937fe0c9fb2b6ba3b128a5907588ff9f699d0e41216e6c3604
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.8.0
|
Release files / noterator-0.5.0-py3-none-any.whl
| Download URL | noterator-0.5.0-py3-none-any.whl |
|---|---|
| Size | 10.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b1629bd96201be55993fc1bc71cc9dfd571c39d9e457253392d2d6526b4f7db8
|
|
BLAKE2b-256 checksum How to use checksums |
2241c52888c6b684837f012ed30cda6514b48f24d1edfcbfd718e9f834c60eec
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.8.0
|
Security for noterator 0.5.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.