How To Create A Secret#
Introduction#
A Secret is a key-value pair used to store encrypted information accessible only to the owner of the secret. Also if you wish to, you can share the same secret API key with all the members of a Project.
UI#
Step 1: Navigate to Secrets#
In the Account Settings
page you can find the Secrets
section showing a list of all secrets.
Step 2: Create a Secret#
Click New Secret
to bring up the dialog for secret creation. Enter a name for the secret to be used for lookup, and the secret value.
If the secret should be private to this user, select Private
, to share the secret with all members of a project select Project
and enter the project name.
Step 3: Secret created#
Click New Secret
to bring up the dialog for secret creation. Enter a name for the secret to be used for lookup, and the secret value.
If the secret should be private to this user, select Private
, to share the secret with all members of a project select Project
and enter the project name.
Code#
Step 1: Get secrets API#
import hopsworks
connection = hopsworks.connection()
secrets_api = connection.get_secrets_api()
Step 2: Create secret#
secret = secrets_api.create_secret("my_secret", "Fk3MoPlQXCQvPo")
API Reference#
Conclusion#
In this guide you learned how to create a secret.