Welcome to OSXPhotos’s documentation!¶
- OSXPhotos
- OSXPhotos Tutorial
- Overview
- Export your photos
- Export by date
- Specify directory structure
- Specify exported filename
- Edited photos
- Specifying the Photos library
- Missing photos
- Exporting to external disks
- Exporting metadata with exported photos
- Removing a keyword during export
- Sidecar files
- Updating a previous export
- Dry Run
- Creating a report of all exported files
- Exporting only certain photos
- Converting images to JPEG on export
- Finder attributes
- Saving and loading options
- Run commands on exported photos for post-processing
- An example from an actual osxphotos user
- Color Themes
- Conclusion
- OSXPhotos Command Line Interface (CLI)
- OSXPhotos Python Package Overview
- OSXPhotos Python API
- Table of Contents
- Example uses of the Python package
- Concurrency
- Calling CLI commands from Python
- Package Interface
- PhotosDB
- Read a Photos library database
- Open the default (last opened) Photos library
- Open System Photos library
- Open a specific Photos library
photos(keywords=None, uuid=None, persons=None, albums=None, images=True, movies=True, from_date=None, to_date=None, intrash=False)</a>get_photo(uuid)</A>query(options: QueryOptions) -> List[PhotoInfo]:</a>- `keywords`
- `album_info`
- `albums`
albums_shared- `import_info`
- `project_info`
- `moment_info`
- `folder_info`
- `folders`
- `persons`
- `person_info`
keywords_as_dictkeywords_without_photopersons_as_dictalbums_as_dictalbums_shared_as_dict- `labels`
- `labels_normalized`
labels_as_dictlabels_normalized_as_dictlibrary_pathdb_pathdb_versionphotos_versionget_db_connection()execute(sql)
- QueryOptions
- PhotoInfo
uuidfilenameoriginal_filenamedatetzoffsettznamedate_originaldate_addeddate_modifieddescriptiontitlekeywordsalbumsalbum_infoimport_infoproject_infopersons- `person_info`
- `face_info`
pathpath_editedpath_derivativespath_rawhas_rawisrawraw_originalheightwidthorientationoriginal_heightoriginal_widthoriginal_orientationoriginal_filesizeismissinghasadjustmentsadjustmentsexternal_editfavoriteflaggedratinghiddenvisibleintrashdate_trashedlocationlatitudelongitudeplacesharedownercommentslikesisreferenceisphotoismovieiscloudassetincloudsyndicatedsaved_to_libraryshared_momentshared_libraryshare_participant_infoshare_participantsutiuti_originaluti_editeduti_rawburstburst_selectedburst_keyburst_default_pickburst_photosburst_albumsburst_album_infolive_photopath_live_photopath_edited_live_photoportraithdrselfietime_lapsepanoramaslow_molabelslabels_normalized- `search_info`
- `search_info_normalized`
- `exif_info`
- `exiftool`
scoreduplicatescloud_guidcloud_owner_hashed_idfingerprinthexdigesttables()json()asdict()export()- `render_template(template_str, options=None)`
- `detected_text(confidence_threshold=TEXT_DETECTION_CONFIDENCE_THRESHOLD)`
- ExifInfo
- AlbumInfo
- ImportInfo
- ProjectInfo
- MomentInfo
- FolderInfo
- PlaceInfo
- ScoreInfo
- SearchInfo
- PersonInfo
- FaceInfo
- CommentInfo
- LikeInfo
- AdjustmentsInfo
- PhotoTables
- Raw Photos
- Template System
- ExifTool
- PhotoExporter
- ExifWriter
- SidecarWriter
- PhotosAlbum
- Text Detection
- Compare Libraries
- Utility Functions
- PhotosDB
- Additional Examples
- OSXPhotos Python Reference
AlbumInfoAlbumSortOrderCommentInfoExifInfoExifToolExifWriterExportDBExportDB.close()ExportDB.connectionExportDB.create_file_record()ExportDB.create_or_get_file_record()ExportDB.delete_data_for_filepath()ExportDB.delete_data_for_uuid()ExportDB.export_dirExportDB.get_export_results()ExportDB.get_exported_files()ExportDB.get_file_record()ExportDB.get_files_for_uuid()ExportDB.get_history()ExportDB.get_last_export_directory()ExportDB.get_photoinfo_for_uuid()ExportDB.get_previous_uuids()ExportDB.get_target_for_file()ExportDB.get_uuid_for_file()ExportDB.pathExportDB.set_config()ExportDB.set_export_results()ExportDB.set_history()ExportDB.set_photoinfo_for_uuid()
ExportDBTempExportOptionsExportOptions.convert_to_jpegExportOptions.description_templateExportOptions.download_missingExportOptions.dry_runExportOptions.editedExportOptions.exiftool_flagsExportOptions.exiftoolExportOptions.export_as_hardlinkExportOptions.export_dbExportOptions.face_regionsExportOptions.fileutilExportOptions.force_updateExportOptions.ignore_date_modifiedExportOptions.ignore_signatureExportOptions.incrementExportOptions.jpeg_extExportOptions.jpeg_qualityExportOptions.keyword_templateExportOptions.live_photoExportOptions.locationExportOptions.merge_exif_keywordsExportOptions.merge_exif_personsExportOptions.overwriteExportOptions.personsExportOptions.preview_suffixExportOptions.previewExportOptions.raw_photoExportOptions.render_optionsExportOptions.replace_keywordsExportOptions.richExportOptions.export_aaeExportOptions.sidecar_drop_extExportOptions.sidecarExportOptions.stripExportOptions.timeoutExportOptions.touch_fileExportOptions.updateExportOptions.update_errorsExportOptions.use_albums_as_keywordsExportOptions.use_persons_as_keywordsExportOptions.use_photos_exportExportOptions.use_photokitExportOptions.verboseExportOptions.tmpdirExportOptions.favorite_ratingExportOptions.fix_orientationExportOptions.bit_flags
ExportResultsFaceInfoFileUtilFileUtilNoOpFolderInfoImportInfoLikeInfoMomentInfoPersonInfoPhotoExporterPhotoInfoPhotoInfo.adjustmentsPhotoInfo.adjustments_pathPhotoInfo.album_infoPhotoInfo.albumsPhotoInfo.asdict()PhotoInfo.burstPhotoInfo.burst_album_infoPhotoInfo.burst_albumsPhotoInfo.burst_default_pickPhotoInfo.burst_keyPhotoInfo.burst_photosPhotoInfo.burst_selectedPhotoInfo.cloud_guidPhotoInfo.cloud_metadataPhotoInfo.cloud_owner_hashed_idPhotoInfo.commentsPhotoInfo.datePhotoInfo.date_addedPhotoInfo.date_modifiedPhotoInfo.date_originalPhotoInfo.date_trashedPhotoInfo.descriptionPhotoInfo.detected_text()PhotoInfo.duplicatesPhotoInfo.exif_infoPhotoInfo.exiftoolPhotoInfo.export()PhotoInfo.external_editPhotoInfo.face_infoPhotoInfo.favoritePhotoInfo.filenamePhotoInfo.fingerprintPhotoInfo.flaggedPhotoInfo.has_rawPhotoInfo.hasadjustmentsPhotoInfo.hdrPhotoInfo.heightPhotoInfo.hexdigestPhotoInfo.hiddenPhotoInfo.import_infoPhotoInfo.incloudPhotoInfo.intrashPhotoInfo.iscloudassetPhotoInfo.ismissingPhotoInfo.ismoviePhotoInfo.isphotoPhotoInfo.israwPhotoInfo.isreferencePhotoInfo.json()PhotoInfo.keywordsPhotoInfo.labelsPhotoInfo.labels_normalizedPhotoInfo.latitudePhotoInfo.likesPhotoInfo.live_photoPhotoInfo.locationPhotoInfo.longitudePhotoInfo.moment_infoPhotoInfo.orientationPhotoInfo.original_filenamePhotoInfo.original_filesizePhotoInfo.original_heightPhotoInfo.original_orientationPhotoInfo.original_widthPhotoInfo.ownerPhotoInfo.panoramaPhotoInfo.pathPhotoInfo.path_derivativesPhotoInfo.path_editedPhotoInfo.path_edited_live_photoPhotoInfo.path_live_photoPhotoInfo.path_rawPhotoInfo.person_infoPhotoInfo.personsPhotoInfo.placePhotoInfo.portraitPhotoInfo.project_infoPhotoInfo.ratingPhotoInfo.raw_originalPhotoInfo.render_template()PhotoInfo.saved_to_libraryPhotoInfo.scorePhotoInfo.screen_recordingPhotoInfo.screenshotPhotoInfo.search_infoPhotoInfo.search_info_normalizedPhotoInfo.selfiePhotoInfo.share_infoPhotoInfo.share_participant_infoPhotoInfo.share_participantsPhotoInfo.sharedPhotoInfo.shared_libraryPhotoInfo.shared_momentPhotoInfo.shared_moment_infoPhotoInfo.slow_moPhotoInfo.syndicatedPhotoInfo.tables()PhotoInfo.time_lapsePhotoInfo.titlePhotoInfo.tznamePhotoInfo.tzoffsetPhotoInfo.utiPhotoInfo.uti_editedPhotoInfo.uti_originalPhotoInfo.uti_rawPhotoInfo.uuidPhotoInfo.visiblePhotoInfo.width
PhotoTemplatePhotoTemplate.expand_variables()PhotoTemplate.expand_variables_to_str()PhotoTemplate.filter_predicate()PhotoTemplate.get_field_values()PhotoTemplate.get_filter_values()PhotoTemplate.get_format_values()PhotoTemplate.get_media_type()PhotoTemplate.get_photo_bool_attribute()PhotoTemplate.get_photo_video_type()PhotoTemplate.get_template_value()PhotoTemplate.get_template_value_exiftool()PhotoTemplate.get_template_value_filter_function()PhotoTemplate.get_template_value_function()PhotoTemplate.get_template_value_multi()PhotoTemplate.get_template_value_pathlib()PhotoTemplate.render()
PhotosAlbumPhotosAlbumPhotoScriptPhotosDBPhotosDB.album_infoPhotosDB.album_info_sharedPhotosDB.albumsPhotosDB.albums_as_dictPhotosDB.albums_sharedPhotosDB.albums_shared_as_dictPhotosDB.db_pathPhotosDB.db_versionPhotosDB.execute()PhotosDB.folder_infoPhotosDB.foldersPhotosDB.get_db_connection()PhotosDB.get_photo()PhotosDB.import_infoPhotosDB.keywordsPhotosDB.keywords_as_dictPhotosDB.keywords_without_photoPhotosDB.labelsPhotosDB.labels_as_dictPhotosDB.labels_normalizedPhotosDB.labels_normalized_as_dictPhotosDB.library_pathPhotosDB.person_infoPhotosDB.personsPhotosDB.persons_as_dictPhotosDB.photos()PhotosDB.photos_by_uuid()PhotosDB.photos_versionPhotosDB.project_infoPhotosDB.query()
PlaceInfoProjectInfoQueryOptionsQueryOptions.added_afterQueryOptions.added_beforeQueryOptions.added_in_lastQueryOptions.albumQueryOptions.burst_photosQueryOptions.burstQueryOptions.cloudassetQueryOptions.deleted_onlyQueryOptions.deletedQueryOptions.descriptionQueryOptions.duplicateQueryOptions.editedQueryOptions.exifQueryOptions.external_editQueryOptions.favoriteQueryOptions.folderQueryOptions.from_dateQueryOptions.from_timeQueryOptions.functionQueryOptions.has_commentQueryOptions.has_likesQueryOptions.has_rawQueryOptions.hdrQueryOptions.hiddenQueryOptions.ignore_caseQueryOptions.in_albumQueryOptions.incloudQueryOptions.is_referenceQueryOptions.keywordQueryOptions.labelQueryOptions.liveQueryOptions.locationQueryOptions.max_sizeQueryOptions.min_sizeQueryOptions.missing_burstsQueryOptions.missingQueryOptions.moviesQueryOptions.nameQueryOptions.no_commentQueryOptions.no_descriptionQueryOptions.no_likesQueryOptions.no_locationQueryOptions.no_keywordQueryOptions.no_placeQueryOptions.no_titleQueryOptions.not_burstQueryOptions.not_cloudassetQueryOptions.not_editedQueryOptions.not_favoriteQueryOptions.not_hdrQueryOptions.not_hiddenQueryOptions.not_in_albumQueryOptions.not_incloudQueryOptions.not_liveQueryOptions.not_missingQueryOptions.not_panoramaQueryOptions.not_portraitQueryOptions.not_referenceQueryOptions.not_screenshotQueryOptions.not_screen_recordingQueryOptions.not_selfieQueryOptions.not_sharedQueryOptions.not_slow_moQueryOptions.not_time_lapseQueryOptions.panoramaQueryOptions.personQueryOptions.photosQueryOptions.placeQueryOptions.portraitQueryOptions.query_evalQueryOptions.regexQueryOptions.screenshotQueryOptions.screen_recordingQueryOptions.selectedQueryOptions.selfieQueryOptions.sharedQueryOptions.slow_moQueryOptions.time_lapseQueryOptions.titleQueryOptions.to_dateQueryOptions.to_timeQueryOptions.utiQueryOptions.uuidQueryOptions.yearQueryOptions.syndicatedQueryOptions.not_syndicatedQueryOptions.saved_to_libraryQueryOptions.not_saved_to_libraryQueryOptions.shared_momentQueryOptions.not_shared_momentQueryOptions.shared_libraryQueryOptions.not_shared_library
ScoreInfoSearchInfoSearchInfo.activitiesSearchInfo.allSearchInfo.asdict()SearchInfo.bodies_of_waterSearchInfo.cameraSearchInfo.citySearchInfo.countrySearchInfo.detected_textSearchInfo.holidaysSearchInfo.labelsSearchInfo.locality_namesSearchInfo.media_typesSearchInfo.monthSearchInfo.neighborhoodsSearchInfo.place_namesSearchInfo.seasonSearchInfo.sourceSearchInfo.stateSearchInfo.state_abbreviationSearchInfo.streetsSearchInfo.text_foundSearchInfo.venue_typesSearchInfo.venuesSearchInfo.year
SidecarWriteriPhotoAlbumInfoiPhotoDBiPhotoFaceInfoiPhotoFaceInfo.asdict()iPhotoFaceInfo.centeriPhotoFaceInfo.center_xiPhotoFaceInfo.center_yiPhotoFaceInfo.face_rect()iPhotoFaceInfo.json()iPhotoFaceInfo.mpri_reg_rectiPhotoFaceInfo.mwg_rs_areaiPhotoFaceInfo.nameiPhotoFaceInfo.person_infoiPhotoFaceInfo.pitchiPhotoFaceInfo.qualityiPhotoFaceInfo.rolliPhotoFaceInfo.roll_pitch_yaw()iPhotoFaceInfo.sizeiPhotoFaceInfo.size_pixelsiPhotoFaceInfo.yaw
iPhotoFolderInfoiPhotoPersonInfoiPhotoPhotoInfoiPhotoPhotoInfo.album_infoiPhotoPhotoInfo.albumsiPhotoPhotoInfo.asdict()iPhotoPhotoInfo.burstiPhotoPhotoInfo.burst_album_infoiPhotoPhotoInfo.burst_albumsiPhotoPhotoInfo.burst_photosiPhotoPhotoInfo.dateiPhotoPhotoInfo.date_addediPhotoPhotoInfo.date_modifiediPhotoPhotoInfo.date_originaliPhotoPhotoInfo.descriptioniPhotoPhotoInfo.event_infoiPhotoPhotoInfo.exif_infoiPhotoPhotoInfo.exiftooliPhotoPhotoInfo.export()iPhotoPhotoInfo.face_infoiPhotoPhotoInfo.favoriteiPhotoPhotoInfo.filenameiPhotoPhotoInfo.fingerprintiPhotoPhotoInfo.flaggediPhotoPhotoInfo.hasadjustmentsiPhotoPhotoInfo.heightiPhotoPhotoInfo.hexdigestiPhotoPhotoInfo.hiddeniPhotoPhotoInfo.intrashiPhotoPhotoInfo.ismissingiPhotoPhotoInfo.ismovieiPhotoPhotoInfo.isphotoiPhotoPhotoInfo.israwiPhotoPhotoInfo.isreferenceiPhotoPhotoInfo.json()iPhotoPhotoInfo.keywordsiPhotoPhotoInfo.latitudeiPhotoPhotoInfo.locationiPhotoPhotoInfo.longitudeiPhotoPhotoInfo.moment_infoiPhotoPhotoInfo.orientationiPhotoPhotoInfo.original_filenameiPhotoPhotoInfo.original_filesizeiPhotoPhotoInfo.original_heightiPhotoPhotoInfo.original_widthiPhotoPhotoInfo.pathiPhotoPhotoInfo.path_derivativesiPhotoPhotoInfo.path_editediPhotoPhotoInfo.person_infoiPhotoPhotoInfo.personsiPhotoPhotoInfo.ratingiPhotoPhotoInfo.raw_originaliPhotoPhotoInfo.render_template()iPhotoPhotoInfo.titleiPhotoPhotoInfo.tznameiPhotoPhotoInfo.tzoffsetiPhotoPhotoInfo.utiiPhotoPhotoInfo.uti_editediPhotoPhotoInfo.uti_originaliPhotoPhotoInfo.uti_rawiPhotoPhotoInfo.uuidiPhotoPhotoInfo.visibleiPhotoPhotoInfo.width
is_debug()set_debug()