Synchronisation¶
ctSESAM can synchronize your password settings with a ctSESAM-Server. The exact protocol is specified in the Wiki.
Basic communication part is implemented in the Sync
class.
-
class
sync.
Sync
(server_url, username, password, cert_filename)[source]¶ Sync connection wrapper.
Parameters: - server_url (str) – https://my.server.domain/path/to/php/
- username (str) –
- password (str) –
This class is wrapped by a SyncManager
which handles the settings management for the server connection.
Manages Sync connections.
-
class
sync_manager.
SyncManager
[source]¶ Synchronization manager. This initializes and stores settings and handles the Sync object.
-
ask_for_sync_settings
()[source]¶ Ask the user for sync settings: Asks for server-URL, username and password.
-
get_binary_sync_settings
()[source]¶ returns packed sync settings
Returns: binary settings Return type: bytes
-
has_settings
()[source]¶ Returns true if pull or push are possible
Returns: Are there settings? Return type: bool
-
load_binary_sync_settings
(data)[source]¶ loads sync settings
Parameters: data (bytes) – packed json data of sync settings
-