Coverage for src/henrri_connect/secures/synchro.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.synchro.SyncSecuresClient``
6 Accès synchrone aux endpoints safeguards (santé).
8Notes:
9- Utiliser de préférence l'objet ``henrri_connect.SyncHenrriClient`` pour acceder aux endpoints.
10"""
12from __future__ import annotations
14from typing import TYPE_CHECKING
16if TYPE_CHECKING:
17 from ..connect import SyncHenrriClient
19SECURES_ENDPOINT = "/v1/secures"
22class SyncSecuresClient: # pylint: disable=R0903
23 """
24 Accès synchrone aux endpoints sécurisés (santé).
26 Arguments
27 - client : SyncHenrriClient
28 Client synchrone 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: SyncHenrriClient) -> None:
36 self._c = client
38 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 = self._c.request("GET", f"{SECURES_ENDPOINT}/hello-world")
49 return resp.text