"""Cerbos connector async client.""" import logging from cerbos.sdk.client import AsyncCerbosClient from pdp import config logger = logging.getLogger(__name__) def get_cerbos_client() -> AsyncCerbosClient: """Create a Cerbos Client using a specified server host.""" logger.info("[get_cerbos_client] host=%s", config.CERBOS_SERVER_HOST) return AsyncCerbosClient( config.CERBOS_SERVER_HOST, request_retries=config.CERBOS_REQUEST_RETRIES, timeout_secs=config.CERBOS_TIMEOUT_SECS, )