跳转到主要内容

包含tentaclio的gdrive模式所有依赖项的Python项目。

项目描述

tentaclio-gdrive

包含gdrive tentaclio模式所有依赖项的包。

快速开始

此项目附带一个Makefile,可执行基本常见任务。

$ make help
install                       Initalise the virtual env installing deps
clean                         Remove all the unwanted clutter
lock                          Lock dependencies
update                        Update dependencies (whole tree)
sync                          Install dependencies as per the lock file
lint                          Lint files with flake and mypy
format                        Run black and isort
test                          Run unit tests
circleci                      Validate circleci configuration (needs circleci cli)

配置对Google Drive的访问。

Google Drive支持是实验性的,应自行承担风险。此外,由于Google Drive本身,它相对较慢。

  1. 获取凭据。首先,我们需要一个凭据文件,以便能够生成令牌。最简单的方法是访问此示例,点击启用Drive API。给项目一个您选择的名称(例如tentaclio)。点击APIs and services -> Credentials -> Create credentials -> 创建OAuth客户端ID,选择 桌面应用下载JSON`

  2. 生成令牌文件

pipenv install tentaclio && \
    pipenv run python -m tentaclio_gdrive google-token generate --credentials-file ~/Downloads/credentials.json

这将在浏览器中打开一个Google身份验证页面,登录并接受授权请求。令牌文件已保存在默认位置 '~/.tentaclio_google_drive.json'。您也可以通过env变量TENTACLIO__GOOGLE_DRIVE_TOKEN_FILE进行配置

  1. 删除credentials.json 文件credentials.json 文件不再需要,您可以根据需要删除它。

项目详情


下载文件

下载适合您平台的文件。如果您不确定选择哪一个,请了解更多关于安装包的信息。

源代码分发

tentaclio-gdrive-0.0.3.tar.gz (10.6 kB 查看哈希值)

上传时间 源代码

构建分发

tentaclio_gdrive-0.0.3-py2.py3-none-any.whl (9.8 kB 查看哈希值)

上传时间 Python 2 Python 3

由以下支持