Skip to main content

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

Project description

cloudsync README

Python Cloud Synchronization Library

Installation

pip install cloudsync

# install provider support
pip install cloudsync-gdrive

Links

Example

import cloudsync

# local file provide + gdrive provider
local = cloudsync.get_provider("file")
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

This version

1.4.1

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.1.tar.gz (171.0 kB view details)

Uploaded Source

Built Distribution

cloudsync-1.4.1-py3-none-any.whl (161.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for cloudsync-1.4.1.tar.gz
Algorithm Hash digest
SHA256 154efa2c8fb044f674db4a5d0ee6a9f34a018a41dc87d4d53464ea6dc153eab5
MD5 ccf536e224d07630797e0d8bb5f447ff
BLAKE2b-256 ae36a78586b6666c3fbf46b60c660160c26ce091e79a866e322461fee7198801

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for cloudsync-1.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 107df1e6d41343686649b90b3bbd1ff750c4eef2aef45241754c9c8270775969
MD5 6573a623f4badabd791be045ccab1932
BLAKE2b-256 4c8ab144cfbf8a9ecddd269c1d4a9557bf211203bca95b080b1e12add9694229

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