Answer the question
In order to leave comments, you need to log in
How to copy .db files from Google Drive?
How can I copy .db files from google drive that are created according to the sqlite3 structure. I write code in Python.
file_db = open('DataBaseUserID.db', 'rb')
file_db.close()
gauth = GoogleAuth()
auth_url = gauth.CommandLineAuth()
drive = GoogleDrive(gauth)
file_list = drive.ListFile({'q': "path_folder in parents and trashed=false"}).GetList()
file_obj = drive.CreateFile({'id': file_list[0]['id']})
file_obj.Trash()
file_obj = drive.CreateFile({'title': 'DataBaseUserID.db', 'mimeType': 'text/txt',
"parents": [
{"kind": "drive#fileLink", "id": path_folder}]})
file_obj.SetContentFile('DataBaseUserID.db')
file_obj.Upload()
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question