Skip to main content

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

Project description

cloudsync

Python Cloud Synchronization Library

pip install cloudsync

Example:

from cloudsync import CloudSync, CloudSyncProvider

local = CloudSyncProvider("local", path="/usr/home/alice/test", monitor=True)

remote = CloudSyncProvider("gdrive", path="/test-folder")

remote.connect()

sync = CloudSync(local, remote)

sync.start()

with open("/usr/home/alice/test/hello.txt", "w") as f:
    f.write("hello")

# give the monitor a second to notice the change
# alternatively we can "poke" the local provider, forcing a sync

time.sleep(1)

sync.wait(timeout=10)

# using no_poke to deliberately trick our sync into *not* knowing about the rename 
remote.rename("/test-folder/hello.txt", "/test-folder/goodbye.txt", no_poke=True)

# we should still sync properly because of the event cursor
while not os.path.exists("/usr/home/alice/test/goodbye.txt"):
    time.sleep(1)

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

Uploaded Source

Built Distribution

cloudsync-0.1.15-py3-none-any.whl (294.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for cloudsync-0.1.15.tar.gz
Algorithm Hash digest
SHA256 8a50b06f4e63c0c0b182cc0547f1e38dd36298fd231347b312b28abe933219b6
MD5 023f4a16900da9d271c32b0c3fce624a
BLAKE2b-256 310ab5600932b0c63d6e94a5bcc63ce3939654c884c0fcdb336dd5d5b89cb543

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for cloudsync-0.1.15-py3-none-any.whl
Algorithm Hash digest
SHA256 05ed4b2359a4b4bfae39f49f81d405f77d1bea49f379b75b2c2fb779ab391ec1
MD5 f2e4c97601adb0f1c17c03a6cff040f9
BLAKE2b-256 941176411cccb214b44a0aba8119acb4c8d959085163a6fad1462a52c12d94a6

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