You can also store your password in the system keyring using the command-line tool: > icloud Password for password in keyring? (y/N) In the event that the username/password combination is invalid, a PyiCloudFailedLoginException exception is thrown. Authentication without using a saved password is as simple as passing your username and password to the PyiCloudService class: > from pyicloud import PyiCloudService