Example #1
0
def remote_tmpdir(gdrive: GoogleDrive) -> DriveFolder:
    tmpdir = gdrive.create_path(remote_tmpdir_prefix)
    yield tmpdir
    tmpdir.remove()
Example #2
0
 def from_path(cls, creds_json, rootpath, *args, **kwargs) -> cls:
     drive = GoogleDrive(creds_json)
     root = drive.create_path(rootpath)
     new_obj = cls(root, *args, **kwargs)
     new_obj.creator = "from_path"
     return new_obj
 def from_path(cls, creds_json, rootpath, *args, **kwargs) -> cls:
     drive = GoogleDrive(creds_json)
     root = drive.create_path(rootpath)
     return cls(root, *args, **kwargs)