a gazillion things to implement cosmos db healthcheck
This commit is contained in:
parent
7af3b12c81
commit
91c79357f8
11 changed files with 421 additions and 15 deletions
12
anaxi/cosmos_tools.py
Normal file
12
anaxi/cosmos_tools.py
Normal 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},
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue