Transport Unknown when Connecting to Realtime API

I am trying to connect to the realtime API using python-socketio. As a minimal test, I tried doing the following

import socketio
sio = socketio.Client()

where I got that connection URL by looking at the network traffic when I load the OGS site in my web browser. However, this gives me a 400 error with the response {'code': 0, 'message': 'Transport unknown'}.

Does anyone know how I can fix this issue and connect to the API?

sio.connect('', transports='websocket')