cloudsync enables simple cloud file-level sync with a variety of cloud providers
Project description
cloudsync README
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-1.3.20a10.tar.gz
(186.6 kB
view details)
Built Distribution
cloudsync-1.3.20a10-py3-none-any.whl
(179.6 kB
view details)
File details
Details for the file cloudsync-1.3.20a10.tar.gz
.
File metadata
- Download URL: cloudsync-1.3.20a10.tar.gz
- Upload date:
- Size: 186.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.22.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d926fbdfcd36a6e2fdfca57497d042c4c1ce528d753743df314fa55d949ebfe5 |
|
MD5 | 1b8c93a68d4b6a8b09be8f40138bb967 |
|
BLAKE2b-256 | a5f87c6fcc3659cefc90b8ad3c22f69f203a101acbdd14944a92701b398ea5a9 |
File details
Details for the file cloudsync-1.3.20a10-py3-none-any.whl
.
File metadata
- Download URL: cloudsync-1.3.20a10-py3-none-any.whl
- Upload date:
- Size: 179.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.22.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bf48add909750b998c7707d2bae9b1ef3bc7e1069cff4b0fe16379e5debf2978 |
|
MD5 | 42a75bc4ca1853397b214c86438aa669 |
|
BLAKE2b-256 | af124e7df5db5715d6436d3b8771eeb98c8ace016d96b3b7e51b4d835858fe48 |