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.34.tar.gz
(81.5 kB
view details)
Built Distribution
cloudsync-0.1.34-py3-none-any.whl
(335.1 kB
view details)
File details
Details for the file cloudsync-0.1.34.tar.gz
.
File metadata
- Download URL: cloudsync-0.1.34.tar.gz
- Upload date:
- Size: 81.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.21.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 18e3d197c428b4e16251ea0d5155217ffab66daa9185853dcb983275ffb84169 |
|
MD5 | d2929b5e9558a7b086e7daee4a2c1a07 |
|
BLAKE2b-256 | c6087595e886c15d5637aeb14015a1ddf92f143d3d40078b0a02a74556eb8cc2 |
File details
Details for the file cloudsync-0.1.34-py3-none-any.whl
.
File metadata
- Download URL: cloudsync-0.1.34-py3-none-any.whl
- Upload date:
- Size: 335.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.21.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d7828c95adfdb8ac697d8a0769c0749ad713658ac66bdd225061864958eafd53 |
|
MD5 | dcf6c4b38043fcb9fb0aacb2926c652b |
|
BLAKE2b-256 | 183874b6092381fa1048c619b3ab140c2174676b8ca89c810586cee258ebcb54 |