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.13.tar.gz
(73.4 kB
view details)
Built Distribution
cloudsync-0.1.13-py3-none-any.whl
(292.1 kB
view details)
File details
Details for the file cloudsync-0.1.13.tar.gz
.
File metadata
- Download URL: cloudsync-0.1.13.tar.gz
- Upload date:
- Size: 73.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.21.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 598d1e0c0b1f32500f9dabda75c80579bb258703922b5ef83aa0efdb5641364e |
|
MD5 | 0a871185b0f3032845e0cea09b3dab70 |
|
BLAKE2b-256 | ce0a6db520cbf85c4efa25c663ed7d27a19d9ce89d329d0b01a6c14d29a3aebc |
File details
Details for the file cloudsync-0.1.13-py3-none-any.whl
.
File metadata
- Download URL: cloudsync-0.1.13-py3-none-any.whl
- Upload date:
- Size: 292.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.21.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a800761d734eafc8839b9ec96e98c59618d46166133c705c5d06404fef26efec |
|
MD5 | 3e81a5e3339149b1edefda0580fa294c |
|
BLAKE2b-256 | 43cd2a8136e7b697426af038c16d5cf678de37e12452d05007f9410ab0dcc0f7 |