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.7a1.tar.gz
(103.1 kB
view details)
Built Distribution
cloudsync-0.3.7a1-py3-none-any.whl
(428.0 kB
view details)
File details
Details for the file cloudsync-0.3.7a1.tar.gz
.
File metadata
- Download URL: cloudsync-0.3.7a1.tar.gz
- Upload date:
- Size: 103.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.22.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 258ed0d73c87e360b8e756c8e9c7c9b2726323553d946e176263cfb6b15aa69f |
|
MD5 | 0e0c7f0660ed4449a984de61ae2a0389 |
|
BLAKE2b-256 | 8a6291ee301afaa7a816799c5311ff69a6d51bae6ea6d499f4203ba757458366 |
File details
Details for the file cloudsync-0.3.7a1-py3-none-any.whl
.
File metadata
- Download URL: cloudsync-0.3.7a1-py3-none-any.whl
- Upload date:
- Size: 428.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.22.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d20a03d278664ad9514c4e8b7a576de01df7f4b3e89eade84af7e22f956c4dc3 |
|
MD5 | cd3b9116eb29f3605e637a671f1897c7 |
|
BLAKE2b-256 | 5e976dcfcb4ed256e81983e16d88e23e6f5a09d6b227d7cf1366ec427f148306 |