MCPcopy Create free account
hub / github.com/0x676e67/wreq-python / websocket

Method websocket

src/client/blocking/mod.rs:126–138  ·  view source on GitHub ↗
(
        &self,
        py: Python,
        url: PyBackedStr,
        kwds: Option<WebSocketParams>,
    )

Source from the content-addressed store, hash-verified

124 /// Make a WebSocket request to the specified URL.
125 #[pyo3(signature = (url, **kwds))]
126 pub fn websocket(
127 &self,
128 py: Python,
129 url: PyBackedStr,
130 kwds: Option<WebSocketParams>,
131 ) -> PyResult<BlockingWebSocket> {
132 py.allow_threads(|| {
133 let client = self.0.clone();
134 pyo3_async_runtimes::tokio::get_runtime()
135 .block_on(execute_websocket_request(client, url, kwds))
136 .map(Into::into)
137 })
138 }
139}
140
141#[pymethods]

Callers 4

mainFunction · 0.95
mainFunction · 0.45
test_websocketFunction · 0.45

Calls 1

Tested by 1

test_websocketFunction · 0.36