import os from sympasoap import Client _client = None def get_sympa_client() -> Client: global _client if _client is None: _client = Client("https://" + os.getenv("SYMPA_URL")) _client.login(os.getenv("SYMPA_EMAIL"), os.getenv("SYMPA_PASSWORD")) return _client