Coverage for src/henrri_connect/secures/asynchro.py: 100%
9 statements
« prev ^ index » next coverage.py v7.14.1, created at 2026-06-05 10:54 +0200
« prev ^ index » next coverage.py v7.14.1, created at 2026-06-05 10:54 +0200
1"""
2Sous-client pour les endpoints /v1/secures.
4Classes:
5- ``henrri_connect.secures.asynchro.AsyncSecuresClient``
6 Accès asynchrone aux endpoints safeguards (santé).
8Notes:
9- Utiliser de préférence l'objet ``henrri_connect.AsyncHenrriClient`` pour acceder aux endpoints.
10"""
12from __future__ import annotations
14from typing import TYPE_CHECKING
16if TYPE_CHECKING:
17 from ..connect import AsyncHenrriClient
19SECURES_ENDPOINT = "/v1/secures"
22class AsyncSecuresClient: # pylint: disable=R0903
23 """
24 Accès asynchrone aux endpoints sécurisés (santé).
26 Arguments
27 client : AsyncHenrriClient
28 Client asynchrone pour acceder aux endpoints.
30 Methods
31 hello_world()
32 Vérifie la connexion authentifiée à l'API (endpoint de santé).
33 """
35 def __init__(self, client: AsyncHenrriClient) -> None:
36 self._c = client
38 async def hello_world(self) -> str:
39 """
40 Vérifie la connexion authentifiée à l'API (endpoint de santé).
42 Arguments
43 None
45 Returns
46 str : Texte de la réponse.
47 """
48 resp = await self._c.request("GET", f"{SECURES_ENDPOINT}/hello-world")
49 return resp.text