semaphore.Socket

class semaphore.Socket(username: str, socket_path: str | None = None, subscribe: bool = False)[source]

Bases: object

This object represents a signald socket.

async read() AsyncIterable[bytes][source]

Read a socket, line by line.

async send(message: dict) None[source]

Send message to socket.