def edit_credentials(self, credential=None, already_set=True):
<EOL>credentials_required = self._CREDENTIALS_REQUIRED<EOL>if credential:<EOL><INDENT>credentials_required = [credential]<EOL><DEDENT>for cred in credentials_required:<EOL><INDENT>if (cred in self._credentials) and ((already_set is False) and (credential is None)):<EOL><INDENT>continue<EOL><DEDENT>else:<EOL><INDENT>current_encrypted_value = '<STR_LIT>'<EOL>try:<EOL><INDENT>current_encrypted_value = self._credentials_encrypted[cred]<EOL><DEDENT>except KeyError:<EOL><INDENT>None<EOL><DEDENT>prompt = '<STR_LIT>'.format(cred, current_encrypted_value)<EOL>input_value = confirm_input(prompt)      <EOL>if input_value == '<STR_LIT>':<EOL><INDENT>logging.info('<STR_LIT>'.format(cred))<EOL><DEDENT>else:<EOL><INDENT>self._credentials.update({cred: input_value})<EOL>logging.info('<STR_LIT>'.format(cred, input_value))<EOL><DEDENT><DEDENT><DEDENT>self._save_credentials()<EOL>self._load_credentials()<EOL>
Edit the credentials used by the :py:class:`~pypersonalassistant.secure.secure` class.

.. note :: User input is required.

By default, unset credentials will be displayed.

:param string credential: A specific credential to edit.
:param bool already_set: If `False` will show all credentials, whether set or unset.