---------------------------------------------------------------------- This is the API documentation for the daily_dose library. ---------------------------------------------------------------------- ## Functions Utility functions load_workouts() -> 'list[Workout]' Load the bundled workout history. Returns: One dict per logged workout, each with ``date``, ``year``, ``kind`` (``"text"`` or ``"image"``), ``done``, ``summary``, ``body_md``, and ``image_url`` keys. on_this_day(workouts: 'list[Workout]', today: 'date | None' = None) -> 'list[Workout]' Find every workout logged on this month/day, across all years. Args: workouts: Candidate workouts, e.g. from `load_workouts`. today: Date to match against; defaults to `date.today`. Returns: Matching workouts (0 or more), sorted most-recent year first. random_workout(workouts: 'list[Workout]', rng: 'random.Random | None' = None) -> 'Workout' Pick one workout at random. Args: workouts: Candidate workouts, e.g. from `load_workouts`. rng: Optional `random.Random` instance for reproducible picks. Returns: A single randomly chosen workout dict. ## Constants Module-level constants and data dict(*args, **kwargs) dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object's (key, value) pairs dict(iterable) -> new dictionary initialized as if via: d = {} for k, v in iterable: d[k] = v dict(**kwargs) -> new dictionary initialized with the name=value pairs in the keyword argument list. For example: dict(one=1, two=2)