@Siddhanth.V
Thank you for reaching out to us.
Typically, the default connection timeout should work fine for most use cases.
To set the connection timeout (in seconds), you can use the following code.
import websocket websocket.setdefaulttimeout(10)