leaf_engine.io.gdrive.upload ============================ .. py:module:: leaf_engine.io.gdrive.upload Functions --------- .. autoapisummary:: leaf_engine.io.gdrive.upload.upload_to_drive Module Contents --------------- .. py:function:: upload_to_drive(local_path: Union[str, pathlib.Path], drive_path: str, overwrite: bool = False) -> str Uploads file to Google Drive. :param local_path: Local path of file to upload. :type local_path: Union[str, Path] :param drive_path: Google Drive path to uploaded to. First part of path is the drive name. Must include file name: "drive_name/folder1/folder2/file_name.zip". :type drive_path: str :param overwrite: Overwrite existing file. Defaults to False. :type overwrite: bool :raises LeafGoogleDriveException: Raised if `overwrite` is False and file exists. :raises LeafGoogleDriveException: Raised if unable to upload file. :returns: Google Drive URL of uploaded file. :rtype: str