Metadata-Version: 2.5
Name: pernox
Version: 0.1.0
Summary: Email yourself from a script running in nox.
Project-URL: Homepage, https://pernox.dev
Project-URL: Documentation, https://pernox.dev/docs#notify
License-Expression: MIT
License-File: LICENSE
Keywords: cron,email,notifications,nox,scheduler
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Communications
Classifier: Typing :: Typed
Requires-Python: >=3.10
Description-Content-Type: text/markdown

# pernox

Email yourself from a script running in [nox](https://pernox.dev).

```
pip install pernox
```

```python
from pernox import notify

notify("3 new flats under £1,500", title="Flat search")
```

In nox, add `pernox` to the script's requirements. There's nothing else to set up: each run
is given its own token, which stops working when the run ends, and the email goes to your
nox account's address.

Notifications come with nox Pro, and go only to a verified address: verify yours in
[Settings](https://pernox.dev/settings#profile).

Run the script anywhere else and `notify` prints the message instead of sending it, so the
same script works on your own machine.

`notify` returns `True` once the email is sent, and `False` when it was only printed. If nox
can't send it, it raises `pernox.NotifyError`, which fails the run like any other exception.
Catch it if a notification failing shouldn't.

## Arguments

| | |
|---|---|
| `message` | The text, up to 1,024 characters. |
| `title` | The subject line, up to 250 characters. Without one, it's the script's name. |
| `url` | A link to include. |

No dependencies beyond the standard library. Python 3.10 or later. MIT licensed.
