Skip to content

ping

Verify asynchronously that the configured herdr socket is reachable.

Check that the Herdr socket is reachable.

Returns:

Type Description
PongResult

The server's pong result.

Example
client = AsyncHerdrClient()
pong = await client.ping()
print(pong["version"])
Source code in src/herdr_client/async_client/client.py
351
352
353
354
355
356
357
358
359
360
361
362
363
364
async def ping(self) -> PongResult:
    """Check that the Herdr socket is reachable.

    Returns:
        The server's pong result.

    Example:
        ```python
        client = AsyncHerdrClient()
        pong = await client.ping()
        print(pong["version"])
        ```
    """
    return await self.request("ping")