scopesim.server.download_utils module¶
Used only by the database and github_utils submodules.
- exception scopesim.server.download_utils.ServerError[source]¶
Bases:
Exception
Some error with the server or connection to the server.
- scopesim.server.download_utils.create_client(base_url, cached: bool = False, cache_name: str = '')[source]¶
Create httpx Client instance, should support cache at some point.
- scopesim.server.download_utils.get_server_folder_contents(client, dir_name: str, unique_str: str = '.zip$') Iterator[str] [source]¶
Find all zip files in a given server folder.
- scopesim.server.download_utils.handle_download(client, pkg_url: str, save_path: Path, pkg_name: str, padlen: int, chunk_size: int = 128, disable_bar=False) None [source]¶
Perform a streamed download and write the content to disk.