Metadata-Version: 2.1
Name: cloudsync
Version: 1.4.6
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: dataclasses
Requires-Dist: pystrict
Requires-Dist: msgpack
Requires-Dist: requests_oauthlib
Requires-Dist: python-daemon
Requires-Dist: xxhash
Requires-Dist: urllib3>=1.25.3
Requires-Dist: cloudsync-gdrive ; extra == "all"
Requires-Dist: cloudsync-onedrive ; extra == "all"
Requires-Dist: boxsdk[jwt] ; extra == "all"
Requires-Dist: dropbox ; extra == "all"
Requires-Dist: boxsdk ; extra == "all"
Requires-Dist: boxsdk ; extra == "box"
Requires-Dist: boxsdk[jwt] ; extra == "boxcom"
Requires-Dist: dropbox ; extra == "dropbox"
Requires-Dist: cloudsync-gdrive ; extra == "gdrive"
Requires-Dist: cloudsync-onedrive ; extra == "onedrive"
Provides-Extra: all
Provides-Extra: box
Provides-Extra: boxcom
Provides-Extra: dropbox
Provides-Extra: gdrive
Provides-Extra: onedrive

<!--
[![Build Status](https://travis-ci.com/AtakamaLLC/cloudsync.svg?branch=master&token=WD7aozR2wQ3ePGe1QpA8)](https://travis-ci.com/AtakamaLLC/cloudsync)
[![Code Coverage](https://codecov.io/gh/AtakamaLLC/cloudsync/branch/master/graph/badge.svg?token=ebhElkq1eO)](https://codecov.io/gh/AtakamaLLC/cloudsync)
-->

# cloudsync README

Python Cloud Synchronization Library

## Installation

```bash
pip install cloudsync

# install provider support
pip install cloudsync-gdrive
```

## Links

*   [Documentation](https://atakama-llc-cloudsync.readthedocs-hosted.com/en/latest/)
*   [Source Code + Issue Tracker](https://github.com/AtakamaLLC/cloudsync)

## Example

```python
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")
```

