Questions tagged [pydrive]

PyDrive is a wrapper library of google-api-python-client that simplifies many common Google Drive API tasks.

PyDrive is a wrapper library of google-api-python-client that simplifies many common Google Drive API tasks.

269 questions
1
vote
1 answer

Authenticating to download an excel file from google drive (python)

I want to download an excel file that's hosted on google docs. I have the file link (and thus the file id) and want to automate the process. One thing to note is that I don't own the file, but my google account has permission to read it. I've seen…
1
vote
0 answers

Flask Session and Google Oauth

I'm working on a simple web application to list google drive information for a currently logged in user using Flask session and Google OAuth. I'm running a DO droplet with Nginx and WSGI to serve the application. When I test the application locally,…
1
vote
1 answer

Make a deep copy of Google Drive file

Is it possible to perform a "deep" copy of Google Drive files, so that the copied file doesn't point to the same file object as the original? I'd like to be able to copy a file and have the copy be completely independent of the original, such that…
Ryan
  • 3,555
  • 1
  • 22
  • 36
1
vote
1 answer

Pydrive docx file upload not restoring bookmark links

I have a python script that creates a docx file using python-docx. The document file has hyperlinks set to the bookmarks linked inside the document paragraphs. It shows correctly if I open the document within my laptop. But when I open the document…
rain
  • 363
  • 6
  • 15
1
vote
1 answer

Is there a way to modify google document with python script?

I am using python and writing a script to create a google document with PyDrive, upload it to google drive and modify the document as well. I am following the instructions from pydrive documentation (https://pypi.org/project/PyDrive/). So far, I am…
rain
  • 363
  • 6
  • 15
1
vote
1 answer

from pydrive.auth import GoogleAuth > cannot import name 'mtls' from 'google.auth.transport

I am trying to read csv from google drive. when I run those lines from pydrive.auth import GoogleAuth from pydrive.drive import GoogleDrive it says: cannot import name 'mtls' from 'google.auth.transport …
rafine
  • 361
  • 3
  • 18
1
vote
0 answers

PyDrive upload speed is too slow

I'm using PyDrive to upload files from my RPi to a specific folder in my Google Drive. It is successfully working, but the speed is terribly slow. For a .npy file (binary numpy file) that is only 40kB, the upload speed is around 2 seconds. When I…
Joseph
  • 11
  • 2
1
vote
0 answers

PyDrive Get the Backup List

I want to write a script that downloads backups from Google Drive. Then i will alter the backup and download it again. I want to do it with PyDrive or directly Google Drive API but I couldn't find any documentation about "backups". I can search,…
1
vote
1 answer

Fail to authenticate with pydrive to google drive

I am following the instruction to use PyDrive on this documentation link and after running this part from pydrive.auth import GoogleAuth gauth = GoogleAuth() gauth.LocalWebserverAuth() # Creates local webserver and auto handles…
GePlusE
  • 13
  • 10
1
vote
0 answers

How to share files with pydrive

I can't find the way to share Google drive files after I upload them, currently I'm using Python and PyDrive . I'm not even sure if this is even possible. Sharing is a Google Drive option, it's allows other users to access use it(read, comment or…
sinder
  • 31
  • 4
1
vote
1 answer

Google drive API: get the shareable publicly link of a video uploaded

I'm using pydrive library in order to get the shareable link of a video that I uploaded in a shared google drive folder, but I get the download link instead. Here is part of my code: folderName = 'Videos' # Please set the folder name. folders =…
Sandra
  • 13
  • 4
1
vote
1 answer

Pydrive : How to read file from Shared Drive?

I successsed to have all my shared drive IDs but when I am trying to read these it returns me empty an list: for myfile in file_list: if myfile['id'] == 'file_id' and myfile['title'] == 'file_tittle' : file_list = …
Hasttte
  • 33
  • 4
1
vote
1 answer

PyDrive - Erase contents of a file

Consider the following code that uses the PyDrive module: from pydrive.auth import GoogleAuth from pydrive.drive import GoogleDrive gauth = GoogleAuth() gauth.LocalWebserverAuth() drive = GoogleDrive(gauth) file = drive.CreateFile({'title':…
sanitizedUser
  • 1,723
  • 3
  • 18
  • 33
1
vote
1 answer

is there a way to upload an entire folder to google drive using pydrive?

I'm doing a python script which periodically upload a folder to Google Drive, but got stuck when I had to load subfolders. Is there any way to upload an entire folder? Maybe with a loop but I have no idea how to do it. Below is an example of a…
SAL
  • 547
  • 2
  • 8
  • 25
1
vote
1 answer

Python: PermissionError: [Errno 13] Permission denied with pydrive?

Here's my code for a very simple program: import os, shutil from pydrive.auth import GoogleAuth from pydrive.drive import GoogleDrive source_path = r"c:/users/x/appdata/roaming/medianxl/save" destination_path =…
ajdbnabad13
  • 355
  • 3
  • 11