osxphotos/docs/reference.html
2021-01-24 17:35:49 -08:00

1356 lines
89 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>osxphotos package &#8212; osxphotos 0.40.4 documentation</title>
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/alabaster.css" type="text/css" />
<script id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/doctools.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="prev" title="osxphotos command line interface (CLI)" href="cli.html" />
<link rel="stylesheet" href="_static/custom.css" type="text/css" />
<meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />
</head><body>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="osxphotos-package">
<h1>osxphotos package<a class="headerlink" href="#osxphotos-package" title="Permalink to this headline"></a></h1>
<div class="section" id="osxphotos-module">
<h2>osxphotos module<a class="headerlink" href="#osxphotos-module" title="Permalink to this headline"></a></h2>
<dl class="py class">
<dt id="osxphotos.PhotosDB">
<em class="property">class </em><code class="sig-prename descclassname">osxphotos.</code><code class="sig-name descname">PhotosDB</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">dbfile</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">verbose</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">exiftool</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/osxphotos/photosdb/photosdb.html#PhotosDB"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#osxphotos.PhotosDB" title="Permalink to this definition"></a></dt>
<dd><p>Processes a Photos.app library database to extract information about photos</p>
<dl class="py method">
<dt id="osxphotos.PhotosDB.album_info">
<em class="property">property </em><code class="sig-name descname">album_info</code><a class="headerlink" href="#osxphotos.PhotosDB.album_info" title="Permalink to this definition"></a></dt>
<dd><p>return list of AlbumInfo objects for each album in the photos database</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotosDB.album_info_shared">
<em class="property">property </em><code class="sig-name descname">album_info_shared</code><a class="headerlink" href="#osxphotos.PhotosDB.album_info_shared" title="Permalink to this definition"></a></dt>
<dd><p>return list of AlbumInfo objects for each shared album in the photos database
only valid for Photos 5; on Photos &lt;= 4, prints warning and returns empty list</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotosDB.albums">
<em class="property">property </em><code class="sig-name descname">albums</code><a class="headerlink" href="#osxphotos.PhotosDB.albums" title="Permalink to this definition"></a></dt>
<dd><p>return list of albums found in photos database</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotosDB.albums_as_dict">
<em class="property">property </em><code class="sig-name descname">albums_as_dict</code><a class="headerlink" href="#osxphotos.PhotosDB.albums_as_dict" title="Permalink to this definition"></a></dt>
<dd><p>return albums as dict of albums, count in reverse sorted order (descending)</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotosDB.albums_shared">
<em class="property">property </em><code class="sig-name descname">albums_shared</code><a class="headerlink" href="#osxphotos.PhotosDB.albums_shared" title="Permalink to this definition"></a></dt>
<dd><p>return list of shared albums found in photos database
only valid for Photos 5; on Photos &lt;= 4, prints warning and returns empty list</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotosDB.albums_shared_as_dict">
<em class="property">property </em><code class="sig-name descname">albums_shared_as_dict</code><a class="headerlink" href="#osxphotos.PhotosDB.albums_shared_as_dict" title="Permalink to this definition"></a></dt>
<dd><p>returns shared albums as dict of albums, count in reverse sorted order (descending)
valid only on Photos 5; on Photos &lt;= 4, prints warning and returns empty dict</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotosDB.db_path">
<em class="property">property </em><code class="sig-name descname">db_path</code><a class="headerlink" href="#osxphotos.PhotosDB.db_path" title="Permalink to this definition"></a></dt>
<dd><p>returns path to the Photos library database PhotosDB was initialized with</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotosDB.db_version">
<em class="property">property </em><code class="sig-name descname">db_version</code><a class="headerlink" href="#osxphotos.PhotosDB.db_version" title="Permalink to this definition"></a></dt>
<dd><p>return the database version as stored in LiGlobals table</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotosDB.folder_info">
<em class="property">property </em><code class="sig-name descname">folder_info</code><a class="headerlink" href="#osxphotos.PhotosDB.folder_info" title="Permalink to this definition"></a></dt>
<dd><p>return list FolderInfo objects representing top-level folders in the photos database</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotosDB.folders">
<em class="property">property </em><code class="sig-name descname">folders</code><a class="headerlink" href="#osxphotos.PhotosDB.folders" title="Permalink to this definition"></a></dt>
<dd><p>return list of top-level folder names in the photos database</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotosDB.get_db_connection">
<code class="sig-name descname">get_db_connection</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/osxphotos/photosdb/photosdb.html#PhotosDB.get_db_connection"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#osxphotos.PhotosDB.get_db_connection" title="Permalink to this definition"></a></dt>
<dd><p>Get connection to the working copy of the Photos database</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>tuple of (connection, cursor) to sqlite3 database</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotosDB.get_photo">
<code class="sig-name descname">get_photo</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">uuid</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/osxphotos/photosdb/photosdb.html#PhotosDB.get_photo"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#osxphotos.PhotosDB.get_photo" title="Permalink to this definition"></a></dt>
<dd><p>Returns a single photo matching uuid</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>uuid</strong> the UUID of photo to get</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>PhotoInfo instance for photo with UUID matching uuid or None if no match</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotosDB.import_info">
<em class="property">property </em><code class="sig-name descname">import_info</code><a class="headerlink" href="#osxphotos.PhotosDB.import_info" title="Permalink to this definition"></a></dt>
<dd><p>return list of ImportInfo objects for each import session in the database</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotosDB.keywords">
<em class="property">property </em><code class="sig-name descname">keywords</code><a class="headerlink" href="#osxphotos.PhotosDB.keywords" title="Permalink to this definition"></a></dt>
<dd><p>return list of keywords found in photos database</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotosDB.keywords_as_dict">
<em class="property">property </em><code class="sig-name descname">keywords_as_dict</code><a class="headerlink" href="#osxphotos.PhotosDB.keywords_as_dict" title="Permalink to this definition"></a></dt>
<dd><p>return keywords as dict of keyword, count in reverse sorted order (descending)</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotosDB.labels">
<em class="property">property </em><code class="sig-name descname">labels</code><a class="headerlink" href="#osxphotos.PhotosDB.labels" title="Permalink to this definition"></a></dt>
<dd><p>return list of all search info labels found in the library</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotosDB.labels_as_dict">
<em class="property">property </em><code class="sig-name descname">labels_as_dict</code><a class="headerlink" href="#osxphotos.PhotosDB.labels_as_dict" title="Permalink to this definition"></a></dt>
<dd><p>count in reverse sorted order (descending)</p>
<dl class="field-list simple">
<dt class="field-odd">Type</dt>
<dd class="field-odd"><p>return labels as dict of label</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotosDB.labels_normalized">
<em class="property">property </em><code class="sig-name descname">labels_normalized</code><a class="headerlink" href="#osxphotos.PhotosDB.labels_normalized" title="Permalink to this definition"></a></dt>
<dd><p>return list of all normalized search info labels found in the library</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotosDB.labels_normalized_as_dict">
<em class="property">property </em><code class="sig-name descname">labels_normalized_as_dict</code><a class="headerlink" href="#osxphotos.PhotosDB.labels_normalized_as_dict" title="Permalink to this definition"></a></dt>
<dd><p>count in reverse sorted order (descending)</p>
<dl class="field-list simple">
<dt class="field-odd">Type</dt>
<dd class="field-odd"><p>return normalized labels as dict of label</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotosDB.library_path">
<em class="property">property </em><code class="sig-name descname">library_path</code><a class="headerlink" href="#osxphotos.PhotosDB.library_path" title="Permalink to this definition"></a></dt>
<dd><p>returns path to the Photos library PhotosDB was initialized with</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotosDB.person_info">
<em class="property">property </em><code class="sig-name descname">person_info</code><a class="headerlink" href="#osxphotos.PhotosDB.person_info" title="Permalink to this definition"></a></dt>
<dd><p>return list of PersonInfo objects for each person in the photos database</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotosDB.persons">
<em class="property">property </em><code class="sig-name descname">persons</code><a class="headerlink" href="#osxphotos.PhotosDB.persons" title="Permalink to this definition"></a></dt>
<dd><p>return list of persons found in photos database</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotosDB.persons_as_dict">
<em class="property">property </em><code class="sig-name descname">persons_as_dict</code><a class="headerlink" href="#osxphotos.PhotosDB.persons_as_dict" title="Permalink to this definition"></a></dt>
<dd><p>return persons as dict of person, count in reverse sorted order (descending)</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotosDB.photos">
<code class="sig-name descname">photos</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">keywords</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">uuid</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">persons</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">albums</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">images</span><span class="o">=</span><span class="default_value">True</span></em>, <em class="sig-param"><span class="n">movies</span><span class="o">=</span><span class="default_value">True</span></em>, <em class="sig-param"><span class="n">from_date</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">to_date</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">intrash</span><span class="o">=</span><span class="default_value">False</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/osxphotos/photosdb/photosdb.html#PhotosDB.photos"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#osxphotos.PhotosDB.photos" title="Permalink to this definition"></a></dt>
<dd><p>Return a list of PhotoInfo objects
If called with no args, returns the entire database of photos
If called with args, returns photos matching the args (e.g. keywords, persons, etc.)
If more than one arg, returns photos matching all the criteria (e.g. keywords AND persons)
If more than one keyword, uuid, persons, albums is passed, they are treated as “OR” criteria
e.g. keywords=[“wedding”,”vacation”] returns photos matching either keyword
from_date and to_date may be either naive or timezone-aware datetime.datetime objects.
If naive, timezone will be assumed to be local timezone.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>keywords</strong> list of keywords to search for</p></li>
<li><p><strong>uuid</strong> list of UUIDs to search for</p></li>
<li><p><strong>persons</strong> list of persons to search for</p></li>
<li><p><strong>albums</strong> list of album names to search for</p></li>
<li><p><strong>images</strong> if True, returns image files, if False, does not return images; default is True</p></li>
<li><p><strong>movies</strong> if True, returns movie files, if False, does not return movies; default is True</p></li>
<li><p><strong>from_date</strong> return photos with creation date &gt;= from_date (datetime.datetime object, default None)</p></li>
<li><p><strong>to_date</strong> return photos with creation date &lt;= to_date (datetime.datetime object, default None)</p></li>
<li><p><strong>intrash</strong> if True, returns only images in “Recently deleted items” folder,
if False returns only photos that arent deleted; default is False</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>list of PhotoInfo objects</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotosDB.photos_by_uuid">
<code class="sig-name descname">photos_by_uuid</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">uuids</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/osxphotos/photosdb/photosdb.html#PhotosDB.photos_by_uuid"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#osxphotos.PhotosDB.photos_by_uuid" title="Permalink to this definition"></a></dt>
<dd><dl class="simple">
<dt>Returns a list of photos with UUID in uuids.</dt><dd><p>Does not generate error if invalid or missing UUID passed.
This is faster than using PhotosDB.photos if you have list of UUIDs.
Returns photos regardless of intrash state.</p>
</dd>
</dl>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>uuid</strong> list of UUIDs of photos to get</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>list of PhotoInfo instance for photo with UUID matching uuid or [] if no match</p>
</dd>
</dl>
</dd></dl>
</dd></dl>
<dl class="py class">
<dt id="osxphotos.PhotoInfo">
<em class="property">class </em><code class="sig-prename descclassname">osxphotos.</code><code class="sig-name descname">PhotoInfo</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">db</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">uuid</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">info</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/osxphotos/photoinfo/photoinfo.html#PhotoInfo"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#osxphotos.PhotoInfo" title="Permalink to this definition"></a></dt>
<dd><p>Info about a specific photo, contains all the details about the photo
including keywords, persons, albums, uuid, path, etc.</p>
<dl class="py class">
<dt id="osxphotos.PhotoInfo.ExifInfo">
<em class="property">class </em><code class="sig-name descname">ExifInfo</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">flash_fired</span><span class="p">:</span> <span class="n">bool</span></em>, <em class="sig-param"><span class="n">iso</span><span class="p">:</span> <span class="n">int</span></em>, <em class="sig-param"><span class="n">metering_mode</span><span class="p">:</span> <span class="n">int</span></em>, <em class="sig-param"><span class="n">sample_rate</span><span class="p">:</span> <span class="n">int</span></em>, <em class="sig-param"><span class="n">track_format</span><span class="p">:</span> <span class="n">int</span></em>, <em class="sig-param"><span class="n">white_balance</span><span class="p">:</span> <span class="n">int</span></em>, <em class="sig-param"><span class="n">aperture</span><span class="p">:</span> <span class="n">float</span></em>, <em class="sig-param"><span class="n">bit_rate</span><span class="p">:</span> <span class="n">float</span></em>, <em class="sig-param"><span class="n">duration</span><span class="p">:</span> <span class="n">float</span></em>, <em class="sig-param"><span class="n">exposure_bias</span><span class="p">:</span> <span class="n">float</span></em>, <em class="sig-param"><span class="n">focal_length</span><span class="p">:</span> <span class="n">float</span></em>, <em class="sig-param"><span class="n">fps</span><span class="p">:</span> <span class="n">float</span></em>, <em class="sig-param"><span class="n">latitude</span><span class="p">:</span> <span class="n">float</span></em>, <em class="sig-param"><span class="n">longitude</span><span class="p">:</span> <span class="n">float</span></em>, <em class="sig-param"><span class="n">shutter_speed</span><span class="p">:</span> <span class="n">float</span></em>, <em class="sig-param"><span class="n">camera_make</span><span class="p">:</span> <span class="n">str</span></em>, <em class="sig-param"><span class="n">camera_model</span><span class="p">:</span> <span class="n">str</span></em>, <em class="sig-param"><span class="n">codec</span><span class="p">:</span> <span class="n">str</span></em>, <em class="sig-param"><span class="n">lens_model</span><span class="p">:</span> <span class="n">str</span></em><span class="sig-paren">)</span><a class="headerlink" href="#osxphotos.PhotoInfo.ExifInfo" title="Permalink to this definition"></a></dt>
<dd><p>EXIF info associated with a photo from the Photos library</p>
<dl class="py attribute">
<dt id="osxphotos.PhotoInfo.ExifInfo.aperture">
<code class="sig-name descname">aperture</code><em class="property">: float</em><a class="headerlink" href="#osxphotos.PhotoInfo.ExifInfo.aperture" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py attribute">
<dt id="osxphotos.PhotoInfo.ExifInfo.bit_rate">
<code class="sig-name descname">bit_rate</code><em class="property">: float</em><a class="headerlink" href="#osxphotos.PhotoInfo.ExifInfo.bit_rate" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py attribute">
<dt id="osxphotos.PhotoInfo.ExifInfo.camera_make">
<code class="sig-name descname">camera_make</code><em class="property">: str</em><a class="headerlink" href="#osxphotos.PhotoInfo.ExifInfo.camera_make" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py attribute">
<dt id="osxphotos.PhotoInfo.ExifInfo.camera_model">
<code class="sig-name descname">camera_model</code><em class="property">: str</em><a class="headerlink" href="#osxphotos.PhotoInfo.ExifInfo.camera_model" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py attribute">
<dt id="osxphotos.PhotoInfo.ExifInfo.codec">
<code class="sig-name descname">codec</code><em class="property">: str</em><a class="headerlink" href="#osxphotos.PhotoInfo.ExifInfo.codec" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py attribute">
<dt id="osxphotos.PhotoInfo.ExifInfo.duration">
<code class="sig-name descname">duration</code><em class="property">: float</em><a class="headerlink" href="#osxphotos.PhotoInfo.ExifInfo.duration" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py attribute">
<dt id="osxphotos.PhotoInfo.ExifInfo.exposure_bias">
<code class="sig-name descname">exposure_bias</code><em class="property">: float</em><a class="headerlink" href="#osxphotos.PhotoInfo.ExifInfo.exposure_bias" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py attribute">
<dt id="osxphotos.PhotoInfo.ExifInfo.flash_fired">
<code class="sig-name descname">flash_fired</code><em class="property">: bool</em><a class="headerlink" href="#osxphotos.PhotoInfo.ExifInfo.flash_fired" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py attribute">
<dt id="osxphotos.PhotoInfo.ExifInfo.focal_length">
<code class="sig-name descname">focal_length</code><em class="property">: float</em><a class="headerlink" href="#osxphotos.PhotoInfo.ExifInfo.focal_length" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py attribute">
<dt id="osxphotos.PhotoInfo.ExifInfo.fps">
<code class="sig-name descname">fps</code><em class="property">: float</em><a class="headerlink" href="#osxphotos.PhotoInfo.ExifInfo.fps" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py attribute">
<dt id="osxphotos.PhotoInfo.ExifInfo.iso">
<code class="sig-name descname">iso</code><em class="property">: int</em><a class="headerlink" href="#osxphotos.PhotoInfo.ExifInfo.iso" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py attribute">
<dt id="osxphotos.PhotoInfo.ExifInfo.latitude">
<code class="sig-name descname">latitude</code><em class="property">: float</em><a class="headerlink" href="#osxphotos.PhotoInfo.ExifInfo.latitude" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py attribute">
<dt id="osxphotos.PhotoInfo.ExifInfo.lens_model">
<code class="sig-name descname">lens_model</code><em class="property">: str</em><a class="headerlink" href="#osxphotos.PhotoInfo.ExifInfo.lens_model" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py attribute">
<dt id="osxphotos.PhotoInfo.ExifInfo.longitude">
<code class="sig-name descname">longitude</code><em class="property">: float</em><a class="headerlink" href="#osxphotos.PhotoInfo.ExifInfo.longitude" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py attribute">
<dt id="osxphotos.PhotoInfo.ExifInfo.metering_mode">
<code class="sig-name descname">metering_mode</code><em class="property">: int</em><a class="headerlink" href="#osxphotos.PhotoInfo.ExifInfo.metering_mode" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py attribute">
<dt id="osxphotos.PhotoInfo.ExifInfo.sample_rate">
<code class="sig-name descname">sample_rate</code><em class="property">: int</em><a class="headerlink" href="#osxphotos.PhotoInfo.ExifInfo.sample_rate" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py attribute">
<dt id="osxphotos.PhotoInfo.ExifInfo.shutter_speed">
<code class="sig-name descname">shutter_speed</code><em class="property">: float</em><a class="headerlink" href="#osxphotos.PhotoInfo.ExifInfo.shutter_speed" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py attribute">
<dt id="osxphotos.PhotoInfo.ExifInfo.track_format">
<code class="sig-name descname">track_format</code><em class="property">: int</em><a class="headerlink" href="#osxphotos.PhotoInfo.ExifInfo.track_format" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py attribute">
<dt id="osxphotos.PhotoInfo.ExifInfo.white_balance">
<code class="sig-name descname">white_balance</code><em class="property">: int</em><a class="headerlink" href="#osxphotos.PhotoInfo.ExifInfo.white_balance" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="py class">
<dt id="osxphotos.PhotoInfo.ExportResults">
<em class="property">class </em><code class="sig-name descname">ExportResults</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">exported</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">new</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">updated</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">skipped</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">exif_updated</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">touched</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">converted_to_jpeg</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">sidecar_json_written</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">sidecar_json_skipped</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">sidecar_exiftool_written</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">sidecar_exiftool_skipped</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">sidecar_xmp_written</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">sidecar_xmp_skipped</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">missing</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">error</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">exiftool_warning</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">exiftool_error</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">xattr_written</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">xattr_skipped</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="headerlink" href="#osxphotos.PhotoInfo.ExportResults" title="Permalink to this definition"></a></dt>
<dd><p>holds export results for export2</p>
<dl class="py method">
<dt id="osxphotos.PhotoInfo.ExportResults.all_files">
<code class="sig-name descname">all_files</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#osxphotos.PhotoInfo.ExportResults.all_files" title="Permalink to this definition"></a></dt>
<dd><p>return all filenames contained in results</p>
</dd></dl>
</dd></dl>
<dl class="py class">
<dt id="osxphotos.PhotoInfo.ScoreInfo">
<em class="property">class </em><code class="sig-name descname">ScoreInfo</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">overall</span><span class="p">:</span> <span class="n">float</span></em>, <em class="sig-param"><span class="n">curation</span><span class="p">:</span> <span class="n">float</span></em>, <em class="sig-param"><span class="n">promotion</span><span class="p">:</span> <span class="n">float</span></em>, <em class="sig-param"><span class="n">highlight_visibility</span><span class="p">:</span> <span class="n">float</span></em>, <em class="sig-param"><span class="n">behavioral</span><span class="p">:</span> <span class="n">float</span></em>, <em class="sig-param"><span class="n">failure</span><span class="p">:</span> <span class="n">float</span></em>, <em class="sig-param"><span class="n">harmonious_color</span><span class="p">:</span> <span class="n">float</span></em>, <em class="sig-param"><span class="n">immersiveness</span><span class="p">:</span> <span class="n">float</span></em>, <em class="sig-param"><span class="n">interaction</span><span class="p">:</span> <span class="n">float</span></em>, <em class="sig-param"><span class="n">interesting_subject</span><span class="p">:</span> <span class="n">float</span></em>, <em class="sig-param"><span class="n">intrusive_object_presence</span><span class="p">:</span> <span class="n">float</span></em>, <em class="sig-param"><span class="n">lively_color</span><span class="p">:</span> <span class="n">float</span></em>, <em class="sig-param"><span class="n">low_light</span><span class="p">:</span> <span class="n">float</span></em>, <em class="sig-param"><span class="n">noise</span><span class="p">:</span> <span class="n">float</span></em>, <em class="sig-param"><span class="n">pleasant_camera_tilt</span><span class="p">:</span> <span class="n">float</span></em>, <em class="sig-param"><span class="n">pleasant_composition</span><span class="p">:</span> <span class="n">float</span></em>, <em class="sig-param"><span class="n">pleasant_lighting</span><span class="p">:</span> <span class="n">float</span></em>, <em class="sig-param"><span class="n">pleasant_pattern</span><span class="p">:</span> <span class="n">float</span></em>, <em class="sig-param"><span class="n">pleasant_perspective</span><span class="p">:</span> <span class="n">float</span></em>, <em class="sig-param"><span class="n">pleasant_post_processing</span><span class="p">:</span> <span class="n">float</span></em>, <em class="sig-param"><span class="n">pleasant_reflection</span><span class="p">:</span> <span class="n">float</span></em>, <em class="sig-param"><span class="n">pleasant_symmetry</span><span class="p">:</span> <span class="n">float</span></em>, <em class="sig-param"><span class="n">sharply_focused_subject</span><span class="p">:</span> <span class="n">float</span></em>, <em class="sig-param"><span class="n">tastefully_blurred</span><span class="p">:</span> <span class="n">float</span></em>, <em class="sig-param"><span class="n">well_chosen_subject</span><span class="p">:</span> <span class="n">float</span></em>, <em class="sig-param"><span class="n">well_framed_subject</span><span class="p">:</span> <span class="n">float</span></em>, <em class="sig-param"><span class="n">well_timed_shot</span><span class="p">:</span> <span class="n">float</span></em><span class="sig-paren">)</span><a class="headerlink" href="#osxphotos.PhotoInfo.ScoreInfo" title="Permalink to this definition"></a></dt>
<dd><p>Computed photo score info associated with a photo from the Photos library</p>
<dl class="py attribute">
<dt id="osxphotos.PhotoInfo.ScoreInfo.behavioral">
<code class="sig-name descname">behavioral</code><em class="property">: float</em><a class="headerlink" href="#osxphotos.PhotoInfo.ScoreInfo.behavioral" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py attribute">
<dt id="osxphotos.PhotoInfo.ScoreInfo.curation">
<code class="sig-name descname">curation</code><em class="property">: float</em><a class="headerlink" href="#osxphotos.PhotoInfo.ScoreInfo.curation" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py attribute">
<dt id="osxphotos.PhotoInfo.ScoreInfo.failure">
<code class="sig-name descname">failure</code><em class="property">: float</em><a class="headerlink" href="#osxphotos.PhotoInfo.ScoreInfo.failure" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py attribute">
<dt id="osxphotos.PhotoInfo.ScoreInfo.harmonious_color">
<code class="sig-name descname">harmonious_color</code><em class="property">: float</em><a class="headerlink" href="#osxphotos.PhotoInfo.ScoreInfo.harmonious_color" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py attribute">
<dt id="osxphotos.PhotoInfo.ScoreInfo.highlight_visibility">
<code class="sig-name descname">highlight_visibility</code><em class="property">: float</em><a class="headerlink" href="#osxphotos.PhotoInfo.ScoreInfo.highlight_visibility" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py attribute">
<dt id="osxphotos.PhotoInfo.ScoreInfo.immersiveness">
<code class="sig-name descname">immersiveness</code><em class="property">: float</em><a class="headerlink" href="#osxphotos.PhotoInfo.ScoreInfo.immersiveness" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py attribute">
<dt id="osxphotos.PhotoInfo.ScoreInfo.interaction">
<code class="sig-name descname">interaction</code><em class="property">: float</em><a class="headerlink" href="#osxphotos.PhotoInfo.ScoreInfo.interaction" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py attribute">
<dt id="osxphotos.PhotoInfo.ScoreInfo.interesting_subject">
<code class="sig-name descname">interesting_subject</code><em class="property">: float</em><a class="headerlink" href="#osxphotos.PhotoInfo.ScoreInfo.interesting_subject" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py attribute">
<dt id="osxphotos.PhotoInfo.ScoreInfo.intrusive_object_presence">
<code class="sig-name descname">intrusive_object_presence</code><em class="property">: float</em><a class="headerlink" href="#osxphotos.PhotoInfo.ScoreInfo.intrusive_object_presence" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py attribute">
<dt id="osxphotos.PhotoInfo.ScoreInfo.lively_color">
<code class="sig-name descname">lively_color</code><em class="property">: float</em><a class="headerlink" href="#osxphotos.PhotoInfo.ScoreInfo.lively_color" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py attribute">
<dt id="osxphotos.PhotoInfo.ScoreInfo.low_light">
<code class="sig-name descname">low_light</code><em class="property">: float</em><a class="headerlink" href="#osxphotos.PhotoInfo.ScoreInfo.low_light" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py attribute">
<dt id="osxphotos.PhotoInfo.ScoreInfo.noise">
<code class="sig-name descname">noise</code><em class="property">: float</em><a class="headerlink" href="#osxphotos.PhotoInfo.ScoreInfo.noise" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py attribute">
<dt id="osxphotos.PhotoInfo.ScoreInfo.overall">
<code class="sig-name descname">overall</code><em class="property">: float</em><a class="headerlink" href="#osxphotos.PhotoInfo.ScoreInfo.overall" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py attribute">
<dt id="osxphotos.PhotoInfo.ScoreInfo.pleasant_camera_tilt">
<code class="sig-name descname">pleasant_camera_tilt</code><em class="property">: float</em><a class="headerlink" href="#osxphotos.PhotoInfo.ScoreInfo.pleasant_camera_tilt" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py attribute">
<dt id="osxphotos.PhotoInfo.ScoreInfo.pleasant_composition">
<code class="sig-name descname">pleasant_composition</code><em class="property">: float</em><a class="headerlink" href="#osxphotos.PhotoInfo.ScoreInfo.pleasant_composition" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py attribute">
<dt id="osxphotos.PhotoInfo.ScoreInfo.pleasant_lighting">
<code class="sig-name descname">pleasant_lighting</code><em class="property">: float</em><a class="headerlink" href="#osxphotos.PhotoInfo.ScoreInfo.pleasant_lighting" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py attribute">
<dt id="osxphotos.PhotoInfo.ScoreInfo.pleasant_pattern">
<code class="sig-name descname">pleasant_pattern</code><em class="property">: float</em><a class="headerlink" href="#osxphotos.PhotoInfo.ScoreInfo.pleasant_pattern" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py attribute">
<dt id="osxphotos.PhotoInfo.ScoreInfo.pleasant_perspective">
<code class="sig-name descname">pleasant_perspective</code><em class="property">: float</em><a class="headerlink" href="#osxphotos.PhotoInfo.ScoreInfo.pleasant_perspective" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py attribute">
<dt id="osxphotos.PhotoInfo.ScoreInfo.pleasant_post_processing">
<code class="sig-name descname">pleasant_post_processing</code><em class="property">: float</em><a class="headerlink" href="#osxphotos.PhotoInfo.ScoreInfo.pleasant_post_processing" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py attribute">
<dt id="osxphotos.PhotoInfo.ScoreInfo.pleasant_reflection">
<code class="sig-name descname">pleasant_reflection</code><em class="property">: float</em><a class="headerlink" href="#osxphotos.PhotoInfo.ScoreInfo.pleasant_reflection" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py attribute">
<dt id="osxphotos.PhotoInfo.ScoreInfo.pleasant_symmetry">
<code class="sig-name descname">pleasant_symmetry</code><em class="property">: float</em><a class="headerlink" href="#osxphotos.PhotoInfo.ScoreInfo.pleasant_symmetry" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py attribute">
<dt id="osxphotos.PhotoInfo.ScoreInfo.promotion">
<code class="sig-name descname">promotion</code><em class="property">: float</em><a class="headerlink" href="#osxphotos.PhotoInfo.ScoreInfo.promotion" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py attribute">
<dt id="osxphotos.PhotoInfo.ScoreInfo.sharply_focused_subject">
<code class="sig-name descname">sharply_focused_subject</code><em class="property">: float</em><a class="headerlink" href="#osxphotos.PhotoInfo.ScoreInfo.sharply_focused_subject" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py attribute">
<dt id="osxphotos.PhotoInfo.ScoreInfo.tastefully_blurred">
<code class="sig-name descname">tastefully_blurred</code><em class="property">: float</em><a class="headerlink" href="#osxphotos.PhotoInfo.ScoreInfo.tastefully_blurred" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py attribute">
<dt id="osxphotos.PhotoInfo.ScoreInfo.well_chosen_subject">
<code class="sig-name descname">well_chosen_subject</code><em class="property">: float</em><a class="headerlink" href="#osxphotos.PhotoInfo.ScoreInfo.well_chosen_subject" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py attribute">
<dt id="osxphotos.PhotoInfo.ScoreInfo.well_framed_subject">
<code class="sig-name descname">well_framed_subject</code><em class="property">: float</em><a class="headerlink" href="#osxphotos.PhotoInfo.ScoreInfo.well_framed_subject" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py attribute">
<dt id="osxphotos.PhotoInfo.ScoreInfo.well_timed_shot">
<code class="sig-name descname">well_timed_shot</code><em class="property">: float</em><a class="headerlink" href="#osxphotos.PhotoInfo.ScoreInfo.well_timed_shot" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="py class">
<dt id="osxphotos.PhotoInfo.SearchInfo">
<em class="property">class </em><code class="sig-name descname">SearchInfo</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">photo</span></em>, <em class="sig-param"><span class="n">normalized</span><span class="o">=</span><span class="default_value">False</span></em><span class="sig-paren">)</span><a class="headerlink" href="#osxphotos.PhotoInfo.SearchInfo" title="Permalink to this definition"></a></dt>
<dd><p>Info about search terms such as machine learning labels that Photos knows about a photo</p>
<dl class="py method">
<dt id="osxphotos.PhotoInfo.SearchInfo.activities">
<em class="property">property </em><code class="sig-name descname">activities</code><a class="headerlink" href="#osxphotos.PhotoInfo.SearchInfo.activities" title="Permalink to this definition"></a></dt>
<dd><p>returns list of activity names</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotoInfo.SearchInfo.all">
<em class="property">property </em><code class="sig-name descname">all</code><a class="headerlink" href="#osxphotos.PhotoInfo.SearchInfo.all" title="Permalink to this definition"></a></dt>
<dd><p>return all search info properties in a single list</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotoInfo.SearchInfo.asdict">
<code class="sig-name descname">asdict</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#osxphotos.PhotoInfo.SearchInfo.asdict" title="Permalink to this definition"></a></dt>
<dd><p>return dict of search info</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotoInfo.SearchInfo.bodies_of_water">
<em class="property">property </em><code class="sig-name descname">bodies_of_water</code><a class="headerlink" href="#osxphotos.PhotoInfo.SearchInfo.bodies_of_water" title="Permalink to this definition"></a></dt>
<dd><p>returns list of body of water names</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotoInfo.SearchInfo.city">
<em class="property">property </em><code class="sig-name descname">city</code><a class="headerlink" href="#osxphotos.PhotoInfo.SearchInfo.city" title="Permalink to this definition"></a></dt>
<dd><p>returns city/town</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotoInfo.SearchInfo.country">
<em class="property">property </em><code class="sig-name descname">country</code><a class="headerlink" href="#osxphotos.PhotoInfo.SearchInfo.country" title="Permalink to this definition"></a></dt>
<dd><p>returns country name</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotoInfo.SearchInfo.holidays">
<em class="property">property </em><code class="sig-name descname">holidays</code><a class="headerlink" href="#osxphotos.PhotoInfo.SearchInfo.holidays" title="Permalink to this definition"></a></dt>
<dd><p>returns list of holiday names</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotoInfo.SearchInfo.labels">
<em class="property">property </em><code class="sig-name descname">labels</code><a class="headerlink" href="#osxphotos.PhotoInfo.SearchInfo.labels" title="Permalink to this definition"></a></dt>
<dd><p>return list of labels associated with Photo</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotoInfo.SearchInfo.locality_names">
<em class="property">property </em><code class="sig-name descname">locality_names</code><a class="headerlink" href="#osxphotos.PhotoInfo.SearchInfo.locality_names" title="Permalink to this definition"></a></dt>
<dd><p>returns list of other locality names</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotoInfo.SearchInfo.media_types">
<em class="property">property </em><code class="sig-name descname">media_types</code><a class="headerlink" href="#osxphotos.PhotoInfo.SearchInfo.media_types" title="Permalink to this definition"></a></dt>
<dd><p>returns list of media types (photo, video, panorama, etc)</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotoInfo.SearchInfo.month">
<em class="property">property </em><code class="sig-name descname">month</code><a class="headerlink" href="#osxphotos.PhotoInfo.SearchInfo.month" title="Permalink to this definition"></a></dt>
<dd><p>returns month name</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotoInfo.SearchInfo.neighborhoods">
<em class="property">property </em><code class="sig-name descname">neighborhoods</code><a class="headerlink" href="#osxphotos.PhotoInfo.SearchInfo.neighborhoods" title="Permalink to this definition"></a></dt>
<dd><p>returns list of neighborhoods</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotoInfo.SearchInfo.place_names">
<em class="property">property </em><code class="sig-name descname">place_names</code><a class="headerlink" href="#osxphotos.PhotoInfo.SearchInfo.place_names" title="Permalink to this definition"></a></dt>
<dd><p>returns list of place names</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotoInfo.SearchInfo.season">
<em class="property">property </em><code class="sig-name descname">season</code><a class="headerlink" href="#osxphotos.PhotoInfo.SearchInfo.season" title="Permalink to this definition"></a></dt>
<dd><p>returns season name</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotoInfo.SearchInfo.state">
<em class="property">property </em><code class="sig-name descname">state</code><a class="headerlink" href="#osxphotos.PhotoInfo.SearchInfo.state" title="Permalink to this definition"></a></dt>
<dd><p>returns state name</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotoInfo.SearchInfo.state_abbreviation">
<em class="property">property </em><code class="sig-name descname">state_abbreviation</code><a class="headerlink" href="#osxphotos.PhotoInfo.SearchInfo.state_abbreviation" title="Permalink to this definition"></a></dt>
<dd><p>returns state abbreviation</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotoInfo.SearchInfo.streets">
<em class="property">property </em><code class="sig-name descname">streets</code><a class="headerlink" href="#osxphotos.PhotoInfo.SearchInfo.streets" title="Permalink to this definition"></a></dt>
<dd><p>returns list of street names</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotoInfo.SearchInfo.venue_types">
<em class="property">property </em><code class="sig-name descname">venue_types</code><a class="headerlink" href="#osxphotos.PhotoInfo.SearchInfo.venue_types" title="Permalink to this definition"></a></dt>
<dd><p>returns list of venue types</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotoInfo.SearchInfo.venues">
<em class="property">property </em><code class="sig-name descname">venues</code><a class="headerlink" href="#osxphotos.PhotoInfo.SearchInfo.venues" title="Permalink to this definition"></a></dt>
<dd><p>returns list of venue names</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotoInfo.SearchInfo.year">
<em class="property">property </em><code class="sig-name descname">year</code><a class="headerlink" href="#osxphotos.PhotoInfo.SearchInfo.year" title="Permalink to this definition"></a></dt>
<dd><p>returns year</p>
</dd></dl>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotoInfo.album_info">
<em class="property">property </em><code class="sig-name descname">album_info</code><a class="headerlink" href="#osxphotos.PhotoInfo.album_info" title="Permalink to this definition"></a></dt>
<dd><p>list of AlbumInfo objects representing albums the photos is contained in</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotoInfo.albums">
<em class="property">property </em><code class="sig-name descname">albums</code><a class="headerlink" href="#osxphotos.PhotoInfo.albums" title="Permalink to this definition"></a></dt>
<dd><p>list of albums picture is contained in</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotoInfo.asdict">
<code class="sig-name descname">asdict</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/osxphotos/photoinfo/photoinfo.html#PhotoInfo.asdict"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#osxphotos.PhotoInfo.asdict" title="Permalink to this definition"></a></dt>
<dd><p>return dict representation</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotoInfo.burst">
<em class="property">property </em><code class="sig-name descname">burst</code><a class="headerlink" href="#osxphotos.PhotoInfo.burst" title="Permalink to this definition"></a></dt>
<dd><p>Returns True if photo is part of a Burst photo set, otherwise False</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotoInfo.burst_photos">
<em class="property">property </em><code class="sig-name descname">burst_photos</code><a class="headerlink" href="#osxphotos.PhotoInfo.burst_photos" title="Permalink to this definition"></a></dt>
<dd><p>If photo is a burst photo, returns list of PhotoInfo objects
that are part of the same burst photo set; otherwise returns empty list.
self is not included in the returned list</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotoInfo.comments">
<em class="property">property </em><code class="sig-name descname">comments</code><a class="headerlink" href="#osxphotos.PhotoInfo.comments" title="Permalink to this definition"></a></dt>
<dd><p>Returns list of Comment objects for any comments on the photo (sorted by date)</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotoInfo.date">
<em class="property">property </em><code class="sig-name descname">date</code><a class="headerlink" href="#osxphotos.PhotoInfo.date" title="Permalink to this definition"></a></dt>
<dd><p>image creation date as timezone aware datetime object</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotoInfo.date_modified">
<em class="property">property </em><code class="sig-name descname">date_modified</code><a class="headerlink" href="#osxphotos.PhotoInfo.date_modified" title="Permalink to this definition"></a></dt>
<dd><p>image modification date as timezone aware datetime object
or None if no modification date set</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotoInfo.date_trashed">
<em class="property">property </em><code class="sig-name descname">date_trashed</code><a class="headerlink" href="#osxphotos.PhotoInfo.date_trashed" title="Permalink to this definition"></a></dt>
<dd><p>Date asset was placed in the trash or None</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotoInfo.description">
<em class="property">property </em><code class="sig-name descname">description</code><a class="headerlink" href="#osxphotos.PhotoInfo.description" title="Permalink to this definition"></a></dt>
<dd><p>long / extended description of picture</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotoInfo.exif_info">
<em class="property">property </em><code class="sig-name descname">exif_info</code><a class="headerlink" href="#osxphotos.PhotoInfo.exif_info" title="Permalink to this definition"></a></dt>
<dd><p>Returns an ExifInfo object with the EXIF data for photo
Note: the returned EXIF data is the data Photos stores in the database on import;
ExifInfo does not provide access to the EXIF info in the actual image file
Some or all of the fields may be None
Only valid for Photos 5; on earlier database returns None</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotoInfo.exiftool">
<em class="property">property </em><code class="sig-name descname">exiftool</code><a class="headerlink" href="#osxphotos.PhotoInfo.exiftool" title="Permalink to this definition"></a></dt>
<dd><p>Returns an ExifTool object for the photo
requires that exiftool (<a class="reference external" href="https://exiftool.org/">https://exiftool.org/</a>) be installed
If exiftool not installed, logs warning and returns None
If photo path is missing, returns None</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotoInfo.export">
<code class="sig-name descname">export</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">dest</span></em>, <em class="sig-param"><span class="o">*</span><span class="n">filename</span></em>, <em class="sig-param"><span class="n">edited</span><span class="o">=</span><span class="default_value">False</span></em>, <em class="sig-param"><span class="n">live_photo</span><span class="o">=</span><span class="default_value">False</span></em>, <em class="sig-param"><span class="n">raw_photo</span><span class="o">=</span><span class="default_value">False</span></em>, <em class="sig-param"><span class="n">export_as_hardlink</span><span class="o">=</span><span class="default_value">False</span></em>, <em class="sig-param"><span class="n">overwrite</span><span class="o">=</span><span class="default_value">False</span></em>, <em class="sig-param"><span class="n">increment</span><span class="o">=</span><span class="default_value">True</span></em>, <em class="sig-param"><span class="n">sidecar_json</span><span class="o">=</span><span class="default_value">False</span></em>, <em class="sig-param"><span class="n">sidecar_exiftool</span><span class="o">=</span><span class="default_value">False</span></em>, <em class="sig-param"><span class="n">sidecar_xmp</span><span class="o">=</span><span class="default_value">False</span></em>, <em class="sig-param"><span class="n">use_photos_export</span><span class="o">=</span><span class="default_value">False</span></em>, <em class="sig-param"><span class="n">timeout</span><span class="o">=</span><span class="default_value">120</span></em>, <em class="sig-param"><span class="n">exiftool</span><span class="o">=</span><span class="default_value">False</span></em>, <em class="sig-param"><span class="n">use_albums_as_keywords</span><span class="o">=</span><span class="default_value">False</span></em>, <em class="sig-param"><span class="n">use_persons_as_keywords</span><span class="o">=</span><span class="default_value">False</span></em>, <em class="sig-param"><span class="n">keyword_template</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">description_template</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="headerlink" href="#osxphotos.PhotoInfo.export" title="Permalink to this definition"></a></dt>
<dd><p>export photo
dest: must be valid destination path (or exception raised)
filename: (optional): name of exported picture; if not provided, will use current filename</p>
<blockquote>
<div><p><strong>NOTE</strong>: if provided, user must ensure file extension (suffix) is correct.
For example, if photo is .CR2 file, edited image may be .jpeg.
If you provide an extension different than what the actual file is,
export will print a warning but will export the photo using the
incorrect file extension (unless use_photos_export is true, in which case export will
use the extension provided by Photos upon export; in this case, an incorrect extension is
silently ignored).
e.g. to get the extension of the edited photo,
reference PhotoInfo.path_edited</p>
</div></blockquote>
<dl class="simple">
<dt>edited: (boolean, default=False); if True will export the edited version of the photo</dt><dd><p>(or raise exception if no edited version)</p>
</dd>
</dl>
<p>live_photo: (boolean, default=False); if True, will also export the associted .mov for live photos
raw_photo: (boolean, default=False); if True, will also export the associted RAW photo
export_as_hardlink: (boolean, default=False); if True, will hardlink files instead of copying them
overwrite: (boolean, default=False); if True will overwrite files if they alreay exist
increment: (boolean, default=True); if True, will increment file name until a non-existant name is found</p>
<blockquote>
<div><p>if overwrite=False and increment=False, export will fail if destination file already exists</p>
</div></blockquote>
<dl class="simple">
<dt>sidecar_json: if set will write a json sidecar with data in format readable by exiftool</dt><dd><p>sidecar filename will be dest/filename.json; includes exiftool tag group names (e.g. <cite>exiftool -G -j</cite>)</p>
</dd>
<dt>sidecar_exiftool: if set will write a json sidecar with data in format readable by exiftool</dt><dd><p>sidecar filename will be dest/filename.json; does not include exiftool tag group names (e.g. <cite>exiftool -j</cite>)</p>
</dd>
<dt>sidecar_xmp: if set will write an XMP sidecar with IPTC data</dt><dd><p>sidecar filename will be dest/filename.xmp</p>
</dd>
</dl>
<p>use_photos_export: (boolean, default=False); if True will attempt to export photo via applescript interaction with Photos
timeout: (int, default=120) timeout in seconds used with use_photos_export
exiftool: (boolean, default = False); if True, will use exiftool to write metadata to export file
returns list of full paths to the exported files
use_albums_as_keywords: (boolean, default = False); if True, will include album names in keywords
when exporting metadata with exiftool or sidecar
use_persons_as_keywords: (boolean, default = False); if True, will include person names in keywords
when exporting metadata with exiftool or sidecar
keyword_template: (list of strings); list of template strings that will be rendered as used as keywords
description_template: string; optional template string that will be rendered for use as photo description</p>
<p>Returns: list of photos exported</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotoInfo.export2">
<code class="sig-name descname">export2</code><span class="sig-paren">(</span><em class="sig-param">dest</em>, <em class="sig-param">*filename</em>, <em class="sig-param">edited=False</em>, <em class="sig-param">live_photo=False</em>, <em class="sig-param">raw_photo=False</em>, <em class="sig-param">export_as_hardlink=False</em>, <em class="sig-param">overwrite=False</em>, <em class="sig-param">increment=True</em>, <em class="sig-param">sidecar=0</em>, <em class="sig-param">sidecar_drop_ext=False</em>, <em class="sig-param">use_photos_export=False</em>, <em class="sig-param">timeout=120</em>, <em class="sig-param">exiftool=False</em>, <em class="sig-param">use_albums_as_keywords=False</em>, <em class="sig-param">use_persons_as_keywords=False</em>, <em class="sig-param">keyword_template=None</em>, <em class="sig-param">description_template=None</em>, <em class="sig-param">update=False</em>, <em class="sig-param">ignore_signature=False</em>, <em class="sig-param">export_db=None</em>, <em class="sig-param">fileutil=&lt;class 'osxphotos.fileutil.FileUtil'&gt;</em>, <em class="sig-param">dry_run=False</em>, <em class="sig-param">touch_file=False</em>, <em class="sig-param">convert_to_jpeg=False</em>, <em class="sig-param">jpeg_quality=1.0</em>, <em class="sig-param">ignore_date_modified=False</em>, <em class="sig-param">use_photokit=False</em>, <em class="sig-param">verbose=None</em>, <em class="sig-param">exiftool_flags=None</em>, <em class="sig-param">merge_exif_keywords=False</em>, <em class="sig-param">merge_exif_persons=False</em>, <em class="sig-param">jpeg_ext=None</em><span class="sig-paren">)</span><a class="headerlink" href="#osxphotos.PhotoInfo.export2" title="Permalink to this definition"></a></dt>
<dd><p>export photo, like export but with update and dry_run options
dest: must be valid destination path or exception raised
filename: (optional): name of exported picture; if not provided, will use current filename</p>
<blockquote>
<div><p><strong>NOTE</strong>: if provided, user must ensure file extension (suffix) is correct.
For example, if photo is .CR2 file, edited image may be .jpeg.
If you provide an extension different than what the actual file is,
will export the photo using the incorrect file extension (unless use_photos_export is true,
in which case export will use the extension provided by Photos upon export.
e.g. to get the extension of the edited photo,
reference PhotoInfo.path_edited</p>
</div></blockquote>
<dl class="simple">
<dt>edited: (boolean, default=False); if True will export the edited version of the photo</dt><dd><p>(or raise exception if no edited version)</p>
</dd>
</dl>
<p>live_photo: (boolean, default=False); if True, will also export the associted .mov for live photos
raw_photo: (boolean, default=False); if True, will also export the associted RAW photo
export_as_hardlink: (boolean, default=False); if True, will hardlink files instead of copying them
overwrite: (boolean, default=False); if True will overwrite files if they alreay exist
increment: (boolean, default=True); if True, will increment file name until a non-existant name is found</p>
<blockquote>
<div><p>if overwrite=False and increment=False, export will fail if destination file already exists</p>
</div></blockquote>
<dl class="simple">
<dt>sidecar: bit field: set to one or more of SIDECAR_XMP, SIDECAR_JSON, SIDECAR_EXIFTOOL</dt><dd><dl class="simple">
<dt>SIDECAR_JSON: if set will write a json sidecar with data in format readable by exiftool</dt><dd><p>sidecar filename will be dest/filename.json; includes exiftool tag group names (e.g. <cite>exiftool -G -j</cite>)</p>
</dd>
<dt>SIDECAR_EXIFTOOL: if set will write a json sidecar with data in format readable by exiftool</dt><dd><p>sidecar filename will be dest/filename.json; does not include exiftool tag group names (e.g. <cite>exiftool -j</cite>)</p>
</dd>
<dt>SIDECAR_XMP: if set will write an XMP sidecar with IPTC data</dt><dd><p>sidecar filename will be dest/filename.xmp</p>
</dd>
</dl>
</dd>
</dl>
<p>sidecar_drop_ext: (boolean, default=False); if True, drops the photos extension from sidecar filename (e.g. IMG_1234.json instead of IMG_1234.JPG.json)
use_photos_export: (boolean, default=False); if True will attempt to export photo via applescript interaction with Photos
timeout: (int, default=120) timeout in seconds used with use_photos_export
exiftool: (boolean, default = False); if True, will use exiftool to write metadata to export file
use_albums_as_keywords: (boolean, default = False); if True, will include album names in keywords
when exporting metadata with exiftool or sidecar
use_persons_as_keywords: (boolean, default = False); if True, will include person names in keywords
when exporting metadata with exiftool or sidecar
keyword_template: (list of strings); list of template strings that will be rendered as used as keywords
description_template: string; optional template string that will be rendered for use as photo description
update: (boolean, default=False); if True export will run in update mode, that is, it will</p>
<blockquote>
<div><p>not export the photo if the current version already exists in the destination</p>
</div></blockquote>
<p>ignore_signature: (bool, default=False), ignore file signature when used with update (look only at filename)
export_db: (ExportDB_ABC); instance of a class that conforms to ExportDB_ABC with methods</p>
<blockquote>
<div><p>for getting/setting data related to exported files to compare update state</p>
</div></blockquote>
<p>fileutil: (FileUtilABC); class that conforms to FileUtilABC with various file utilities
dry_run: (boolean, default=False); set to True to run in “dry run” mode
touch_file: (boolean, default=False); if True, sets files modification time upon photo date
convert_to_jpeg: boolean; if True, converts non-jpeg images to jpeg
jpeg_quality: float in range 0.0 &lt;= jpeg_quality &lt;= 1.0. A value of 1.0 specifies use best quality, a value of 0.0 specifies use maximum compression.
ignore_date_modified: for use with sidecar and exiftool; if True, sets EXIF:ModifyDate to EXIF:DateTimeOriginal even if date_modified is set
verbose: optional callable function to use for printing verbose text during processing; if None (default), does not print output.
exiftool_flags: optional list of flags to pass to exiftool when using exiftool option, e.g [“-m”, “-F”]
merge_exif_keywords: boolean; if True, merged keywords found in files exif data (requires exiftool)
merge_exif_persons: boolean; if True, merged persons found in files exif data (requires exiftool)
jpeg_ext: if set, will use this value for extension on jpegs converted to jpeg with convert_to_jpeg; if not set, uses jpeg; do not include the leading “.”</p>
<dl class="simple">
<dt>Returns: ExportResults class</dt><dd><p>ExportResults has attributes:
“exported”,
“new”,
“updated”,
“skipped”,
“exif_updated”,
“touched”,
“converted_to_jpeg”,
“sidecar_json_written”,
“sidecar_json_skipped”,
“sidecar_exiftool_written”,
“sidecar_exiftool_skipped”,
“sidecar_xmp_written”,
“sidecar_xmp_skipped”,
“missing”,
“error”,
“error_str”,
“exiftool_warning”,
“exiftool_error”,</p>
</dd>
<dt>Note: to use dry run mode, you must set dry_run=True and also pass in memory version of export_db,</dt><dd><p>and no-op fileutil (e.g. ExportDBInMemory and FileUtilNoOp)</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotoInfo.external_edit">
<em class="property">property </em><code class="sig-name descname">external_edit</code><a class="headerlink" href="#osxphotos.PhotoInfo.external_edit" title="Permalink to this definition"></a></dt>
<dd><p>Returns True if picture was edited outside of Photos using external editor</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotoInfo.face_info">
<em class="property">property </em><code class="sig-name descname">face_info</code><a class="headerlink" href="#osxphotos.PhotoInfo.face_info" title="Permalink to this definition"></a></dt>
<dd><p>list of FaceInfo objects for faces in picture</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotoInfo.favorite">
<em class="property">property </em><code class="sig-name descname">favorite</code><a class="headerlink" href="#osxphotos.PhotoInfo.favorite" title="Permalink to this definition"></a></dt>
<dd><p>True if picture is marked as favorite</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotoInfo.filename">
<em class="property">property </em><code class="sig-name descname">filename</code><a class="headerlink" href="#osxphotos.PhotoInfo.filename" title="Permalink to this definition"></a></dt>
<dd><p>filename of the picture</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotoInfo.has_raw">
<em class="property">property </em><code class="sig-name descname">has_raw</code><a class="headerlink" href="#osxphotos.PhotoInfo.has_raw" title="Permalink to this definition"></a></dt>
<dd><p>returns True if photo has an associated raw image (that is, its a RAW+JPEG pair), otherwise False</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotoInfo.hasadjustments">
<em class="property">property </em><code class="sig-name descname">hasadjustments</code><a class="headerlink" href="#osxphotos.PhotoInfo.hasadjustments" title="Permalink to this definition"></a></dt>
<dd><p>True if picture has adjustments / edits</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotoInfo.hdr">
<em class="property">property </em><code class="sig-name descname">hdr</code><a class="headerlink" href="#osxphotos.PhotoInfo.hdr" title="Permalink to this definition"></a></dt>
<dd><p>Returns True if photo is an HDR photo, otherwise False</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotoInfo.height">
<em class="property">property </em><code class="sig-name descname">height</code><a class="headerlink" href="#osxphotos.PhotoInfo.height" title="Permalink to this definition"></a></dt>
<dd><p>returns height of the current photo version in pixels</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotoInfo.hidden">
<em class="property">property </em><code class="sig-name descname">hidden</code><a class="headerlink" href="#osxphotos.PhotoInfo.hidden" title="Permalink to this definition"></a></dt>
<dd><p>True if picture is hidden</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotoInfo.import_info">
<em class="property">property </em><code class="sig-name descname">import_info</code><a class="headerlink" href="#osxphotos.PhotoInfo.import_info" title="Permalink to this definition"></a></dt>
<dd><p>ImportInfo object representing import session for the photo or None if no import session</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotoInfo.incloud">
<em class="property">property </em><code class="sig-name descname">incloud</code><a class="headerlink" href="#osxphotos.PhotoInfo.incloud" title="Permalink to this definition"></a></dt>
<dd><p>Returns True if photo is cloud asset and is synched to cloud
False if photo is cloud asset and not yet synched to cloud
None if photo is not cloud asset</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotoInfo.intrash">
<em class="property">property </em><code class="sig-name descname">intrash</code><a class="headerlink" href="#osxphotos.PhotoInfo.intrash" title="Permalink to this definition"></a></dt>
<dd><p>True if picture is in trash (Recently Deleted folder)</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotoInfo.iscloudasset">
<em class="property">property </em><code class="sig-name descname">iscloudasset</code><a class="headerlink" href="#osxphotos.PhotoInfo.iscloudasset" title="Permalink to this definition"></a></dt>
<dd><p>Returns True if photo is a cloud asset (in an iCloud library),
otherwise False</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotoInfo.ismissing">
<em class="property">property </em><code class="sig-name descname">ismissing</code><a class="headerlink" href="#osxphotos.PhotoInfo.ismissing" title="Permalink to this definition"></a></dt>
<dd><p>returns true if photo is missing from disk (which means its not been downloaded from iCloud)
NOTE: the photos.db database uses an asynchrounous write-ahead log so changes in Photos</p>
<blockquote>
<div><p>do not immediately get written to disk. In particular, Ive noticed that downloading
an image from the cloud does not force the database to be updated until something else
e.g. an edit, keyword, etc. occurs forcing a database synch
The exact process / timing is a mystery to be but be aware that if some photos were recently
downloaded from cloud to local storate their status in the database might still show
isMissing = 1</p>
</div></blockquote>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotoInfo.ismovie">
<em class="property">property </em><code class="sig-name descname">ismovie</code><a class="headerlink" href="#osxphotos.PhotoInfo.ismovie" title="Permalink to this definition"></a></dt>
<dd><p>Returns True if file is a movie, otherwise False</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotoInfo.isphoto">
<em class="property">property </em><code class="sig-name descname">isphoto</code><a class="headerlink" href="#osxphotos.PhotoInfo.isphoto" title="Permalink to this definition"></a></dt>
<dd><p>Returns True if file is an image, otherwise False</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotoInfo.israw">
<em class="property">property </em><code class="sig-name descname">israw</code><a class="headerlink" href="#osxphotos.PhotoInfo.israw" title="Permalink to this definition"></a></dt>
<dd><p>returns True if photo is a raw image. For images with an associated RAW+JPEG pair, see has_raw</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotoInfo.isreference">
<em class="property">property </em><code class="sig-name descname">isreference</code><a class="headerlink" href="#osxphotos.PhotoInfo.isreference" title="Permalink to this definition"></a></dt>
<dd><p>Returns True if photo is a reference (not copied to the Photos library), otherwise False</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotoInfo.json">
<code class="sig-name descname">json</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/osxphotos/photoinfo/photoinfo.html#PhotoInfo.json"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#osxphotos.PhotoInfo.json" title="Permalink to this definition"></a></dt>
<dd><p>Return JSON representation</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotoInfo.keywords">
<em class="property">property </em><code class="sig-name descname">keywords</code><a class="headerlink" href="#osxphotos.PhotoInfo.keywords" title="Permalink to this definition"></a></dt>
<dd><p>list of keywords for picture</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotoInfo.labels">
<em class="property">property </em><code class="sig-name descname">labels</code><a class="headerlink" href="#osxphotos.PhotoInfo.labels" title="Permalink to this definition"></a></dt>
<dd><p>returns list of labels applied to photo by Photos image categorization
only valid on Photos 5, on older libraries returns empty list</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotoInfo.labels_normalized">
<em class="property">property </em><code class="sig-name descname">labels_normalized</code><a class="headerlink" href="#osxphotos.PhotoInfo.labels_normalized" title="Permalink to this definition"></a></dt>
<dd><p>returns normalized list of labels applied to photo by Photos image categorization
only valid on Photos 5, on older libraries returns empty list</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotoInfo.likes">
<em class="property">property </em><code class="sig-name descname">likes</code><a class="headerlink" href="#osxphotos.PhotoInfo.likes" title="Permalink to this definition"></a></dt>
<dd><p>Returns list of Like objects for any likes on the photo (sorted by date)</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotoInfo.live_photo">
<em class="property">property </em><code class="sig-name descname">live_photo</code><a class="headerlink" href="#osxphotos.PhotoInfo.live_photo" title="Permalink to this definition"></a></dt>
<dd><p>Returns True if photo is a live photo, otherwise False</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotoInfo.location">
<em class="property">property </em><code class="sig-name descname">location</code><a class="headerlink" href="#osxphotos.PhotoInfo.location" title="Permalink to this definition"></a></dt>
<dd><p>returns (latitude, longitude) as float in degrees or None</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotoInfo.orientation">
<em class="property">property </em><code class="sig-name descname">orientation</code><a class="headerlink" href="#osxphotos.PhotoInfo.orientation" title="Permalink to this definition"></a></dt>
<dd><p>returns EXIF orientation of the current photo version as int</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotoInfo.original_filename">
<em class="property">property </em><code class="sig-name descname">original_filename</code><a class="headerlink" href="#osxphotos.PhotoInfo.original_filename" title="Permalink to this definition"></a></dt>
<dd><p>original filename of the picture
Photos 5 mangles filenames upon import</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotoInfo.original_filesize">
<em class="property">property </em><code class="sig-name descname">original_filesize</code><a class="headerlink" href="#osxphotos.PhotoInfo.original_filesize" title="Permalink to this definition"></a></dt>
<dd><p>returns filesize of original photo in bytes as int</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotoInfo.original_height">
<em class="property">property </em><code class="sig-name descname">original_height</code><a class="headerlink" href="#osxphotos.PhotoInfo.original_height" title="Permalink to this definition"></a></dt>
<dd><p>returns height of the original photo version in pixels</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotoInfo.original_orientation">
<em class="property">property </em><code class="sig-name descname">original_orientation</code><a class="headerlink" href="#osxphotos.PhotoInfo.original_orientation" title="Permalink to this definition"></a></dt>
<dd><p>returns EXIF orientation of the original photo version as int</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotoInfo.original_width">
<em class="property">property </em><code class="sig-name descname">original_width</code><a class="headerlink" href="#osxphotos.PhotoInfo.original_width" title="Permalink to this definition"></a></dt>
<dd><p>returns width of the original photo version in pixels</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotoInfo.panorama">
<em class="property">property </em><code class="sig-name descname">panorama</code><a class="headerlink" href="#osxphotos.PhotoInfo.panorama" title="Permalink to this definition"></a></dt>
<dd><p>Returns True if photo is a panorama, otherwise False</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotoInfo.path">
<em class="property">property </em><code class="sig-name descname">path</code><a class="headerlink" href="#osxphotos.PhotoInfo.path" title="Permalink to this definition"></a></dt>
<dd><p>absolute path on disk of the original picture</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotoInfo.path_edited">
<em class="property">property </em><code class="sig-name descname">path_edited</code><a class="headerlink" href="#osxphotos.PhotoInfo.path_edited" title="Permalink to this definition"></a></dt>
<dd><p>absolute path on disk of the edited picture</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotoInfo.path_live_photo">
<em class="property">property </em><code class="sig-name descname">path_live_photo</code><a class="headerlink" href="#osxphotos.PhotoInfo.path_live_photo" title="Permalink to this definition"></a></dt>
<dd><p>Returns path to the associated video file for a live photo
If photo is not a live photo, returns None
If photo is missing, returns None</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotoInfo.path_raw">
<em class="property">property </em><code class="sig-name descname">path_raw</code><a class="headerlink" href="#osxphotos.PhotoInfo.path_raw" title="Permalink to this definition"></a></dt>
<dd><p>absolute path of associated RAW image or None if there is not one</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotoInfo.person_info">
<em class="property">property </em><code class="sig-name descname">person_info</code><a class="headerlink" href="#osxphotos.PhotoInfo.person_info" title="Permalink to this definition"></a></dt>
<dd><p>list of PersonInfo objects for person in picture</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotoInfo.persons">
<em class="property">property </em><code class="sig-name descname">persons</code><a class="headerlink" href="#osxphotos.PhotoInfo.persons" title="Permalink to this definition"></a></dt>
<dd><p>list of persons in picture</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotoInfo.place">
<em class="property">property </em><code class="sig-name descname">place</code><a class="headerlink" href="#osxphotos.PhotoInfo.place" title="Permalink to this definition"></a></dt>
<dd><p>Returns PlaceInfo object containing reverse geolocation info</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotoInfo.portrait">
<em class="property">property </em><code class="sig-name descname">portrait</code><a class="headerlink" href="#osxphotos.PhotoInfo.portrait" title="Permalink to this definition"></a></dt>
<dd><p>Returns True if photo is a portrait, otherwise False</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotoInfo.raw_original">
<em class="property">property </em><code class="sig-name descname">raw_original</code><a class="headerlink" href="#osxphotos.PhotoInfo.raw_original" title="Permalink to this definition"></a></dt>
<dd><p>returns True if associated raw image and the raw image is selected in Photos
via “Use RAW as Original ”
otherwise returns False</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotoInfo.render_template">
<code class="sig-name descname">render_template</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">template_str</span></em>, <em class="sig-param"><span class="n">none_str</span><span class="o">=</span><span class="default_value">'_'</span></em>, <em class="sig-param"><span class="n">path_sep</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">expand_inplace</span><span class="o">=</span><span class="default_value">False</span></em>, <em class="sig-param"><span class="n">inplace_sep</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">filename</span><span class="o">=</span><span class="default_value">False</span></em>, <em class="sig-param"><span class="n">dirname</span><span class="o">=</span><span class="default_value">False</span></em>, <em class="sig-param"><span class="n">strip</span><span class="o">=</span><span class="default_value">False</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/osxphotos/photoinfo/photoinfo.html#PhotoInfo.render_template"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#osxphotos.PhotoInfo.render_template" title="Permalink to this definition"></a></dt>
<dd><p>Renders a template string for PhotoInfo instance using PhotoTemplate</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>template_str</strong> a template string with fields to render</p></li>
<li><p><strong>none_str</strong> a str to use if template field renders to None, default is “_”.</p></li>
<li><p><strong>path_sep</strong> a single character str to use as path separator when joining
fields like folder_album; if not provided, defaults to os.path.sep</p></li>
<li><p><strong>expand_inplace</strong> expand multi-valued substitutions in-place as a single string
instead of returning individual strings</p></li>
<li><p><strong>inplace_sep</strong> optional string to use as separator between multi-valued keywords
with expand_inplace; default is ,</p></li>
<li><p><strong>filename</strong> if True, template output will be sanitized to produce valid file name</p></li>
<li><p><strong>dirname</strong> if True, template output will be sanitized to produce valid directory name</p></li>
<li><p><strong>strip</strong> if True, strips leading/trailing white space from resulting template</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>tuple of list of rendered strings and list of unmatched template values</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>([rendered_strings], [unmatched])</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotoInfo.score">
<em class="property">property </em><code class="sig-name descname">score</code><a class="headerlink" href="#osxphotos.PhotoInfo.score" title="Permalink to this definition"></a></dt>
<dd><p>Computed score information for a photo</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>ScoreInfo instance</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotoInfo.screenshot">
<em class="property">property </em><code class="sig-name descname">screenshot</code><a class="headerlink" href="#osxphotos.PhotoInfo.screenshot" title="Permalink to this definition"></a></dt>
<dd><p>Returns True if photo is an HDR photo, otherwise False</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotoInfo.search_info">
<em class="property">property </em><code class="sig-name descname">search_info</code><a class="headerlink" href="#osxphotos.PhotoInfo.search_info" title="Permalink to this definition"></a></dt>
<dd><p>returns SearchInfo object for photo
only valid on Photos 5, on older libraries, returns None</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotoInfo.search_info_normalized">
<em class="property">property </em><code class="sig-name descname">search_info_normalized</code><a class="headerlink" href="#osxphotos.PhotoInfo.search_info_normalized" title="Permalink to this definition"></a></dt>
<dd><p>returns SearchInfo object for photo that produces normalized results
only valid on Photos 5, on older libraries, returns None</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotoInfo.selfie">
<em class="property">property </em><code class="sig-name descname">selfie</code><a class="headerlink" href="#osxphotos.PhotoInfo.selfie" title="Permalink to this definition"></a></dt>
<dd><p>Returns True if photo is a selfie (front facing camera), otherwise False</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotoInfo.shared">
<em class="property">property </em><code class="sig-name descname">shared</code><a class="headerlink" href="#osxphotos.PhotoInfo.shared" title="Permalink to this definition"></a></dt>
<dd><p>returns True if photos is in a shared iCloud album otherwise false
Only valid on Photos 5; returns None on older versions</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotoInfo.slow_mo">
<em class="property">property </em><code class="sig-name descname">slow_mo</code><a class="headerlink" href="#osxphotos.PhotoInfo.slow_mo" title="Permalink to this definition"></a></dt>
<dd><p>Returns True if photo is a slow motion video, otherwise False</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotoInfo.time_lapse">
<em class="property">property </em><code class="sig-name descname">time_lapse</code><a class="headerlink" href="#osxphotos.PhotoInfo.time_lapse" title="Permalink to this definition"></a></dt>
<dd><p>Returns True if photo is a time lapse video, otherwise False</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotoInfo.title">
<em class="property">property </em><code class="sig-name descname">title</code><a class="headerlink" href="#osxphotos.PhotoInfo.title" title="Permalink to this definition"></a></dt>
<dd><p>name / title of picture</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotoInfo.tzoffset">
<em class="property">property </em><code class="sig-name descname">tzoffset</code><a class="headerlink" href="#osxphotos.PhotoInfo.tzoffset" title="Permalink to this definition"></a></dt>
<dd><p>timezone offset from UTC in seconds</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotoInfo.uti">
<em class="property">property </em><code class="sig-name descname">uti</code><a class="headerlink" href="#osxphotos.PhotoInfo.uti" title="Permalink to this definition"></a></dt>
<dd><p>Returns Uniform Type Identifier (UTI) for the image
for example: public.jpeg or com.apple.quicktime-movie</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotoInfo.uti_edited">
<em class="property">property </em><code class="sig-name descname">uti_edited</code><a class="headerlink" href="#osxphotos.PhotoInfo.uti_edited" title="Permalink to this definition"></a></dt>
<dd><p>Returns Uniform Type Identifier (UTI) for the edited image
if the photo has been edited, otherwise None;
for example: public.jpeg</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotoInfo.uti_original">
<em class="property">property </em><code class="sig-name descname">uti_original</code><a class="headerlink" href="#osxphotos.PhotoInfo.uti_original" title="Permalink to this definition"></a></dt>
<dd><p>Returns Uniform Type Identifier (UTI) for the original image
for example: public.jpeg or com.apple.quicktime-movie</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotoInfo.uti_raw">
<em class="property">property </em><code class="sig-name descname">uti_raw</code><a class="headerlink" href="#osxphotos.PhotoInfo.uti_raw" title="Permalink to this definition"></a></dt>
<dd><p>Returns Uniform Type Identifier (UTI) for the RAW image if there is one
for example: com.canon.cr2-raw-image
Returns None if no associated RAW image</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotoInfo.uuid">
<em class="property">property </em><code class="sig-name descname">uuid</code><a class="headerlink" href="#osxphotos.PhotoInfo.uuid" title="Permalink to this definition"></a></dt>
<dd><p>UUID of picture</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotoInfo.visible">
<em class="property">property </em><code class="sig-name descname">visible</code><a class="headerlink" href="#osxphotos.PhotoInfo.visible" title="Permalink to this definition"></a></dt>
<dd><p>True if picture is visble</p>
</dd></dl>
<dl class="py method">
<dt id="osxphotos.PhotoInfo.width">
<em class="property">property </em><code class="sig-name descname">width</code><a class="headerlink" href="#osxphotos.PhotoInfo.width" title="Permalink to this definition"></a></dt>
<dd><p>returns width of the current photo version in pixels</p>
</dd></dl>
</dd></dl>
</div>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<h1 class="logo"><a href="index.html">osxphotos</a></h1>
<h3>Navigation</h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="cli.html">osxphotos command line interface (CLI)</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">osxphotos package</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#osxphotos-module">osxphotos module</a></li>
</ul>
</li>
</ul>
<div class="relations">
<h3>Related Topics</h3>
<ul>
<li><a href="index.html">Documentation overview</a><ul>
<li>Previous: <a href="cli.html" title="previous chapter">osxphotos command line interface (CLI)</a></li>
</ul></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" />
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer">
&copy;2021, Rhet Turnbull.
|
Powered by <a href="http://sphinx-doc.org/">Sphinx 3.4.3</a>
&amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.12</a>
|
<a href="_sources/reference.rst.txt"
rel="nofollow">Page source</a>
</div>
</body>
</html>