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.2.13.tar.gz
(90.7 kB
view details)
Built Distribution
cloudsync-0.2.13-py3-none-any.whl
(383.0 kB
view details)
File details
Details for the file cloudsync-0.2.13.tar.gz
.
File metadata
- Download URL: cloudsync-0.2.13.tar.gz
- Upload date:
- Size: 90.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.22.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 566e883f0d4faf318974e2b614692cb0df56ce649e22b72789a1cd8425c33980 |
|
MD5 | e3612db23d833f8b82aa69a7472b202d |
|
BLAKE2b-256 | 1dfa553165f4b58704f2482c968b364bc1fbc294c01dfbae8792ae31494f5a3a |
File details
Details for the file cloudsync-0.2.13-py3-none-any.whl
.
File metadata
- Download URL: cloudsync-0.2.13-py3-none-any.whl
- Upload date:
- Size: 383.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.22.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5372e2c62f4fa214dbbe5f218ac63fc70fd044ba37d2459f37dbade6c619126c |
|
MD5 | d866c12724a6242c19b38f60c559b494 |
|
BLAKE2b-256 | 664d18c31ef480a75d4a1ea93d7daf971d1e07a72a0dc017df6859ac85f249de |