ninette


Nameninette JSON
Version 1.0.0 PyPI version JSON
download
home_page
SummaryA simple alerting system to get notified about important events or breaking news.
upload_time2023-01-29 17:14:04
maintainer
docs_urlNone
author
requires_python>=3.8
licenseMIT
keywords mowas dwd nina warning alerting
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Ninette

[![PyPI](https://img.shields.io/pypi/v/ninette.svg)](https://pypi.org/project/ninette/)
[![Python Versions](https://img.shields.io/pypi/pyversions/ninette.svg)](https://pypi.org/project/ninette/)
[![License](https://img.shields.io/pypi/l/ninette.svg)](https://pypi.org/project/ninette/)


A simple alerting system to get notified about important events or news.

Ninette generates alerts as email messages or by executing a command
(which could generate a Signal, Jabber, Matrix, SMS, ... message) to inform about
important events or news in your region.

It can be used as an alternative or addition to smart phone apps which create push notifications.
With the Command alerter, any form of notification can be used.

Currently supported alert providers are:
**NINA** (service of the German disaster control organization) and
**Tagesschau** (German television news service).

More providers can be added easily.


## Features

  * Alerts from German **Bundesamt für Bevölkerungsschutz**
    (NINA API via https://nina.api.bund.dev, including events from DWD, MOWAS, Hochwasserzentrale)
  * Alerts for breaking news from **Tagesschau** (via https://www.tagesschau.de)
  * Notification via **Email**
  * Notification via custom command, e.g. to create a Signal, Jabber, Matrix, SMS message
  * Regional events can be filtered by location (based on county), multiple locations can be configured
  * Automatic creation of a map image for each event if it contains geo coordinates
  * Event state is stored in a SQLite database to not create alerts for already alerted events
  * Made with Python and love


## Installation and setup

Ninette requires Python 3.8 or newer.
The easiest method is to install directly from pypi using pip:

    pip install ninette

When installing or running manually, the following requirements must be installed:
html2text, py-staticmaps, requests

Before using Ninette, you need to create a configuration file called `ninette.conf`.
Ninette will search for `ninette.conf` in the following locations (in that order):

  - /etc/ninette.conf
  - ~/.config/ninette.conf
  - ninette.conf (in current working directory)

Alternatively, you can specify the name of the configuration file to be read
using the `--config` command line parameter.

An example configuration file can be found in the sources or online
at https://raw.githubusercontent.com/eht16/ninette/main/ninette.conf.example.

For details on the configuration options, consider the comments in the
example configuration file.


## Usage

Run only once:

    ninette

Run in foreground:

    ninette -f

Run in foreground and override configured event fetch interval to 5 minutes (300 seconds):

    ninette -f -i 300

Run with verbose output and dry-run to *not* send any alerts:

    ninette -v -n


## Command line options

    usage: ninette [-h] [-V] [-d] [-v] [-c FILE] [-f] [-i NUM] [-n]

    options:
      -h, --help            show this help message and exit
      -V, --version         show version and exit (default: False)
      -d, --debug           enable tracebacks and enable --verbose (default: False)
      -v, --verbose         Show more log messages (default: False)
      -c FILE, --config FILE
                            configuration file path (default: None)
      -f, --foreground      Keep running in foreground (default: False)
      -i NUM, --interval NUM
                            Check for new events every X seconds (only used when in foreground) (default: None)
      -n, --dry-run         Dry run mode - do not send and remember any alerts (default: False)


## Available providers

**NINA provider** uses the NINA API (https://nina.api.bund.dev/) which is based on the warnings
of the German Bundesamt für Bevölkerungsschutz (https://warnung.bund.de).

In general the alerts are created if the configured area is affected by accidents or disasters
(fire, flood or a release of hazardous substances) from the following services:

- MoWaS (modular warning system)
- DWD - Deutscher Wetterdienst (weather service for Germany)
- Hochwasserzentrale (flood warnings for Germany)

The provider can generate alerts for multiple areas which are listed in the configuration file.
To add an area, the "[Amtlicher Gemeindeschlüssel](https://en.wikipedia.org/wiki/Community_Identification_Number#Germany)"
(Community Identification Number) for the area must be used.
A list of such numbers can be found on https://www.xrepository.de/details/urn:de:bund:destatis:bevoelkerungsstatistik:schluessel:rs.

Since the warnings are provided only on county level, the last seven digits of the number must be
replaced by "0000000".

**Tagesschau breaking news provider** queries the German television news service for breaking
news and creates alerts for each breaking news.

**Ping provider** a provider for debugging purposes only which generates an alert every hour.


## Available alerters

**Email alerter** sends an email to a configured list of recipients, email server
and credentials can be configured.

**Command alerter** executes a custom command which receives all alert information so it can generate
a push notification or SMS for a mobile phone, a message in a chat like Matrix, a message for a Pager
or any other form of notification or post processing.


## Disclaimer

Use this tool at your own risk only.
There is no warranty that all alerts are processed and sent reliably and in time.

This project has no relation to the official German NINA warn app.


## Author

Enrico Tröger <enrico.troeger@uvena.de>

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "ninette",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "mowas,dwd,nina,warning,alerting",
    "author": "",
    "author_email": "Enrico Tr\u00f6ger <enrico.troeger@uvena.de>",
    "download_url": "https://files.pythonhosted.org/packages/96/8e/1bd6b608b5d1111e75408a866e8b780dfe7dcd058c8be676a783b78cc8c4/ninette-1.0.0.tar.gz",
    "platform": null,
    "description": "# Ninette\n\n[![PyPI](https://img.shields.io/pypi/v/ninette.svg)](https://pypi.org/project/ninette/)\n[![Python Versions](https://img.shields.io/pypi/pyversions/ninette.svg)](https://pypi.org/project/ninette/)\n[![License](https://img.shields.io/pypi/l/ninette.svg)](https://pypi.org/project/ninette/)\n\n\nA simple alerting system to get notified about important events or news.\n\nNinette generates alerts as email messages or by executing a command\n(which could generate a Signal, Jabber, Matrix, SMS, ... message) to inform about\nimportant events or news in your region.\n\nIt can be used as an alternative or addition to smart phone apps which create push notifications.\nWith the Command alerter, any form of notification can be used.\n\nCurrently supported alert providers are:\n**NINA** (service of the German disaster control organization) and\n**Tagesschau** (German television news service).\n\nMore providers can be added easily.\n\n\n## Features\n\n  * Alerts from German **Bundesamt f\u00fcr Bev\u00f6lkerungsschutz**\n    (NINA API via https://nina.api.bund.dev, including events from DWD, MOWAS, Hochwasserzentrale)\n  * Alerts for breaking news from **Tagesschau** (via https://www.tagesschau.de)\n  * Notification via **Email**\n  * Notification via custom command, e.g. to create a Signal, Jabber, Matrix, SMS message\n  * Regional events can be filtered by location (based on county), multiple locations can be configured\n  * Automatic creation of a map image for each event if it contains geo coordinates\n  * Event state is stored in a SQLite database to not create alerts for already alerted events\n  * Made with Python and love\n\n\n## Installation and setup\n\nNinette requires Python 3.8 or newer.\nThe easiest method is to install directly from pypi using pip:\n\n    pip install ninette\n\nWhen installing or running manually, the following requirements must be installed:\nhtml2text, py-staticmaps, requests\n\nBefore using Ninette, you need to create a configuration file called `ninette.conf`.\nNinette will search for `ninette.conf` in the following locations (in that order):\n\n  - /etc/ninette.conf\n  - ~/.config/ninette.conf\n  - ninette.conf (in current working directory)\n\nAlternatively, you can specify the name of the configuration file to be read\nusing the `--config` command line parameter.\n\nAn example configuration file can be found in the sources or online\nat https://raw.githubusercontent.com/eht16/ninette/main/ninette.conf.example.\n\nFor details on the configuration options, consider the comments in the\nexample configuration file.\n\n\n## Usage\n\nRun only once:\n\n    ninette\n\nRun in foreground:\n\n    ninette -f\n\nRun in foreground and override configured event fetch interval to 5 minutes (300 seconds):\n\n    ninette -f -i 300\n\nRun with verbose output and dry-run to *not* send any alerts:\n\n    ninette -v -n\n\n\n## Command line options\n\n    usage: ninette [-h] [-V] [-d] [-v] [-c FILE] [-f] [-i NUM] [-n]\n\n    options:\n      -h, --help            show this help message and exit\n      -V, --version         show version and exit (default: False)\n      -d, --debug           enable tracebacks and enable --verbose (default: False)\n      -v, --verbose         Show more log messages (default: False)\n      -c FILE, --config FILE\n                            configuration file path (default: None)\n      -f, --foreground      Keep running in foreground (default: False)\n      -i NUM, --interval NUM\n                            Check for new events every X seconds (only used when in foreground) (default: None)\n      -n, --dry-run         Dry run mode - do not send and remember any alerts (default: False)\n\n\n## Available providers\n\n**NINA provider** uses the NINA API (https://nina.api.bund.dev/) which is based on the warnings\nof the German Bundesamt f\u00fcr Bev\u00f6lkerungsschutz (https://warnung.bund.de).\n\nIn general the alerts are created if the configured area is affected by accidents or disasters\n(fire, flood or a release of hazardous substances) from the following services:\n\n- MoWaS (modular warning system)\n- DWD - Deutscher Wetterdienst (weather service for Germany)\n- Hochwasserzentrale (flood warnings for Germany)\n\nThe provider can generate alerts for multiple areas which are listed in the configuration file.\nTo add an area, the \"[Amtlicher Gemeindeschl\u00fcssel](https://en.wikipedia.org/wiki/Community_Identification_Number#Germany)\"\n(Community Identification Number) for the area must be used.\nA list of such numbers can be found on https://www.xrepository.de/details/urn:de:bund:destatis:bevoelkerungsstatistik:schluessel:rs.\n\nSince the warnings are provided only on county level, the last seven digits of the number must be\nreplaced by \"0000000\".\n\n**Tagesschau breaking news provider** queries the German television news service for breaking\nnews and creates alerts for each breaking news.\n\n**Ping provider** a provider for debugging purposes only which generates an alert every hour.\n\n\n## Available alerters\n\n**Email alerter** sends an email to a configured list of recipients, email server\nand credentials can be configured.\n\n**Command alerter** executes a custom command which receives all alert information so it can generate\na push notification or SMS for a mobile phone, a message in a chat like Matrix, a message for a Pager\nor any other form of notification or post processing.\n\n\n## Disclaimer\n\nUse this tool at your own risk only.\nThere is no warranty that all alerts are processed and sent reliably and in time.\n\nThis project has no relation to the official German NINA warn app.\n\n\n## Author\n\nEnrico Tr\u00f6ger <enrico.troeger@uvena.de>\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A simple alerting system to get notified about important events or breaking news.",
    "version": "1.0.0",
    "split_keywords": [
        "mowas",
        "dwd",
        "nina",
        "warning",
        "alerting"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "57b7ab1b538d1efa78938cd2b68d24dac8b51d1ccb16b5d90573ea8dcc632f06",
                "md5": "badda910b56b789180e4cd427a025e12",
                "sha256": "0c5ce19d69d6c159eea40428d3f2c5e32b61a39dd875fda1cee7b83845da22d3"
            },
            "downloads": -1,
            "filename": "ninette-1.0.0-py3-none-any.whl",
            "has_sig": true,
            "md5_digest": "badda910b56b789180e4cd427a025e12",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 23130,
            "upload_time": "2023-01-29T17:14:01",
            "upload_time_iso_8601": "2023-01-29T17:14:01.860642Z",
            "url": "https://files.pythonhosted.org/packages/57/b7/ab1b538d1efa78938cd2b68d24dac8b51d1ccb16b5d90573ea8dcc632f06/ninette-1.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "968e1bd6b608b5d1111e75408a866e8b780dfe7dcd058c8be676a783b78cc8c4",
                "md5": "ecdaa20f09772f8e4e4f0013fede8910",
                "sha256": "a361e18060b0ae1cb06d77dab000d3a78cb468d4a1c20363c11ecd736ee3744b"
            },
            "downloads": -1,
            "filename": "ninette-1.0.0.tar.gz",
            "has_sig": true,
            "md5_digest": "ecdaa20f09772f8e4e4f0013fede8910",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 21415,
            "upload_time": "2023-01-29T17:14:04",
            "upload_time_iso_8601": "2023-01-29T17:14:04.323694Z",
            "url": "https://files.pythonhosted.org/packages/96/8e/1bd6b608b5d1111e75408a866e8b780dfe7dcd058c8be676a783b78cc8c4/ninette-1.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-01-29 17:14:04",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "ninette"
}
        
Elapsed time: 0.03337s