ninette


Nameninette JSON
Version 1.1.0 PyPI version JSON
download
home_pageNone
SummaryA simple alerting system to get notified about important events or breaking news.
upload_time2024-07-21 21:27:03
maintainerNone
docs_urlNone
authorNone
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": null,
    "name": "ninette",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "mowas, dwd, nina, warning, alerting",
    "author": null,
    "author_email": "Enrico Tr\u00f6ger <enrico.troeger@uvena.de>",
    "download_url": "https://files.pythonhosted.org/packages/94/53/1fe54fea06052fd213e675090ede40d2c1efeb6d6f83e54ef91dadafaa16/ninette-1.1.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.1.0",
    "project_urls": {
        "Bug Tracker": "https://github.com/eht16/ninette/issues",
        "Homepage": "https://github.com/eht16/ninette"
    },
    "split_keywords": [
        "mowas",
        " dwd",
        " nina",
        " warning",
        " alerting"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f03d1d371d429f19051a3057aea80e5e359988ae49bb98387f3ea1e023bd79b8",
                "md5": "feec0640c42a30fd37ed556b8dede129",
                "sha256": "49fc27bb2eab7191e7c0ed37d23d1a1118cee58ec1c106ed13a88785c547e3ff"
            },
            "downloads": -1,
            "filename": "ninette-1.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "feec0640c42a30fd37ed556b8dede129",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 23272,
            "upload_time": "2024-07-21T21:27:01",
            "upload_time_iso_8601": "2024-07-21T21:27:01.883015Z",
            "url": "https://files.pythonhosted.org/packages/f0/3d/1d371d429f19051a3057aea80e5e359988ae49bb98387f3ea1e023bd79b8/ninette-1.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "94531fe54fea06052fd213e675090ede40d2c1efeb6d6f83e54ef91dadafaa16",
                "md5": "24d866154b3a638cef4988576e07a615",
                "sha256": "489000fa2c3a3810da3466fb9b00595516ca6041150523e84d26fe43ef3f6ab0"
            },
            "downloads": -1,
            "filename": "ninette-1.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "24d866154b3a638cef4988576e07a615",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 21755,
            "upload_time": "2024-07-21T21:27:03",
            "upload_time_iso_8601": "2024-07-21T21:27:03.967676Z",
            "url": "https://files.pythonhosted.org/packages/94/53/1fe54fea06052fd213e675090ede40d2c1efeb6d6f83e54ef91dadafaa16/ninette-1.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-07-21 21:27:03",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "eht16",
    "github_project": "ninette",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "ninette"
}
        
Elapsed time: 0.27637s