<h1>lifted package<aclass="headerlink"href="#lifted-package"title="Permalink to this headline">¶</a></h1>
<divclass="section"id="submodules">
<h2>Submodules<aclass="headerlink"href="#submodules"title="Permalink to this headline">¶</a></h2>
</div>
<divclass="section"id="module-lifted.config">
<spanid="lifted-config-module"></span><h2>lifted.config module<aclass="headerlink"href="#module-lifted.config"title="Permalink to this headline">¶</a></h2>
<dlclass="function">
<dtid="lifted.config.configure">
<codeclass="sig-prename descclassname">lifted.config.</code><codeclass="sig-name descname">configure</code><spanclass="sig-paren">(</span><emclass="sig-param">conf</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/lifted/config.html#configure"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#lifted.config.configure"title="Permalink to this definition">¶</a></dt>
<dd><p>Add lifted settings to the configuration</p>
<p>This uses the composer.share_dir and composer.lib_dir as the base
directories for the settings.</p>
</dd></dl>
</div>
<divclass="section"id="module-lifted.providers">
<spanid="lifted-providers-module"></span><h2>lifted.providers module<aclass="headerlink"href="#module-lifted.providers"title="Permalink to this headline">¶</a></h2>
<dlclass="function">
<dtid="lifted.providers.delete_profile">
<codeclass="sig-prename descclassname">lifted.providers.</code><codeclass="sig-name descname">delete_profile</code><spanclass="sig-paren">(</span><emclass="sig-param">ucfg</em>, <emclass="sig-param">provider_name</em>, <emclass="sig-param">profile</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/lifted/providers.html#delete_profile"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#lifted.providers.delete_profile"title="Permalink to this definition">¶</a></dt>
<dd><p>Delete a provider's profile settings file</p>
<li><p><strong>provider_name</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#str"title="(in Python v3.8)"><em>str</em></a>) -- the name of the cloud provider, e.g. "azure"</p></li>
<li><p><strong>profile</strong> (<em>str != ""</em>) -- the name of the profile to save</p></li>
</ul>
</dd>
<dtclass="field-even">Raises</dt>
<ddclass="field-even"><p>ValueError when passed invalid settings or an invalid profile name</p>
</dd>
<dtclass="field-odd">Raises</dt>
<ddclass="field-odd"><p>RuntimeError when the provider or profile couldn't be found</p>
</dd>
</dl>
</dd></dl>
<dlclass="function">
<dtid="lifted.providers.list_providers">
<codeclass="sig-prename descclassname">lifted.providers.</code><codeclass="sig-name descname">list_providers</code><spanclass="sig-paren">(</span><emclass="sig-param">ucfg</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/lifted/providers.html#list_providers"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#lifted.providers.list_providers"title="Permalink to this definition">¶</a></dt>
<dd><p>List the names of the available upload providers</p>
<ddclass="field-even"><p>a list of all available provider_names</p>
</dd>
<dtclass="field-odd">Return type</dt>
<ddclass="field-odd"><p>list of str</p>
</dd>
</dl>
</dd></dl>
<dlclass="function">
<dtid="lifted.providers.load_profiles">
<codeclass="sig-prename descclassname">lifted.providers.</code><codeclass="sig-name descname">load_profiles</code><spanclass="sig-paren">(</span><emclass="sig-param">ucfg</em>, <emclass="sig-param">provider_name</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/lifted/providers.html#load_profiles"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#lifted.providers.load_profiles"title="Permalink to this definition">¶</a></dt>
<dd><p>Return all settings profiles associated with a provider</p>
<li><p><strong>provider_name</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#str"title="(in Python v3.8)"><em>str</em></a>) -- name a provider to find profiles for</p></li>
</ul>
</dd>
<dtclass="field-even">Returns</dt>
<ddclass="field-even"><p>a dict of settings dicts, keyed by profile name</p>
<codeclass="sig-prename descclassname">lifted.providers.</code><codeclass="sig-name descname">load_settings</code><spanclass="sig-paren">(</span><emclass="sig-param">ucfg</em>, <emclass="sig-param">provider_name</em>, <emclass="sig-param">profile</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/lifted/providers.html#load_settings"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#lifted.providers.load_settings"title="Permalink to this definition">¶</a></dt>
<li><p><strong>provider_name</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#str"title="(in Python v3.8)"><em>str</em></a>) -- the name of the cloud provider, e.g. "azure"</p></li>
<li><p><strong>profile</strong> (<em>str != ""</em>) -- the name of the profile to save</p></li>
</ul>
</dd>
<dtclass="field-even">Returns</dt>
<ddclass="field-even"><p>The profile settings for the selected provider</p>
<ddclass="field-even"><p>ValueError when passed invalid settings or an invalid profile name</p>
</dd>
<dtclass="field-odd">Raises</dt>
<ddclass="field-odd"><p>RuntimeError when the provider or profile couldn't be found</p>
</dd>
<dtclass="field-even">Raises</dt>
<ddclass="field-even"><p>ValueError when the passed settings are invalid</p>
</dd>
</dl>
<p>This also calls validate_settings on the loaded settings, potentially
raising an error if the saved settings are invalid.</p>
</dd></dl>
<dlclass="function">
<dtid="lifted.providers.resolve_playbook_path">
<codeclass="sig-prename descclassname">lifted.providers.</code><codeclass="sig-name descname">resolve_playbook_path</code><spanclass="sig-paren">(</span><emclass="sig-param">ucfg</em>, <emclass="sig-param">provider_name</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/lifted/providers.html#resolve_playbook_path"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#lifted.providers.resolve_playbook_path"title="Permalink to this definition">¶</a></dt>
<dd><p>Given a provider's name, return the path to its playbook</p>
<li><p><strong>provider_name</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#str"title="(in Python v3.8)"><em>str</em></a>) -- the name of the provider to find the playbook for</p></li>
</ul>
</dd>
<dtclass="field-even">Raises</dt>
<ddclass="field-even"><p>RuntimeError when the provider couldn't be found</p>
</dd>
<dtclass="field-odd">Returns</dt>
<ddclass="field-odd"><p>the path to the playbook</p>
<codeclass="sig-prename descclassname">lifted.providers.</code><codeclass="sig-name descname">resolve_provider</code><spanclass="sig-paren">(</span><emclass="sig-param">ucfg</em>, <emclass="sig-param">provider_name</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/lifted/providers.html#resolve_provider"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#lifted.providers.resolve_provider"title="Permalink to this definition">¶</a></dt>
<dd><p>Get information about the specified provider as defined in that
provider's <cite>provider.toml</cite>, including the provider's display name and expected
settings.</p>
<p>At a minimum, each setting has a display name (that likely differs from its
snake_case name) and a type. Currently, there are two types of settings:
string and boolean. String settings can optionally have a "placeholder"
value for use on the front end and a "regex" for making sure that a value
<li><p><strong>provider_name</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#str"title="(in Python v3.8)"><em>str</em></a>) -- the name of the provider to look for</p></li>
</ul>
</dd>
<dtclass="field-even">Raises</dt>
<ddclass="field-even"><p>RuntimeError when the provider couldn't be found</p>
<codeclass="sig-prename descclassname">lifted.providers.</code><codeclass="sig-name descname">save_settings</code><spanclass="sig-paren">(</span><emclass="sig-param">ucfg</em>, <emclass="sig-param">provider_name</em>, <emclass="sig-param">profile</em>, <emclass="sig-param">settings</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/lifted/providers.html#save_settings"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#lifted.providers.save_settings"title="Permalink to this definition">¶</a></dt>
<dd><p>Save (and overwrite) settings for a given provider</p>
<li><p><strong>provider_name</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#str"title="(in Python v3.8)"><em>str</em></a>) -- the name of the cloud provider, e.g. "azure"</p></li>
<li><p><strong>profile</strong> (<em>str != ""</em>) -- the name of the profile to save</p></li>
<li><p><strong>settings</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#dict"title="(in Python v3.8)"><em>dict</em></a>) -- settings to save for that provider</p></li>
</ul>
</dd>
<dtclass="field-even">Raises</dt>
<ddclass="field-even"><p>ValueError when passed invalid settings or an invalid profile name</p>
</dd>
</dl>
</dd></dl>
<dlclass="function">
<dtid="lifted.providers.validate_settings">
<codeclass="sig-prename descclassname">lifted.providers.</code><codeclass="sig-name descname">validate_settings</code><spanclass="sig-paren">(</span><emclass="sig-param">ucfg</em>, <emclass="sig-param">provider_name</em>, <emclass="sig-param">settings</em>, <emclass="sig-param">image_name=None</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/lifted/providers.html#validate_settings"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#lifted.providers.validate_settings"title="Permalink to this definition">¶</a></dt>
<dd><p>Raise a ValueError if any settings are invalid</p>
<li><p><strong>provider_name</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#str"title="(in Python v3.8)"><em>str</em></a>) -- the name of the provider to validate the settings against</p></li>
<li><p><strong>settings</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#dict"title="(in Python v3.8)"><em>dict</em></a>) -- the settings to validate</p></li>
<li><p><strong>image_name</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#str"title="(in Python v3.8)"><em>str</em></a>) -- optionally check whether an image_name is valid</p></li>
</ul>
</dd>
<dtclass="field-even">Raises</dt>
<ddclass="field-even"><p>ValueError when the passed settings are invalid</p>
</dd>
<dtclass="field-odd">Raises</dt>
<ddclass="field-odd"><p>RuntimeError when provider_name can't be found</p>
</dd>
</dl>
</dd></dl>
</div>
<divclass="section"id="module-lifted.queue">
<spanid="lifted-queue-module"></span><h2>lifted.queue module<aclass="headerlink"href="#module-lifted.queue"title="Permalink to this headline">¶</a></h2>
<dlclass="function">
<dtid="lifted.queue.cancel_upload">
<codeclass="sig-prename descclassname">lifted.queue.</code><codeclass="sig-name descname">cancel_upload</code><spanclass="sig-paren">(</span><emclass="sig-param">ucfg</em>, <emclass="sig-param">uuid</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/lifted/queue.html#cancel_upload"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#lifted.queue.cancel_upload"title="Permalink to this definition">¶</a></dt>
<dd><p>Cancel an upload</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><ulclass="simple">
<li><p><strong>ucfg</strong> (<aclass="reference internal"href="pylorax.api.html#pylorax.api.config.ComposerConfig"title="pylorax.api.config.ComposerConfig"><em>ComposerConfig</em></a>) -- the compose config</p></li>
<li><p><strong>uuid</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#str"title="(in Python v3.8)"><em>str</em></a>) -- the UUID of the upload to cancel</p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dlclass="function">
<dtid="lifted.queue.create_upload">
<codeclass="sig-prename descclassname">lifted.queue.</code><codeclass="sig-name descname">create_upload</code><spanclass="sig-paren">(</span><emclass="sig-param">ucfg</em>, <emclass="sig-param">provider_name</em>, <emclass="sig-param">image_name</em>, <emclass="sig-param">settings</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/lifted/queue.html#create_upload"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#lifted.queue.create_upload"title="Permalink to this definition">¶</a></dt>
<li><p><strong>provider_name</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#str"title="(in Python v3.8)"><em>str</em></a>) -- the name of the cloud provider to upload to, e.g. "azure"</p></li>
<li><p><strong>image_name</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#str"title="(in Python v3.8)"><em>str</em></a>) -- what to name the image in the cloud</p></li>
<li><p><strong>settings</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#dict"title="(in Python v3.8)"><em>dict</em></a>) -- settings to pass to the upload, specific to the cloud provider</p></li>
</ul>
</dd>
<dtclass="field-even">Returns</dt>
<ddclass="field-even"><p>the created upload object</p>
<codeclass="sig-prename descclassname">lifted.queue.</code><codeclass="sig-name descname">delete_upload</code><spanclass="sig-paren">(</span><emclass="sig-param">ucfg</em>, <emclass="sig-param">uuid</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/lifted/queue.html#delete_upload"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#lifted.queue.delete_upload"title="Permalink to this definition">¶</a></dt>
<dd><p>Delete an upload</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><ulclass="simple">
<li><p><strong>ucfg</strong> (<aclass="reference internal"href="pylorax.api.html#pylorax.api.config.ComposerConfig"title="pylorax.api.config.ComposerConfig"><em>ComposerConfig</em></a>) -- the compose config</p></li>
<li><p><strong>uuid</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#str"title="(in Python v3.8)"><em>str</em></a>) -- the UUID of the upload to delete</p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dlclass="function">
<dtid="lifted.queue.get_all_uploads">
<codeclass="sig-prename descclassname">lifted.queue.</code><codeclass="sig-name descname">get_all_uploads</code><spanclass="sig-paren">(</span><emclass="sig-param">ucfg</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/lifted/queue.html#get_all_uploads"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#lifted.queue.get_all_uploads"title="Permalink to this definition">¶</a></dt>
<dd><p>Get a list of all stored Upload objects</p>
<ddclass="field-even"><p>a list of all stored upload objects</p>
</dd>
<dtclass="field-odd">Return type</dt>
<ddclass="field-odd"><p>list of Upload</p>
</dd>
</dl>
</dd></dl>
<dlclass="function">
<dtid="lifted.queue.get_upload">
<codeclass="sig-prename descclassname">lifted.queue.</code><codeclass="sig-name descname">get_upload</code><spanclass="sig-paren">(</span><emclass="sig-param">ucfg</em>, <emclass="sig-param">uuid</em>, <emclass="sig-param">ignore_missing=False</em>, <emclass="sig-param">ignore_corrupt=False</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/lifted/queue.html#get_upload"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#lifted.queue.get_upload"title="Permalink to this definition">¶</a></dt>
<li><p><strong>uuid</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#str"title="(in Python v3.8)"><em>str</em></a>) -- UUID of the upload to get</p></li>
<li><p><strong>ignore_missing</strong> (<aclass="reference external"href="https://docs.python.org/3/library/functions.html#bool"title="(in Python v3.8)"><em>bool</em></a>) -- if True, don't raise a RuntimeError when the specified upload is missing, instead just return None</p></li>
<li><p><strong>ignore_corrupt</strong> (<aclass="reference external"href="https://docs.python.org/3/library/functions.html#bool"title="(in Python v3.8)"><em>bool</em></a>) -- if True, don't raise a RuntimeError when the specified upload could not be deserialized, instead just return None</p></li>
</ul>
</dd>
<dtclass="field-even">Returns</dt>
<ddclass="field-even"><p>the upload object or None</p>
</dd>
<dtclass="field-odd">Return type</dt>
<ddclass="field-odd"><p><aclass="reference internal"href="#lifted.upload.Upload"title="lifted.upload.Upload">Upload</a> or <aclass="reference external"href="https://docs.python.org/3/library/constants.html#None"title="(in Python v3.8)">None</a></p>
</dd>
<dtclass="field-even">Raises</dt>
<ddclass="field-even"><p>RuntimeError</p>
</dd>
</dl>
</dd></dl>
<dlclass="function">
<dtid="lifted.queue.get_uploads">
<codeclass="sig-prename descclassname">lifted.queue.</code><codeclass="sig-name descname">get_uploads</code><spanclass="sig-paren">(</span><emclass="sig-param">ucfg</em>, <emclass="sig-param">uuids</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/lifted/queue.html#get_uploads"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#lifted.queue.get_uploads"title="Permalink to this definition">¶</a></dt>
<dd><p>Gets a list of Upload objects from a list of upload UUIDs, ignoring
<li><p><strong>uuids</strong> (<em>list of str</em>) -- list of upload UUIDs to get</p></li>
</ul>
</dd>
<dtclass="field-even">Returns</dt>
<ddclass="field-even"><p>a list of the uploads that were successfully deserialized</p>
</dd>
<dtclass="field-odd">Return type</dt>
<ddclass="field-odd"><p>list of Upload</p>
</dd>
</dl>
</dd></dl>
<dlclass="function">
<dtid="lifted.queue.ready_upload">
<codeclass="sig-prename descclassname">lifted.queue.</code><codeclass="sig-name descname">ready_upload</code><spanclass="sig-paren">(</span><emclass="sig-param">ucfg</em>, <emclass="sig-param">uuid</em>, <emclass="sig-param">image_path</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/lifted/queue.html#ready_upload"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#lifted.queue.ready_upload"title="Permalink to this definition">¶</a></dt>
<dd><p>Pass an image_path to an upload and mark it ready to execute</p>
<li><p><strong>uuid</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#str"title="(in Python v3.8)"><em>str</em></a>) -- the UUID of the upload to mark ready</p></li>
<li><p><strong>image_path</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#str"title="(in Python v3.8)"><em>str</em></a>) -- the path of the image to pass to the upload</p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dlclass="function">
<dtid="lifted.queue.reset_upload">
<codeclass="sig-prename descclassname">lifted.queue.</code><codeclass="sig-name descname">reset_upload</code><spanclass="sig-paren">(</span><emclass="sig-param">ucfg</em>, <emclass="sig-param">uuid</em>, <emclass="sig-param">new_image_name=None</em>, <emclass="sig-param">new_settings=None</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/lifted/queue.html#reset_upload"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#lifted.queue.reset_upload"title="Permalink to this definition">¶</a></dt>
<dd><p>Reset an upload so it can be attempted again</p>
<li><p><strong>uuid</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#str"title="(in Python v3.8)"><em>str</em></a>) -- the UUID of the upload to reset</p></li>
<codeclass="sig-prename descclassname">lifted.queue.</code><codeclass="sig-name descname">start_upload_monitor</code><spanclass="sig-paren">(</span><emclass="sig-param">ucfg</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/lifted/queue.html#start_upload_monitor"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#lifted.queue.start_upload_monitor"title="Permalink to this definition">¶</a></dt>
<dd><p>Start a thread that manages the upload queue</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><p><strong>ucfg</strong> (<aclass="reference internal"href="pylorax.api.html#pylorax.api.config.ComposerConfig"title="pylorax.api.config.ComposerConfig"><em>ComposerConfig</em></a>) -- the compose config</p>
</dd>
</dl>
</dd></dl>
</div>
<divclass="section"id="module-lifted.upload">
<spanid="lifted-upload-module"></span><h2>lifted.upload module<aclass="headerlink"href="#module-lifted.upload"title="Permalink to this headline">¶</a></h2>
<dlclass="class">
<dtid="lifted.upload.Upload">
<emclass="property">class </em><codeclass="sig-prename descclassname">lifted.upload.</code><codeclass="sig-name descname">Upload</code><spanclass="sig-paren">(</span><emclass="sig-param">uuid=None</em>, <emclass="sig-param">provider_name=None</em>, <emclass="sig-param">playbook_path=None</em>, <emclass="sig-param">image_name=None</em>, <emclass="sig-param">settings=None</em>, <emclass="sig-param">creation_time=None</em>, <emclass="sig-param">upload_log=None</em>, <emclass="sig-param">upload_pid=None</em>, <emclass="sig-param">image_path=None</em>, <emclass="sig-param">status_callback=None</em>, <emclass="sig-param">status=None</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/lifted/upload.html#Upload"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#lifted.upload.Upload"title="Permalink to this definition">¶</a></dt>
<p>Represents an upload of an image to a cloud provider. Instances of this
class are serialized as TOML and stored in the upload queue directory,
which is /var/lib/lorax/upload/queue/ by default</p>
<dlclass="method">
<dtid="lifted.upload.Upload.cancel">
<codeclass="sig-name descname">cancel</code><spanclass="sig-paren">(</span><emclass="sig-param">status_callback=None</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/lifted/upload.html#Upload.cancel"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#lifted.upload.Upload.cancel"title="Permalink to this definition">¶</a></dt>
<dd><p>Cancel the upload. Sends a SIGINT to self.upload_pid.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><p><strong>status_callback</strong> (<em>function</em>) -- a function of the form callback(self)</p>
</dd>
</dl>
</dd></dl>
<dlclass="method">
<dtid="lifted.upload.Upload.execute">
<codeclass="sig-name descname">execute</code><spanclass="sig-paren">(</span><emclass="sig-param">status_callback=None</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/lifted/upload.html#Upload.execute"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#lifted.upload.Upload.execute"title="Permalink to this definition">¶</a></dt>
<dd><p>Execute the upload. Meant to be called from a dedicated process so
that the upload can be cancelled by sending a SIGINT to
self.upload_pid.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><p><strong>status_callback</strong> (<em>function</em>) -- a function of the form callback(self)</p>
</dd>
</dl>
</dd></dl>
<dlclass="method">
<dtid="lifted.upload.Upload.is_cancellable">
<codeclass="sig-name descname">is_cancellable</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/lifted/upload.html#Upload.is_cancellable"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#lifted.upload.Upload.is_cancellable"title="Permalink to this definition">¶</a></dt>
<dd><p>Is the upload in a cancellable state?</p>
<dlclass="field-list simple">
<dtclass="field-odd">Returns</dt>
<ddclass="field-odd"><p>whether the upload is cancellable</p>
<codeclass="sig-name descname">ready</code><spanclass="sig-paren">(</span><emclass="sig-param">image_path</em>, <emclass="sig-param">status_callback</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/lifted/upload.html#Upload.ready"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#lifted.upload.Upload.ready"title="Permalink to this definition">¶</a></dt>
<dd><p>Provide an image_path and mark the upload as ready to execute</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><ulclass="simple">
<li><p><strong>image_path</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#str"title="(in Python v3.8)"><em>str</em></a>) -- path of the image to upload</p></li>
<li><p><strong>status_callback</strong> (<em>function</em>) -- a function of the form callback(self)</p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dlclass="method">
<dtid="lifted.upload.Upload.reset">
<codeclass="sig-name descname">reset</code><spanclass="sig-paren">(</span><emclass="sig-param">status_callback</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/lifted/upload.html#Upload.reset"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#lifted.upload.Upload.reset"title="Permalink to this definition">¶</a></dt>
<dd><p>Reset the upload so it can be attempted again</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><p><strong>status_callback</strong> (<em>function</em>) -- a function of the form callback(self)</p>
</dd>
</dl>
</dd></dl>
<dlclass="method">
<dtid="lifted.upload.Upload.serializable">
<codeclass="sig-name descname">serializable</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/lifted/upload.html#Upload.serializable"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#lifted.upload.Upload.serializable"title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a representation of the object as a dict for serialization</p>
<codeclass="sig-name descname">set_status</code><spanclass="sig-paren">(</span><emclass="sig-param">status</em>, <emclass="sig-param">status_callback=None</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/lifted/upload.html#Upload.set_status"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#lifted.upload.Upload.set_status"title="Permalink to this definition">¶</a></dt>
<dd><p>Sets the status of the upload with an optional callback</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><ulclass="simple">
<li><p><strong>status</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#str"title="(in Python v3.8)"><em>str</em></a>) -- the new status</p></li>
<li><p><strong>status_callback</strong> (<em>function</em>) -- a function of the form callback(self)</p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dlclass="method">
<dtid="lifted.upload.Upload.summary">
<codeclass="sig-name descname">summary</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/lifted/upload.html#Upload.summary"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#lifted.upload.Upload.summary"title="Permalink to this definition">¶</a></dt>
<dd><p>Return a dict with useful information about the upload</p>
Built with <ahref="http://sphinx-doc.org/">Sphinx</a> using a <ahref="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <ahref="https://readthedocs.org">Read the Docs</a>.