This looks like a cool project! I noticed you were using an Automator workflow to show a photo. You can likely accomplish what you're trying to do directly in python using the photoscript package which provides a python-to-Applescript bridge for Photos. photoscript and osxphotos use the same UUID (which is used by Photos) to reference individual photos.
Ah, very nice. I spent some time looking around the AppleScript bindings for Photos.app but couldn't figure out how to do this. Thanks, using photoscript would be much cleaner than shelling out to automator.
This looks like a cool project! I noticed you were using an Automator workflow to show a photo. You can likely accomplish what you're trying to do directly in python using the photoscript package which provides a python-to-Applescript bridge for Photos. photoscript and osxphotos use the same UUID (which is used by Photos) to reference individual photos.
Full docs for photoscript here