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

Uploaded Source

Built Distribution

cloudsync-1.4.3-py3-none-any.whl (164.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for cloudsync-1.4.3.tar.gz
Algorithm Hash digest
SHA256 15b53b07b17730a95f6efa666db1779c9dba1f53c45b5b813d2b1f5de21ba558
MD5 704bbad340dded460321df352a87a2c9
BLAKE2b-256 a0ae246dc95a3893bc88104b3ffd2007b9f3429e32d72ad015c29cb02d969fd9

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for cloudsync-1.4.3-py3-none-any.whl
Algorithm Hash digest
SHA256 e987bf39205493434c2ac535e6f30d5ad2b0606865a53e1fb74abfa6f11722b8
MD5 dcf9f3fe69d706079f58a985317bd69a
BLAKE2b-256 42dfbdc5a81df180b049d08e9a8e8db5a4c3873aa7dafefa4aaf0b4c766f1752

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