Skip to main content

Near-real-time readings from Hamburg's water quality network (WGMN) via the public Wassergüte-Auskunft.

Project description

fluvilog

Near-real-time readings from Hamburg's water-quality network (WGMN), via the public Service Portal service.

By default it runs as a continuous service that polls and stores readings into SQLite. A one-shot mode prints the latest values as a table instead, and an optional HTTP API serves the stored data.

Requirements

  • Python 3.13
  • uv (recommended to make use of provided configuration and dependency lockfile)

Getting started

uv sync --extra api     # api extra is optional, needed only for `serve-api` mode

Without uv: python -m venv .venv && .venv/bin/pip install -e . (add '.[api]' for the HTTP API).

Once installed:

uv run fluvilog list    # list stations (no egress here)
uv run fluvilog once    # one-shot fetch and print
uv run fluvilog         # Continuously fetch and store (default metrics, all stations)

Bare fluvilog (no subcommand) runs collect. A single fetch cycle takes ~30–50 s — this is due to the way the data is provided, not an issue with your network or the code.

Configuration arguments are provided to select specific stations, metrics, configure fetch intervals and more. fluvilog --help to your rescue.

HTTP API (optional)

Install the [api] extra, then:

uv run fluvilog serve-api --db water.db --cors-origin http://localhost:5173

The API opens the database read-only per request, so it can run concurrently with collect (the single writer) under SQLite WAL. Endpoints:

  • GET /api/stations — station catalogue with WGS84 coordinates
  • GET /api/readings/latest?station=&parameter= — latest reading per series
  • GET /api/readings?from=&to=&station=&parameter= — readings in a window (≤30 days)

Data source

The Wassergüte-Auskunft limits each request to ≤5 stations and ≤5 parameters (otherwise it silently truncates), so fetches are batched around that. Readings arrive at a 10-minute cadence and are stored idempotently, keyed on (station, parameter, timestamp), so the poll interval is decoupled from the source cadence.

Docker

docker build -t fluvilog .
docker run -v "$PWD/data:/data" fluvilog        # collect into /data/fluvilog.db

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fluvilog-0.1.1.tar.gz (33.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fluvilog-0.1.1-py3-none-any.whl (32.7 kB view details)

Uploaded Python 3

File details

Details for the file fluvilog-0.1.1.tar.gz.

File metadata

  • Download URL: fluvilog-0.1.1.tar.gz
  • Upload date:
  • Size: 33.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for fluvilog-0.1.1.tar.gz
Algorithm Hash digest
SHA256 72e65922774091dd6e2bf07fa7b13ad2cce4e62781835fe1bae10d65dc52007c
MD5 5aaf4d28e77c7497902f2c447f7d65f9
BLAKE2b-256 da6a0584b0e56aeaa44b9cc66f75352b96425adb2c07467095b5e9c86e4faf04

See more details on using hashes here.

Provenance

The following attestation bundles were made for fluvilog-0.1.1.tar.gz:

Publisher: release.yml on dmnq-f/fluvilog

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file fluvilog-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: fluvilog-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 32.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for fluvilog-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f789ac54de65a993ca91e8e4cda4499ee722af8ad0008de9385a6a3d4f8c4bc7
MD5 b372acc9a32724f78ec3acfd90f2f627
BLAKE2b-256 cfe0446106d0ec0a312f6490984d9e373e5ea6cc92368473ff5e8e0e8ab3e9a6

See more details on using hashes here.

Provenance

The following attestation bundles were made for fluvilog-0.1.1-py3-none-any.whl:

Publisher: release.yml on dmnq-f/fluvilog

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page