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.7.tar.gz
(195.1 kB
view details)
Built Distribution
cloudsync-1.4.7-py3-none-any.whl
(169.1 kB
view details)
File details
Details for the file cloudsync-1.4.7.tar.gz
.
File metadata
- Download URL: cloudsync-1.4.7.tar.gz
- Upload date:
- Size: 195.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.23.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0feb9e74b592ce3b9fc0b9d06fb97dd729b294682ed0e76997bd1ee2a221cc5e |
|
MD5 | bb4b405f9aa156873fe26c498947071d |
|
BLAKE2b-256 | d5da918619a3dde64b9720b81b077271c4507e5378260c93400dde20a603649e |
File details
Details for the file cloudsync-1.4.7-py3-none-any.whl
.
File metadata
- Download URL: cloudsync-1.4.7-py3-none-any.whl
- Upload date:
- Size: 169.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.23.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e5a2a5b161650690eb5808e8cb3c3a73c4f607c8b15f5493e6b415aca4a53157 |
|
MD5 | 1cecaf43371917928a846a6a219339ee |
|
BLAKE2b-256 | 2fcc59ac1581c32bd64b6bec6e605e743eb01b40f655fb9a8b01b07ec6b4c29f |