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.3.tar.gz
(170.8 kB
view details)
Built Distribution
cloudsync-1.3.3-py3-none-any.whl
(163.0 kB
view details)
File details
Details for the file cloudsync-1.3.3.tar.gz
.
File metadata
- Download URL: cloudsync-1.3.3.tar.gz
- Upload date:
- Size: 170.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.22.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 386fec3bf7c456e59899dc2fd5996471ddf54790a15212d815b47f7958be1eb3 |
|
MD5 | 95d6c3c127de2da6dff27fbb1ed12704 |
|
BLAKE2b-256 | 3d0de002bb0e52bf44ff50ec2010e55969ef67d248933d1744ae86d442fa3288 |
File details
Details for the file cloudsync-1.3.3-py3-none-any.whl
.
File metadata
- Download URL: cloudsync-1.3.3-py3-none-any.whl
- Upload date:
- Size: 163.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.22.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bc5cff1833bf0783883a1271e39629d8f34c54b5d4d79df379b71eb18a5260fc |
|
MD5 | fa2d37c405f133d7e94b66dec7318e98 |
|
BLAKE2b-256 | 8571b19a949000cbc15a4952e8b6d5b8e6c921afd415922c5b2ddbf573a74375 |