It would be awesome to be able to specify an e-mail address and get the google profile image for use with a device (under known_devices.yaml) I have the PHP code to accomplish this, but I do not know how to convert it to python.
<?php
$email = $_GET['email']; // Get email input
$email_sanitized = preg_replace("/[^A-Za-z0-9 .@_-]/", '', $email); // Sanitize email by removing non alpha-numeric characters
$url = "http://picasaweb.google.com/data/entry/api/user/{$email}?alt=json"; // URL returning JSON Google profile data
$data = json_decode( file_get_contents($url) ); // Decode JSON into an object
$image_url = $data->entry->{'gphoto$thumbnail'}->{'$t'}; // Get image URL for Google photo thumbnail
$image_file = fopen( $image_url, 'rb' ); // Open image URL
header( "Content-Type: image/jpg" ); // Set content header to display as an image
fpassthru( $image_file ); // Pass through image file data
does anyone have the knowledge and inclination to add this to known_devices.yaml handling?