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.18a1.tar.gz
(186.2 kB
view details)
Built Distribution
cloudsync-1.3.18a1-py3-none-any.whl
(179.0 kB
view details)
File details
Details for the file cloudsync-1.3.18a1.tar.gz
.
File metadata
- Download URL: cloudsync-1.3.18a1.tar.gz
- Upload date:
- Size: 186.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.22.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 77b717be4ae0c3cb1c300b48dd55e1b3688e59315514fbf49422a84fc41449c7 |
|
MD5 | ad5cae2905ab3d2305be7f6dd8938ea2 |
|
BLAKE2b-256 | 3ab237310321461c7c6c96afa1eb5dca1cab1ed3120d53e9f84890bbadafb68f |
File details
Details for the file cloudsync-1.3.18a1-py3-none-any.whl
.
File metadata
- Download URL: cloudsync-1.3.18a1-py3-none-any.whl
- Upload date:
- Size: 179.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.22.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4afcf0939f4b10777e983eb7c4e13cb7cfe38e0def6ebfbdf7df6e4963cdf56a |
|
MD5 | fdd7fb72c97aac0eda07958fb90daf59 |
|
BLAKE2b-256 | 753dc29451c9edadd83a3d3f6025db64c97b0a2215b4e2e47639fe09c58be414 |