utils

This file contains some helper functions.

The most important of these is download(), which is used to download URL content.

janim_url_assets.utils.download(url: str, suffix: str = '', *, timeout: int = 10) str

Download the contents of url and return the path to the temporary cached file.

Previously downloaded url values will be cached.

Parameters:
  • url – URL to download

  • suffix – Additional suffix for the temporary file; if it is meant to represent a file extension, include the dot, e.g. .svg.

janim_url_assets.utils.loading(message: str)