Skip to main content

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)

  1. Login

Start google authentication in console, and generate token.json file to '~/.comcomdrive' path.

$ comcomdrive login
  1. 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 hashes)

Uploaded Source

Built Distribution

comcomdrive-0.0.6-py3-none-any.whl (6.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page