From d6a26fda3483de118a482e9c7470e01235ed06f8 Mon Sep 17 00:00:00 2001 From: onyx-and-iris Date: Wed, 25 Mar 2026 05:47:02 +0000 Subject: [PATCH] update README --- README.md | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 28633c5..80793f2 100644 --- a/README.md +++ b/README.md @@ -41,23 +41,28 @@ def main(): client.obs.on('twitch_account', on_twitch_event) # run for 30 seconds then disconnect client from server - client.sio.sleep(30) + client.wait(30) if __name__ == '__main__': main() ``` -> note: From the [SocketIO docs](https://python-socketio.readthedocs.io/en/latest/client.html#managing-background-tasks), `client.sio.wait()` may be used if your application has nothing to do in the main thread. - ### Client class -*`streamlabsio.connect(*, token: str, raw: bool = False)`* +*`streamlabsio.connect(*, token: str, raw: bool = False) -> Client`* The following keyword arguments may be passed: - token: Streamlabs SocketIO api token. - raw: Receive raw data messages as json objects. +#### methods + +*wait(self, seconds: float | None = None) -> None* + +- float: Time in seconds to block the main thread + - If None, the method will block indefinitely. + ### Event Data Attributes For event data you may inspect the available attributes using `attrs()`.