AIS Save to database using Python: Revision history

From wikiluntti

Diff selection: Mark the radio buttons of the revisions to compare and hit enter or the button at the bottom.
Legend: (cur) = difference with latest revision, (prev) = difference with preceding revision, m = minor edit.

29 May 2026

  • curprev 17:1517:15, 29 May 2026Mol talk contribs 1,398 bytes +94 →‎Introduction
  • curprev 17:1417:14, 29 May 2026Mol talk contribs 1,304 bytes +1,304 Created page with "== Introduction == Use ais_rtl and python to save data to db == Python == <syntaxhighlight lang="python"> import sys import sqlite3 from pyais.stream import IterMessages from datetime import datetime, timezone DB = "ais.db" conn = sqlite3.connect(DB) cur = conn.cursor() print("AIS logger started", flush=True) def clean_stream(): for line in sys.stdin.buffer: if not line: continue line = line.strip() if not line: c..."