a gazillion things to implement cosmos db healthcheck

This commit is contained in:
Pablo Martin 2024-08-09 12:41:23 +02:00
parent 7af3b12c81
commit 91c79357f8
11 changed files with 421 additions and 15 deletions

12
anaxi/cosmos_tools.py Normal file
View file

@ -0,0 +1,12 @@
import azure.cosmos.cosmos_client as cosmos_client
from anaxi.config import CosmosDBDatabaseConfig
def create_cosmos_client_from_config(
config: CosmosDBDatabaseConfig,
) -> cosmos_client.CosmosClient:
return cosmos_client.CosmosClient(
url=config.host,
credential={"masterKey": config.master_key},
)