Skip to main content

rain cloud

Wolkenbruch

Checks the weather forecast for a configurable place and sends an e-mail reminder to pack your rain gear if precipitation is forecast.

Wolkenbruch makes use of the MET Norway API, and uses OpenStreetmap to find the location from place names.

Dependencies

Wolkenbruch is written in Python 3, and depends on the Python modules geocoder, requests and yaml.

Installation

  • using pip or similar:
pip install wolkenbruch

Configuration

Copy the example configuration file wolkenbruch.yml.template to a suiteable location, depending on your operating system:

  • on Linux systems:
    • system-wide configuration: /etc/wolkenbruch.yml
    • per-user configuration:
      • ~/.config/wolkenbruch.yml OR
      • ${XDG_CONFIG_HOME}/wolkenbruch.yml
  • on MacOS systems:
    • per-user configuration:
      • ${XDG_CONFIG_HOME}/wolkenbruch.yml
  • on Microsoft Windows systems:
    • per-user configuration: %APPDATA%\wolkenbruch.yml

Adapt the configuration:

  • Change the place the forecast searches for. For bigger cities their name might be sufficient (Unicode is supported), e.g. “Helsinki”. When it comes to smaller places, or places that share their name with other places in different parts of the world, you might have to add a country, state or county name, e.g. ”Springfield, Fife”.
  • Adapt the SMTP host and credentials (leave user and password empty if not authentication is required). Be careful: the credentials are (obviously) saved in plain-text. Protect access to the configuration file, e.g. on a GNU/Linux or MacOS system using chmod 0600 "~/.config/wolkenbruch.yml".
  • Set the sender and receiver e-mail address (they can and often will be the same address)
  • If you feel like it, change the subject line and message body of the e-mail. The message body can contain Python string formatting code for a float variables a and m (the average and maximum precipitation rates over the next 14 hours, in mm/h).
  • Adjust the amount of rain you can stand: average_precipitation_rate_threshold is the average precipitation rate over the next 14 hours (in mm per hour) that has to be exceeded to send you a reminder, max_precipitation_rate_threshold the highest single hourly value that makes you want to not forget your rain gear.
  • The verbose flag toggles whether wolkenbruch prints a status or operated silently.
# example configuration file
# (/etc/wolkenbruch.yml, ~/.config/wolkenbruch.yml,
#    %APPDATA%/wolkenbruch.yml, ${XDG_CONFIG_HOME}/wolkenbruch.yml)
place: Helsinki
average_precipitation_rate_threshold: 0.1
max_precipitation_rate_threshold: 0.5

email-to: myself@whereever.com
email-from: me@whereever.com
email-subject: Pack your rain gear!
email-message: The average forecast precipitation rate for today is {a:0.2f}, maximum {m:0.2f} mm/h.

smtp-host: localhost:587
smtp-user: foobar
smtp-password: BARFOO

user-agent: wolkenbruch

verbose: False

Usage

Run wolkenbruch to check the precipitation for the next 14 hours and send you an e-mail reminder. Ideally, set up a cron job or a systemd timer to run wolkenbruch e.g. every morning.

Systemd timer

Copy wolkenbruch.service and wolkenbruch.timer from extra/systemd/ to /etc/systemd/user/ or ~/.config/systemd/user/ and enable the timer to run wolkenbruch at 6:30 every morning:

systemctl --user daemon-reload
systemctl --user enable --now wolkenbruch.timer 

If you want the systemd timer to trigger when you’re not logged in, enable lingering for your user:

sudo loginctl enable-linger USERNAME

Metadata

Release files for wolkenbruch 0.8.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for wolkenbruch 0.8.1
File Size Uploaded
wolkenbruch-0.8.1.tar.gz 24.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for wolkenbruch 0.8.1
File Interpreter ABI Platform
wolkenbruch-0.8.1-py3-none-any.whl Python 3 none any Details

Total release size: 48.6 kB

Release files / wolkenbruch-0.8.1.tar.gz

Download URL wolkenbruch-0.8.1.tar.gz
Size 24.5 kB
Tags Source
SHA-256 checksum
How to use checksums
a29a7171ca83a8b0cfa9bbccdb122409ae597bdbda860a0872df794bd50677b0
BLAKE2b-256 checksum
How to use checksums
45c9111d5a3c6fdf78bbf3d6806359f8d5c4590f9d31e412bb22ae2ea56aaa28
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.8

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 28, 2025.

Transparency log

Release files / wolkenbruch-0.8.1-py3-none-any.whl

Download URL wolkenbruch-0.8.1-py3-none-any.whl
Size 24.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8d7b914274220c6bf258f8f0fdf1f4793b4168b54334a1d7ab5047b371398a43
BLAKE2b-256 checksum
How to use checksums
b2af14ea916161111c8aa7ee9f46890556551494c5eec2c8fa5de9da71a44c5c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.8

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 28, 2025.

Transparency log
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page