CommitDatabaseRemote

class dsviper.CommitDatabaseRemote

Bases: object

A low-level class used to represent a remote Commit database through the CommitDatabasing interface. Use the high-level static factory method CommitDatabase.connect(…) or CommitDatabase.connect_local(…).

Note: Not directly instantiable.

close() None

Close the connection.

commit_databasing() CommitDatabasing

Return the CommitDatabasing interface.

static connect(host: str, service: str = '54321') CommitDatabaseRemote

Connect to a remote commit server.

static connect_local(socket_path: str) CommitDatabaseRemote

Connect to the socket located at socket_path.

download_speed(size: int = 1) float

Return the download speed in MBps (Mega Bytes per second) The size is expressed in Mega Bytes [1-1000].

is_closed() bool

Return True if the server is closed.

ping() float

Ping (latency is the technically more correct term) means the time it takes for a small data set to be transmitted from your device to a server and back to your device again. The ping time is measured in milliseconds (ms).

upload_speed(size: int = 1) float

Return the upload speed in MBps (Mega Bytes per second) The size is expressed in Mega Bytes [1-1000].