uvex_transients.surveys.utils.download_schedule_from_url#
- uvex_transients.surveys.utils.download_schedule_from_url(url: str, path: str | Path, overwrite: bool = False, timeout: float | None = None, show_progress: bool = True) Path[source]#
Download a remote schedule file to a local path.
A thin wrapper around
download_file()that saves the result to an explicit, permanent location rather than leaving it in astropy’s own (evictable) cache – for a durable local copy you can reload later (e.g. viaQTable.reador, once paired with aninstrument_fov,from_disk()) without depending on the remote URL still being reachable. If you just want a QTable and don’t care where the bytes end up,get_schedule()avoids this step entirely.- Parameters:
url (
str) – Direct HTTP/HTTPS URL to the schedule file.path (
strorPath) – Local destination path. Parent directories are created as needed.overwrite (
bool) – Whether to overwrite an existing file atpath.timeout (
float, optional) – Timeout in seconds for the network request, or None (the default) to useconfig["surveys.download_timeout"]– itself None (astropy’s own default) out of the box.show_progress (
bool) – Whether to show a progress bar while downloading.
- Returns:
path, for convenience chaining.- Return type:
- Raises:
FileExistsError – If
pathalready exists andoverwriteis False.