mb.get_secret(secret_name)
Retrieve a secret value previously stored in Modelbit. Returns the secret value as a string.
Parameters
secret_name
:str
The name of the secret
Returns
str
if the secret exists. If the secret does not exist then an exception will be raised.
Example
my_api_key = mb.get_secret("SECRET_API_KEY")
See also
- Learn how to manage secrets in Modelbit.