Questions tagged [pydrive2]

4 questions
2
votes
1 answer

How to distinguish between same-named files and directories in Google Drive using fsspec in Python?

I am working with Google Drive in Python using fsspec to perform various operations like listing and downloading files and directories. However, I have encountered a challenge when dealing with items that share the same name. For example, there…
muhammad ali e
  • 655
  • 6
  • 8
1
vote
0 answers

PyDrive2 download any kind of file from Shared Google Drive

I am trying to download a bunch of files from a shared folder in Google Drive. While I am able to download some files, I get errors on different kinds of files. Note that, I am forcing the files to be exported to text/plain. Below is the code and…
user1717931
  • 2,419
  • 5
  • 29
  • 40
0
votes
0 answers

PyDrive2 uploading files to google drive

import sys import os from pydrive2.drive import GoogleDrive from authentication import AUTH drive = GoogleDrive(AUTH) content = drive.ListFile({'q': 'title = "Python"'}).GetList() file = drive.CreateFile( { 'title':…
phpjunkie
  • 3
  • 3
0
votes
0 answers

pydrive2: Is Authorize() needed after Refresh()?

I'm writing a function that logs in a user to their Google Drive using OAuth 2.0. It returns the authenticated drive object. Here's my code: def login_with_account(): gauth = GoogleAuth() if 'credentials.json' in os.listdir(): …
JavaPilgrim
  • 77
  • 1
  • 6