easysnowdata.providers.raster_http.fetch#
- easysnowdata.providers.raster_http.fetch(url: str, fname: str | None = None, *, subdir: str | None = None, known_hash: str | None = None, progressbar: bool = True, max_age: float | None = None) Path[source]#
Download url once into the cache with a plain GET and return the local path.
For static archives whose hosts reject range requests or the HEAD request GDAL’s
/vsicurlsends first (GRDC).EASYSNOWDATA_CACHE_DIRmoves the cache root.Without a known_hash pooch never re-downloads an existing file, which is right for a static release and wrong for an artefact that is republished: max_age (in seconds) re-fetches a cached copy older than that, so the daily-rebuilt station archive cannot lag its own inventory for ever on a machine that downloaded it once.