cloud_sync()
Sync your settings document with the cloud. Returns the revision.
"pull" takes the cloud version (backing up local edits), "push"
sends your local mirror, and "auto" picks the side that changed and
stops when both did. The mirror is cloud-settings.yml in
config_dir().
Usage
cloud_sync(direction: str = 'auto') -> int
Arguments
| Name | Type | Default | Description |
|---|---|---|---|
| direction | str | 'auto' |
One of "auto", "pull", or "push". Default: "auto". With "auto", a pull happens when there is no local mirror or sync state yet. |
Value
The settings revision after the sync.
Raises
CloudError: Whendirectionis not allowed, no token is stored, both sides changed under "auto", a push has no local mirror or sync state, or the server rejects a push.