I started using Azure Data studio Notebook, I am having some credentials in environment variables. How can I use those environment variables in Azure Data studio?
Asked
Active
Viewed 471 times
2 Answers
0
For now I've added the .env loader at first step
from dotenv import load_dotenv
load_dotenv("dev_environment")

muTheTechie
- 1,443
- 17
- 25
0
Use azure key vault:
Install the library from notebook :
!pip install azure-keyvault-secrets
Sample Usage :
from azure.identity import ManagedIdentityCredential
from azure.keyvault.secrets import SecretClient
credential = ManagedIdentityCredential()
client = SecretClient(vault_url="key_vault_url", credential=credential)
secret = client.get_secret("Key_Name")
secret_value = secret.value

ikurious
- 36
- 7