Thanks to the super-useful PyiCloud module by @picklepete, this script is a way to download all of your photos from iCloud Photos.
On OS X (macOS?), use the icloud
utility to save your iCloud password to your keyring. (This keeps it out of the script.) Update the script with your Apple ID email address and run it to download your photos to the current directory.