I was using google colab and using this code to access my google drive:
from google.colab import drive
drive.mount('/content/gdrive')
It works well but the authentification doesn't last long and I don't want to re-enter my credentials all the time. So I tried to use Pydrive to save my credentials to a file (using this answer):
!pip install pydrive
from pydrive.auth import GoogleAuth
from pydrive.drive import GoogleDrive
from google.colab import auth
from oauth2client.client import GoogleCredentials
gauth = GoogleAuth()
gauth.LoadCredentialsFile("mycreds.txt")
gauth.Authorize()
drive = GoogleDrive(gauth)
but I can only write files remotely with this solution, and I would like to be able to mount my google drive entirely so that I can easily use unix commands. Is there a way to do that?