Skip to content
jsem-nerad edited this page Sep 1, 2026 · 6 revisions

strava-cz-python

A Python client for Strava.cz, the ordering system used by Czech school canteens. It talks directly to the web app's internal JSON API — no browser, no HTML scraping.

pip install strava-cz          # the library
pip install "strava-cz[cli]"   # ...plus secure password storage for the command
strava-cz profile add skola --username your.username --canteen 3753
strava-cz menu --week
strava-cz order 37
from strava_cz import StravaCZ

with StravaCZ("your.username", "YourPassword123", "3753") as strava:
    strava.menu.fetch()
    strava.menu.print()
    strava.menu.order_meals(5, 9)

Documentation

Getting started

Core concepts

Using it

  • Command Line — the strava-cz command, its filters, JSON output and exit codes
  • Ordering Meals — ordering, cancelling, and reading the result
  • Error Handling — the exception hierarchy and how to recover

Development

What it does

  • Login and logout, with session handling
  • Fetching and filtering the menu by meal type, date and orderability
  • Ordering and cancelling meals as one transaction, with the result verified
  • Telling you why a meal cannot be ordered — deadline passed, no school, and so on
  • Marking the days the canteen does not order for you, which are still orderable by hand
  • Account balance tracking
  • A strava-cz command with readable output for people and JSON for scripts
  • Profiles, so credentials are typed once and the password lives in the OS keyring — or encrypted in the profile file, on a server that has no keyring
  • Full type annotations, shipped with py.typed

Links

Licence

GPL-3.0-or-later

AI usage

Parts of this documentation were written with the help of an LLM, and reviewed before publishing.

Clone this wiki locally