Two small Python pollers that watch public appointment booking systems and beep when an earlier slot opens up.
scenarios/swiss.py: polls the Swiss e-doc reservation API. Stateless; you paste in tokens from a logged-in browser session.scenarios/icbc.py: polls the ICBC (British Columbia) driver-licence appointment API. Logs in for you, tracks the auth token, refreshes it on 403, and only alerts if the first available slot is earlier than your currently booked date.
alerter.py is a tiny shared helper for colored output and the terminal-bell beep.
Credentials and tokens are read from a .env file. No personal data is committed.
Uses uv.
uv sync
cp .env.example .env # fill in the values for the scenario you wantuv run python -m scenarios.swiss
uv run python -m scenarios.icbcCtrl-C to stop. Default poll interval is 60 seconds; override with SWISS_INTERVAL_SECONDS or ICBC_INTERVAL_SECONDS in .env.
The Swiss endpoint is session-protected. Sign in through the browser, open DevTools → Network, click around to trigger a POST to /rest/public/appointment/booking/..., then copy the URL, the X-XSRF-TOKEN header, the token header, and the full Cookie header into .env. Tokens expire within an hour or so; refresh when polling starts returning errors.
ICBC_LAST_NAME, ICBC_LICENCE_NUMBER, and ICBC_KEYWORD are the same three things you would type into the ICBC web booking form.
Pure Python, runs on Linux, macOS, and Windows. Alerts are a terminal bell character plus colored output. Some terminals mute the bell; in that case you will still see the highlighted "*** SLOT FOUND ***" line.