Metadata-Version: 2.1
Name: cloudsync
Version: 0.3.3.dev1
Summary: cloudsync enables simple cloud file-level sync with a variety of cloud providers
Home-page: https://github.com/atakamallc/cloudsync
License: UNKNOWN
Author: Atakama, LLC
Author-email: dev-support@atakama.com
Requires-Python: >=3.6
Description-Content-Type: text/markdown
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)
Classifier: Programming Language :: Python
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Dist: arrow
Requires-Dist: oauth2client
Requires-Dist: dataclasses
Requires-Dist: pystrict
Requires-Dist: msgpack
Requires-Dist: dropbox; extra == "dropbox"
Requires-Dist: httplib2; extra == "gdrive"
Requires-Dist: google-api-python-client; extra == "gdrive"
Requires-Dist: google-auth-httplib2; extra == "gdrive"
Requires-Dist: google-auth-oauthlib; extra == "gdrive"
Provides-Extra: dropbox
Provides-Extra: gdrive

<!-- 
[![Build Status](https://travis-ci.com/AtakamaLLC/cloudsync.svg?branch=master)](https://travis-ci.com/AtakamaLLC/cloudsync)
-->

## 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)


