google drive functions for jupyter notebook
Project description
How to use comcomdrive
Comcomdrive is package which enables to use google drive in Ainize workspace.
Prerequisite
Google desktop client credential is required and sholud be located '~/.comcomdrive'
Installation
$ pip3 install comcomdrive
Usage
Command-line interface(cli)
- Login
Start google authentication in console, and generate token.json file to '~/.comcomdrive' path.
$ comcomdrive login
- Search
Receive keyword by prompt, and return list(id, and name) of file the name of which contains keyword.
$ comcomdrive search
Authentication class
from comcomdrive import auth
auth.Auth().login()
Search class
from comcomdrive import search
search.Search().list_all_files()
search.Search().search_keyword('file_keyword')
Transfer class
from comcomdrive import transfer
# upload file to root folder
transfer.Transfer().upload_file('src_file')
# create new dest folder and upload file to the folder
transfer.Transfer().upload_file('src_file', 'dest')
# download file or folder with id
transfer.Transfer().download_file('1j-MBEcJr8RHblsQPitI33mI5cPI-CgZ9')
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
comcomdrive-0.0.6.tar.gz
(5.1 kB
view details)
Built Distribution
File details
Details for the file comcomdrive-0.0.6.tar.gz
.
File metadata
- Download URL: comcomdrive-0.0.6.tar.gz
- Upload date:
- Size: 5.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4395d1c3842e46574bb044961cc1cc26de73b91c7ce536be3757172c2589b031 |
|
MD5 | 627099130aca664e44a0aea942359d14 |
|
BLAKE2b-256 | a71fbe1fa2e6a47c194153794aa250d19911158a7a580175032b1e1d99efef12 |
Provenance
File details
Details for the file comcomdrive-0.0.6-py3-none-any.whl
.
File metadata
- Download URL: comcomdrive-0.0.6-py3-none-any.whl
- Upload date:
- Size: 6.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ca0c3b8567e63c6e9c3cded156fd699b35809fe736ac1dbfccf2282f5c3b5b48 |
|
MD5 | 869d7391472d1abeabd54ad04e7a3698 |
|
BLAKE2b-256 | 0eb38c6b6183392c36ea9fc7f7e6581e0af71c01e7d936bc9a361567e06bac70 |