Skip to content

Installation Guide

jsem-nerad edited this page Sep 1, 2026 · 4 revisions

Installation Guide

Requirements

  • Python 3.10 or newer
  • An account at a canteen that uses Strava.cz, and its canteen number

The only runtime dependency is httpx, which pip installs for you.

Install from PyPI

pip install strava-cz

That gives you the library and the strava-cz command. The command works on its own, but to have it remember passwords — in the operating system's credential store, or encrypted in the profile file on a machine that has no such store — add the cli extra:

pip install "strava-cz[cli]"

Without it, a stored profile reads its password from $STRAVA_CZ_PASSWORD or asks for it each time — see Profiles.

Inside a virtual environment, which is what you usually want:

python3 -m venv .venv
source .venv/bin/activate        # Windows: .venv\Scripts\activate
pip install strava-cz

Install from source

git clone https://github.com/jsem-nerad/strava-cz-python.git
cd strava-cz-python
pip install -e ".[dev]"

The dev extra adds pytest, respx, ruff and mypy. See Contributing for the workflow.

Verify the installation

import strava_cz

print(strava_cz.__version__)
strava-cz --version
python -m strava_cz --version    # same thing, if the script directory is not on PATH

Finding your canteen number

The canteen number is the numeric id of your canteen in the Strava.cz system, and it is required — the library will not guess it.

  1. Open app.strava.cz and go to the login page.
  2. Search for your canteen by name.
  3. The number is shown next to the canteen, and appears in the URL when you select it.

It is the same value the web app sends as cislo.

Type checking

The package ships a py.typed marker, so mypy and Pyright pick up its annotations with no extra configuration:

from strava_cz import Meal

def cheapest(meals: list[Meal]) -> Meal:
    return min(meals, key=lambda meal: meal.price)

Clone this wiki locally