Connect to an already-running runtime at the given URL. Args: url: URL of the runtime to connect to. Accepts ``"port"``, ``"host:port"``, or a full URL. connection_token: Optional shared secret to authenticate the connection. Required
(url: str, *, connection_token: str | None = None)
| 337 | |
| 338 | @staticmethod |
| 339 | def for_uri(url: str, *, connection_token: str | None = None) -> UriRuntimeConnection: |
| 340 | """Connect to an already-running runtime at the given URL. |
| 341 | |
| 342 | Args: |
| 343 | url: URL of the runtime to connect to. Accepts ``"port"``, |
| 344 | ``"host:port"``, or a full URL. |
| 345 | connection_token: Optional shared secret to authenticate the |
| 346 | connection. Required when the server was started with a |
| 347 | token; ignored by legacy servers without ``connect`` support. |
| 348 | """ |
| 349 | return UriRuntimeConnection(url=url, connection_token=connection_token) |
| 350 | |
| 351 | |
| 352 | @dataclass |