Skip to main content

Wattro Sync

Ermöglicht es, Daten aus einer lokalen Quelle mit Wattro zu synchronisieren.

Voraussetzung

  • Verbindung zu wattro (https) und Quellsystem
  • python >= 3.10 und pip

Installation

  • pip install wattro-sync

Einrichten

Die zentrale Konfigurationsdatei

Die Synchronisation beruht auf einer Konfigurationsdatei, welche mit python -m wattro_sync.setup ZIEL QUELLE erzeugt oder aktualisiert werden kann (siehe python -m wattro_sync.setup --help für alle gültigen Optionen).

Im Prozess werden je nach Ziel- und Quelltyp verschiedene Eingaben abgefragt und die Datenverfügbarkeit geprüft. Nur gültige Werte werden in die Konfigurationsdatei geschrieben.

ACHTUNG

Für Importe aus Mosaik muss aus technischen Gründen ein View angesporchen werden, welcher

  • die Datensätze auf maximal 2k beschränkt und
  • die Datensätze nach Änderungsdatum sortiert

Die Konfigurationsdatei kann von Hand angepasst werden. Mit python -m wattro_sync.sync --dry kann geprüft werden, ob die Synchronisation wie erwartet arbeitet.

Mail Infos

Um Informationen zum Erfolg der Synchornisation zu bekommen, können Mails verschickt werden. Das "log_level" entspricht dabei einem numerischen Wert nach dem Python Log Level Schema.

Insbesondere:

Level numerischer Wert Mail wird versendet bei...
ERROR 40 Fehler beim Synchronisieren
INFO 20 Änderung von Datensätzen
DEBUG 10 Aufruf des Scripts

Synchronisation

Mit python -m wattro_sync.sync werden die Daten synchronisiert. Siehe python -m wattro_sync.sync --help für mehr.

Development

Pre Commit tooling

# requires black, mypy and bandit to be installed (via pip)
# none of the following commands should produce output on the second run.
# lint
black wattro_sync -q
# search for typing issues
mypy wattro_sync --no-error-summary --config-file mypy.ini
# search for common issues
bandit -r wattro_sync -c bandit.yaml -q

Build

# requires build and twine to be installed (via pip)
python -m build
twine upload dist/*

Metadata

Release files for wattro-sync 0.3.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 wattro-sync 0.3.1
File Size Uploaded
wattro_sync-0.3.1.tar.gz 20.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for wattro-sync 0.3.1
File Interpreter ABI Platform
wattro_sync-0.3.1-py3-none-any.whl Python 3 none any Details

Total release size: 46.9 kB

Release files / wattro_sync-0.3.1.tar.gz

Download URL wattro_sync-0.3.1.tar.gz
Size 20.7 kB
Tags Source
SHA-256 checksum
How to use checksums
3178619f7edf835dda5ffdef5f77a8935a338d11222e0db4c6bf556e0eeb25a8
BLAKE2b-256 checksum
How to use checksums
62e06b1a0a2144dae64757f5d0da62260c690af22dc33b6858f678d963219e99
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.3

Release files / wattro_sync-0.3.1-py3-none-any.whl

Download URL wattro_sync-0.3.1-py3-none-any.whl
Size 26.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
42bc67938c5c1ccbe5af897bec698103267f737d02c168549e6c6d72c68761d7
BLAKE2b-256 checksum
How to use checksums
624f783246c92c0d39222530b43eb65a88533f2deaf20f37c5b92dd85633a11e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.3

Release history Release notifications | RSS feed

This release

0.3.1 This release

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

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