Skip to main content

cloudsync enables simple cloud file-level sync with a variety of cloud providers

Project description

Build Status Code Coverage

cloudsync README

Python Cloud Synchronization Library

Installation

pip install cloudsync

# install provider support
pip install cloudsync-gdrive

Links

Command-line Example

cloudsync sync --help

cloudsync sync file:c:/users/me/documents gdrive:/mydocs

# on linux you can pass -D for 'daemon mode', which will detatch and run in the background

Code Example

import cloudsync

# local file provide + gdrive provider
local = cloudsync.get_provider("filesystem")
remote = cloudsync.get_provider("gdrive")

# oauth
creds = remote.authorize()

# connect with creds
remote.connect(creds)

# root for sync
roots = ("/home/me/gd", "/")

# new sync engine
sync = cloudsync.CloudSync((local, remote), roots)

sync.start()

# should sync this file as soon as it's noticed by watchdog
with open("/home/me/gd/hello.txt", "w") as f:
    f.write("hello")

# wait for sync
while not remote.exists_path("/home/alice/hello.txt"):
    time.sleep(1)

# rename in the cloud
remote.rename("/hello.txt", "/goodbye.txt")

# wait for sync
while not local.exists_path("/home/alice/goodbye.txt"):
    time.sleep(1)

print("synced")

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cloudsync-1.4.13.tar.gz (223.6 kB view details)

Uploaded Source

Built Distribution

cloudsync-1.4.13-py3-none-any.whl (187.2 kB view details)

Uploaded Python 3

File details

Details for the file cloudsync-1.4.13.tar.gz.

File metadata

  • Download URL: cloudsync-1.4.13.tar.gz
  • Upload date:
  • Size: 223.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.23.0

File hashes

Hashes for cloudsync-1.4.13.tar.gz
Algorithm Hash digest
SHA256 70f167ebe9499ce5c3863874eece54a0789f09fbf5ecbb410a90e3a02bebae01
MD5 748410b2cc636bced21fac21574b163d
BLAKE2b-256 c7fcf014d9a8ceb94ea191393d58fd7195c0a0664ed7a80cddddef558ded9b01

See more details on using hashes here.

File details

Details for the file cloudsync-1.4.13-py3-none-any.whl.

File metadata

  • Download URL: cloudsync-1.4.13-py3-none-any.whl
  • Upload date:
  • Size: 187.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.23.0

File hashes

Hashes for cloudsync-1.4.13-py3-none-any.whl
Algorithm Hash digest
SHA256 209247770610f887aad72c88fd7e21020b7f20fa78ad6242381f74447fc9f374
MD5 41f18107c15352e3e1757c9663e5cf47
BLAKE2b-256 1ec809a91867fae776f0994d10392c4fca5a23cc6d76bdd83d95db119630673a

See more details on using hashes here.

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