anki/pylib/anki/sync.py
Damien Elmes 9d853bbb03 start work on more clearly defining backend/protobuf boundaries
- anki._backend stores the protobuf files and rsbackend.py code
- pylib modules import protobuf messages directly from the
_pb2 files, and explicitly export any will be returned or consumed
by public pylib functions, so that calling code can import from pylib
- the "rsbackend" no longer imports and re-exports protobuf messages
- pylib can just consume them directly.
- move errors to errors.py

Still todo:

- rsbridge
- finishing the work on rsbackend, and check what we need to add
back to the original file location to avoid breaking add-ons
2021-01-31 18:55:45 +10:00

22 lines
449 B
Python

# Copyright: Ankitects Pty Ltd and contributors
# License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
import anki._backend.backend_pb2 as _pb
# public exports
SyncAuth = _pb.SyncAuth
SyncOutput = _pb.SyncCollectionOut
SyncStatus = _pb.SyncStatusOut
# Legacy attributes some add-ons may be using
from .httpclient import HttpClient
AnkiRequestsClient = HttpClient
class Syncer:
def sync(self) -> str:
pass