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.10.tar.gz
(71.0 kB
view details)
Built Distribution
cloudsync-0.1.10-py3-none-any.whl
(278.6 kB
view details)
File details
Details for the file cloudsync-0.1.10.tar.gz
.
File metadata
- Download URL: cloudsync-0.1.10.tar.gz
- Upload date:
- Size: 71.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.21.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c4730746baafb8618328e2584a8dca3254c02e1061fb37a37ff341f183d17b93 |
|
MD5 | 786d42f18937677bce937af432cd0ea9 |
|
BLAKE2b-256 | 2504addb4850591a78a585b2d9da4e3dc858224d6a7870a9a63344c450f0b033 |
File details
Details for the file cloudsync-0.1.10-py3-none-any.whl
.
File metadata
- Download URL: cloudsync-0.1.10-py3-none-any.whl
- Upload date:
- Size: 278.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.21.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8f6450651be7fb62a446182c82f59051ce37cfa5ed927a230da5491c7bf256b7 |
|
MD5 | dd5f6e47f58adbf5103b0c47d4b9bdb0 |
|
BLAKE2b-256 | ecc2a73c5126b30b5b8862804ef01b9ffbc125bd7cb8257a64ed2637cbe568fe |