scopesim.server.download_utils

scopesim.server.download_utils#

Used only by the database and github_utils submodules.

Functions

create_client(base_url[, cached, cache_name])

Create httpx Client instance, should support cache at some point.

create_retriever(collection[, save_dir, url])

Create Pooch retriever and load example data registry.

get_base_url()

Get instrument package server URL from rc.__config__.

get_local_packages_path()

Get local instrument package save directory from rc.__config__.

get_server_folder_contents(client, dir_name)

Find all zip files in a given server folder.

handle_download(client, sub_url, save_path)

Perform a streamed download and write the content to disk.

handle_unzipping(save_path, save_dir, ...)

Unpack a zipped folder, usually called right after downloading.

send_get(client, sub_url[, stream, params])

Send a GET request (streamed or not) using an existing client.

Exceptions

ServerError

Some error with the server or connection to the server.