albums_as_dict ) # find all photos with Keyword = Foo and containing John Smith photos = photosdb. To get help on a specific command, use osxphotos help Įxample uses of the package ''' Simple usage of the package ''' import osxphotos def main (): photosdb = osxphotos. Query Query the Photos database using 1 or more search options if. Places Print out places found in the Photos library. Persons Print out persons (faces) found in the Photos library. List Print list of Photos libraries found on the system. Labels Print out image classification labels found in the Photos. Keywords Print out keywords found in the Photos library. Info Print out descriptive info of the Photos library database.
Help Print help for help on commands: help. last openedĪbout Print information about osxphotos including license.Īlbums Print out albums found in the Photos library.ĭump Print list of all photos & associated info from the Photos.Įxport Export photos from the Photos database. Provided, will attempt to find the library to db or directly as PHOTOS_LIBRARY positionalĪrgument. Library/database can be specified using either This package will install a command line utility called osxphotos that allows you to query the Photos database and export photos.Īlternatively, you can also run the command line utility like this: python3 -m osxphotos > osxphotos