合作:我可以访问我的Google驱动器文件夹和文件吗? [英] Colaboratory: Can I access to my Google drive folder and file?

查看:113
本文介绍了合作:我可以访问我的Google驱动器文件夹和文件吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Google合作实验室确实很棒,但是如果我无需使用标准的Google驱动器API即可访问我的所有Google驱动器文件,这将更加有用.

Google Colaboratory is really cool, but it would be more useful if I can access all my google drive files, without using standard google drive API.

这可能且容易吗?以及如何?

Is it possible and easy? and how?

推荐答案

以下是使用FUSE Drive接口访问本地文件之类的Drive文件的示例: https://colab.research.google.com/notebook#fileId=1srw_HFWQ2SMgmWIawucXfusGzrj1>

Here's an example of using a FUSE Drive interface to access your Drive files like local files: https://colab.research.google.com/notebook#fileId=1srw_HFWQ2SMgmWIawucXfusGzrj1_U0q

简而言之:

# Load the Drive helper and mount
from google.colab import drive
drive.mount('/content/drive')

执行上述代码后,您的云端硬盘文件将出现在/content/drive/My Drive中.

After executing the code above, your Drive files will be present in /content/drive/My Drive.

我猜您还找到了捆绑的示例I/O笔记本,该笔记本还显示了如何使用Python API访问文件. (这需要较少的配置.) https://colab.research. google.com/notebook#fileId=/v2/external/notebooks/io.ipynb&scrollTo=c2W5A2px3doP

I'm guessing you also found the bundled example I/O notebook, which shows how to use Python APIs to access files as well. (This requires a bit less configuration.) https://colab.research.google.com/notebook#fileId=/v2/external/notebooks/io.ipynb&scrollTo=c2W5A2px3doP

这篇关于合作:我可以访问我的Google驱动器文件夹和文件吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆