Or even better by using the ‘dbutils.secrets’ functionality of Databrics like (as instructed by a dev within my team):
# Set the API credentials as environment variables (NEATER)
os.environ['CDSAPI_URL'] = 'https://cds.climate.copernicus.eu/api/v2'
os.environ['CDSAPI_KEY'] = dbutils.secrets.get(scope = "keyvault_secretscope_name", key = "Copernicus-api-key")
@HANPU_YAO & @Matteo_De_Felice12 the downside of earlier methods is the ‘publication’ of your key.