singlestoredb.management.workspace.Stage.download_file

Stage.download_file(stage_path: str | PathLike[str], local_path: str | PathLike[str] | None = None, *, overwrite: bool = False, encoding: str | None = None) bytes | str | None

Download the content of a stage path.

Parameters:
  • stage_path (Path or str) – Path to the stage file

  • local_path (Path or str) – Path to local file target location

  • overwrite (bool, optional) – Should an existing file be overwritten if it exists?

  • encoding (str, optional) – Encoding used to convert the resulting data

Returns:

  • bytes or str - local_path is None

  • None - local_path is a Path or str