juno.keychain

Secure credential storage via the iOS Keychain.

exception juno.keychain.KeychainError

Bases: Exception

Raised when a keychain write operation fails.

juno.keychain.get_password(service, account)

Return a stored password for a service/account pair.

Parameters:
  • service (str) – Logical keychain service namespace.

  • account (str) – Account identifier within the service namespace.

Returns:

Stored password when an entry exists, otherwise None.

Raises:

TypeError – If any argument is not a string.

Return type:

str | None

juno.keychain.set_password(service, account, password)

Store or update a password in keychain.

Parameters:
  • service (str) – Logical keychain service namespace.

  • account (str) – Account identifier within the service namespace.

  • password (str) – Secret value to store.

Raises:
Return type:

None

juno.keychain.delete_password(service, account)

Delete a stored password for a service/account pair.

Parameters:
  • service (str) – Logical keychain service namespace.

  • account (str) – Account identifier within the service namespace.

Returns:

True when an existing entry was deleted, otherwise False.

Raises:

TypeError – If any argument is not a string.

Return type:

bool