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

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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for cloudsync-1.4.1a2.tar.gz
Algorithm Hash digest
SHA256 d23ef0ae00b0b4d47f777082573274a1bf506c9811b2a6e9bbc6a92271c5b7db
MD5 b1dd42b4bbb7dbfa01c3894cef7c1ec4
BLAKE2b-256 f177bf385108702a81a8114df801028cc2508f74845cc267108ad1b4fdee54a5

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for cloudsync-1.4.1a2-py3-none-any.whl
Algorithm Hash digest
SHA256 84bf588f3842f1e3c5d9afbf710026b73c0b538af7f3568841425fef08e9f328
MD5 4e9511cc99227cbb6d5bea5b1d676f1a
BLAKE2b-256 a826b074c848c53dded3568a91457d9d2d58806b6fb32e325a13649262a9032e

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