Get the client for the server. Returns: RaphtoryClient: the client.
(&self)
| 67 | /// Returns: |
| 68 | /// RaphtoryClient: the client. |
| 69 | pub(crate) fn get_client(&self) -> PyResult<PyRaphtoryClient> { |
| 70 | // TODO: return an authenticated server with rw access to everything? |
| 71 | self.apply_if_alive(|handler| { |
| 72 | let port = handler.port; |
| 73 | let url = format!("http://localhost:{port}"); |
| 74 | Ok(PyRaphtoryClient::new(url, None)?) |
| 75 | }) |
| 76 | } |
| 77 | |
| 78 | /// Get the port the server is listening on |
| 79 | pub fn port(&self) -> PyResult<u16> { |