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.3.10.tar.gz
(107.0 kB
view details)
Built Distribution
cloudsync-0.3.10-py3-none-any.whl
(445.9 kB
view details)
File details
Details for the file cloudsync-0.3.10.tar.gz
.
File metadata
- Download URL: cloudsync-0.3.10.tar.gz
- Upload date:
- Size: 107.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.22.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4cbca81de630a2a661e0b1cdafad7581e6c3ed631300a520d1af3f0d7a963f15 |
|
MD5 | 87cd768948555ded0fd3a0728400a862 |
|
BLAKE2b-256 | e34e9e111d13697efcc9435dfaf736a840a8d4178588c4cd92f5ed6f8e2f51d1 |
File details
Details for the file cloudsync-0.3.10-py3-none-any.whl
.
File metadata
- Download URL: cloudsync-0.3.10-py3-none-any.whl
- Upload date:
- Size: 445.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.22.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c40c54d6e3d768f47137fad218e8291aecee2de088e8633ede8dd0df1374525f |
|
MD5 | 639ebc416dff8e796abeb385cc2d18e8 |
|
BLAKE2b-256 | 014ea9239a79f60248e48a2872b4b6671041177d3b917eeb928f43e0b2c76f03 |