Skip to main content

Thieves is a concurrent, thread-safe Google Drive uploader library.

Project description

thieves

Thieves is a concurrent, thread-safe Google Drive uploader library.

Usage

Thieves uses pydrive which requires credentials from a Cloud Platform project. You can create one by clicking 'Enable the Drive API' here: https://developers.google.com/drive/api/v3/quickstart/python. Then save the file 'credentials.json' and rename it to 'client_secrets.json'. Now you can start writing code!

First, create a Thief. A Thief is a concurrent, thread-safe uploader that will upload all files in a folder it is given.

import thieves

folder = Thief(<path>)

Now that you have created a Thief, you have to authenticate with Google Drive.

folder = Thief(<path>)
folder.auth()

The first time you authenticate it will open in a web browser and allow your Cloud Platform project to connect. Afterwards, Thieves will automatically save your credentials to a file and will refer to those instead.

folder = Thief(<path>)
folder.auth()
folder.upload()

Now that you have authenticated you can upload the folder.

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

thieves-0.1.1.tar.gz (2.7 kB view hashes)

Uploaded Source

Built Distribution

thieves-0.1.1-py2.py3-none-any.whl (8.6 kB view hashes)

Uploaded Python 2 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