cloudsync enables simple cloud file-level sync with a variety of cloud providers
Project description
cloudsync README
Python Cloud Synchronization Library
Installation
pip install cloudsync
# install provider support
pip install cloudsync-gdrive
Links
Example
import cloudsync
# local file provide + gdrive provider
local = cloudsync.get_provider("file")
remote = cloudsync.get_provider("gdrive")
# oauth
creds = remote.authorize()
# connect with creds
remote.connect(creds)
# root for sync
roots = ("/home/me/gd", "/")
# new sync engine
sync = cloudsync.CloudSync((local, remote), roots)
sync.start()
# should sync this file as soon as it's noticed by watchdog
with open("/home/me/gd/hello.txt", "w") as f:
f.write("hello")
# wait for sync
while not remote.exists_path("/home/alice/hello.txt"):
time.sleep(1)
# rename in the cloud
remote.rename("/hello.txt", "/goodbye.txt")
# wait for sync
while not local.exists_path("/home/alice/goodbye.txt"):
time.sleep(1)
print("synced")
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-1.4.6.tar.gz
(193.8 kB
view details)
Built Distribution
cloudsync-1.4.6-py3-none-any.whl
(167.8 kB
view details)
File details
Details for the file cloudsync-1.4.6.tar.gz
.
File metadata
- Download URL: cloudsync-1.4.6.tar.gz
- Upload date:
- Size: 193.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.23.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0667aa9084aeee24e5d20515f7e24fa23c94971620c3dd5451c6232af3d0b6c1 |
|
MD5 | b78cd56417931fa6c07d47c485ec8b77 |
|
BLAKE2b-256 | 786cb8e37f9b04b7f848154feeb61a2eff14db1c460ab2adab520b66c2f1d2e5 |
File details
Details for the file cloudsync-1.4.6-py3-none-any.whl
.
File metadata
- Download URL: cloudsync-1.4.6-py3-none-any.whl
- Upload date:
- Size: 167.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.23.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 81e3db11612d8316b08df292ffa04dd5d12923c27707bcdc75a516ba1f881fef |
|
MD5 | 1fb63e4b1dd516a830810f58dd9f09fc |
|
BLAKE2b-256 | af7156f15ee1d6c99a5b6664c1ea34deff5efed6ad82e798991cc19e5c7eea94 |