<spanid="pylorax-api-bisect-module"></span><h2>pylorax.api.bisect module<aclass="headerlink"href="#module-pylorax.api.bisect"title="Permalink to this headline">¶</a></h2>
<dlclass="function">
<dtid="pylorax.api.bisect.insort_left">
<codeclass="descclassname">pylorax.api.bisect.</code><codeclass="descname">insort_left</code><spanclass="sig-paren">(</span><em>a</em>, <em>x</em>, <em>key=None</em>, <em>lo=0</em>, <em>hi=None</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/bisect.html#insort_left"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.bisect.insort_left"title="Permalink to this definition">¶</a></dt>
<dd><p>Insert item x in list a, and keep it sorted assuming a is sorted.</p>
<li><strong>x</strong> (<aclass="reference external"href="https://docs.python.org/3/library/functions.html#object"title="(in Python v3.7)"><em>object</em></a>) -- item to insert into the list</li>
<li><strong>key</strong> (<em>function</em>) -- Function to use to compare items in the list</li>
</ul>
</td>
</tr>
<trclass="field-even field"><thclass="field-name">Returns:</th><tdclass="field-body"><pclass="first">index where the item was inserted</p>
<spanid="pylorax-api-checkparams-module"></span><h2>pylorax.api.checkparams module<aclass="headerlink"href="#module-pylorax.api.checkparams"title="Permalink to this headline">¶</a></h2>
<dlclass="function">
<dtid="pylorax.api.checkparams.checkparams">
<codeclass="descclassname">pylorax.api.checkparams.</code><codeclass="descname">checkparams</code><spanclass="sig-paren">(</span><em>tuples</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/checkparams.html#checkparams"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.checkparams.checkparams"title="Permalink to this definition">¶</a></dt>
<spanid="pylorax-api-cmdline-module"></span><h2>pylorax.api.cmdline module<aclass="headerlink"href="#module-pylorax.api.cmdline"title="Permalink to this headline">¶</a></h2>
<codeclass="descclassname">pylorax.api.cmdline.</code><codeclass="descname">lorax_composer_parser</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/cmdline.html#lorax_composer_parser"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.cmdline.lorax_composer_parser"title="Permalink to this definition">¶</a></dt>
<dd><p>Return the ArgumentParser for lorax-composer</p>
<spanid="pylorax-api-compose-module"></span><h2>pylorax.api.compose module<aclass="headerlink"href="#module-pylorax.api.compose"title="Permalink to this headline">¶</a></h2>
<p>Setup for composing an image</p>
<divclass="section"id="adding-new-output-types">
<h3>Adding New Output Types<aclass="headerlink"href="#adding-new-output-types"title="Permalink to this headline">¶</a></h3>
<p>The new output type must add a kickstart template to ./share/composer/ where the
name of the kickstart (without the trailing .ks) matches the entry in compose_args.</p>
<p>The kickstart should not have any url or repo entries, these will be added at build
time. The %packages section should be the last thing, and while it can contain mandatory
packages required by the output type, it should not have the trailing %end because the
package NEVRAs will be appended to it at build time.</p>
<p>compose_args should have a name matching the kickstart, and it should set the novirt_install
parameters needed to generate the desired output. Other types should be set to False.</p>
<dlclass="function">
<dtid="pylorax.api.compose.add_customizations">
<codeclass="descclassname">pylorax.api.compose.</code><codeclass="descname">add_customizations</code><spanclass="sig-paren">(</span><em>f</em>, <em>recipe</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/compose.html#add_customizations"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.compose.add_customizations"title="Permalink to this definition">¶</a></dt>
<dd><p>Add customizations to the kickstart file</p>
<trclass="field-odd field"><thclass="field-name">Raises:</th><tdclass="field-body"><pclass="first last">RuntimeError if there was a problem writing to the kickstart</p>
<codeclass="descclassname">pylorax.api.compose.</code><codeclass="descname">bootloader_append</code><spanclass="sig-paren">(</span><em>line</em>, <em>kernel_append</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/compose.html#bootloader_append"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.compose.bootloader_append"title="Permalink to this definition">¶</a></dt>
<dd><p>Insert the kernel_append string into the --append argument</p>
<trclass="field-odd field"><thclass="field-name">Parameters:</th><tdclass="field-body"><ulclass="first last simple">
<li><strong>line</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#str"title="(in Python v3.7)"><em>str</em></a>) -- The bootloader ... line</li>
<li><strong>kernel_append</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#str"title="(in Python v3.7)"><em>str</em></a>) -- The arguments to append to the --append section</li>
</ul>
</td>
</tr>
</tbody>
</table>
<p>Using pykickstart to process the line is the best way to make sure it
is parsed correctly, and re-assembled for inclusion into the final kickstart</p>
<codeclass="descclassname">pylorax.api.compose.</code><codeclass="descname">compose_args</code><spanclass="sig-paren">(</span><em>compose_type</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/compose.html#compose_args"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.compose.compose_args"title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the settings to pass to novirt_install for the compose type</p>
<trclass="field-odd field"><thclass="field-name">Parameters:</th><tdclass="field-body"><strong>compose_type</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#str"title="(in Python v3.7)"><em>str</em></a>) -- The type of compose to create, from <cite>compose_types()</cite></td>
Other options will be filled in by <cite>make_compose()</cite></p>
</dd></dl>
<dlclass="function">
<dtid="pylorax.api.compose.compose_types">
<codeclass="descclassname">pylorax.api.compose.</code><codeclass="descname">compose_types</code><spanclass="sig-paren">(</span><em>share_dir</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/compose.html#compose_types"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.compose.compose_types"title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a list of the supported output types</p>
<p>The output types come from the kickstart names in /usr/share/lorax/composer/*ks</p>
<codeclass="descclassname">pylorax.api.compose.</code><codeclass="descname">customize_ks_template</code><spanclass="sig-paren">(</span><em>ks_template</em>, <em>recipe</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/compose.html#customize_ks_template"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.compose.customize_ks_template"title="Permalink to this definition">¶</a></dt>
<dd><p>Customize the kickstart template and return it</p>
<p>Apply customizations to existing template commands, or add defaults for ones that are
missing and required.</p>
<p>Apply customizations.kernel.append to the bootloader argument in the template.
Add bootloader line if it is missing.</p>
<p>Add default timezone if needed. It does NOT replace an existing timezone entry</p>
</dd></dl>
<dlclass="function">
<dtid="pylorax.api.compose.firewall_cmd">
<codeclass="descclassname">pylorax.api.compose.</code><codeclass="descname">firewall_cmd</code><spanclass="sig-paren">(</span><em>line</em>, <em>settings</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/compose.html#firewall_cmd"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.compose.firewall_cmd"title="Permalink to this definition">¶</a></dt>
<dd><p>Update the firewall line with the new ports and services</p>
<trclass="field-odd field"><thclass="field-name">Parameters:</th><tdclass="field-body"><ulclass="first last simple">
<li><strong>line</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#str"title="(in Python v3.7)"><em>str</em></a>) -- The firewall ... line</li>
<li><strong>settings</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#dict"title="(in Python v3.7)"><em>dict</em></a>) -- A dict with the list of services and ports to enable and disable</li>
</ul>
</td>
</tr>
</tbody>
</table>
<p>Using pykickstart to process the line is the best way to make sure it
is parsed correctly, and re-assembled for inclusion into the final kickstart</p>
</dd></dl>
<dlclass="function">
<dtid="pylorax.api.compose.get_default_services">
<codeclass="descclassname">pylorax.api.compose.</code><codeclass="descname">get_default_services</code><spanclass="sig-paren">(</span><em>recipe</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/compose.html#get_default_services"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.compose.get_default_services"title="Permalink to this definition">¶</a></dt>
<dd><p>Get the default string for services, based on recipe
<p>When no services have been selected we don't need to add anything to the kickstart
so return an empty string. Otherwise return "services" which will be updated with
the settings.</p>
</dd></dl>
<dlclass="function">
<dtid="pylorax.api.compose.get_extra_pkgs">
<codeclass="descclassname">pylorax.api.compose.</code><codeclass="descname">get_extra_pkgs</code><spanclass="sig-paren">(</span><em>dbo</em>, <em>share_dir</em>, <em>compose_type</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/compose.html#get_extra_pkgs"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.compose.get_extra_pkgs"title="Permalink to this definition">¶</a></dt>
<dd><p>Return extra packages needed for the output type</p>
<li><strong>dbo</strong> (<em>dnf.Base</em>) -- dnf base object</li>
<li><strong>share_dir</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#str"title="(in Python v3.7)"><em>str</em></a>) -- Path to the top level share directory</li>
<li><strong>compose_type</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#str"title="(in Python v3.7)"><em>str</em></a>) -- The type of output to create from the recipe</li>
</ul>
</td>
</tr>
<trclass="field-even field"><thclass="field-name">Returns:</th><tdclass="field-body"><pclass="first">List of package names (name only, not NEVRA)</p>
<codeclass="descclassname">pylorax.api.compose.</code><codeclass="descname">get_firewall_settings</code><spanclass="sig-paren">(</span><em>recipe</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/compose.html#get_firewall_settings"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.compose.get_firewall_settings"title="Permalink to this definition">¶</a></dt>
<dd><p>Return the customizations.firewall settings</p>
<codeclass="descclassname">pylorax.api.compose.</code><codeclass="descname">get_kernel_append</code><spanclass="sig-paren">(</span><em>recipe</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/compose.html#get_kernel_append"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.compose.get_kernel_append"title="Permalink to this definition">¶</a></dt>
<dd><p>Return the customizations.kernel append value</p>
<codeclass="descclassname">pylorax.api.compose.</code><codeclass="descname">get_keyboard_layout</code><spanclass="sig-paren">(</span><em>recipe</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/compose.html#get_keyboard_layout"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.compose.get_keyboard_layout"title="Permalink to this definition">¶</a></dt>
<dd><p>Return the customizations.locale.keyboard list</p>
<codeclass="descclassname">pylorax.api.compose.</code><codeclass="descname">get_languages</code><spanclass="sig-paren">(</span><em>recipe</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/compose.html#get_languages"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.compose.get_languages"title="Permalink to this definition">¶</a></dt>
<dd><p>Return the customizations.locale.languages list</p>
<codeclass="descclassname">pylorax.api.compose.</code><codeclass="descname">get_services</code><spanclass="sig-paren">(</span><em>recipe</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/compose.html#get_services"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.compose.get_services"title="Permalink to this definition">¶</a></dt>
<dd><p>Return the customizations.services settings</p>
<codeclass="descclassname">pylorax.api.compose.</code><codeclass="descname">get_timezone_settings</code><spanclass="sig-paren">(</span><em>recipe</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/compose.html#get_timezone_settings"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.compose.get_timezone_settings"title="Permalink to this definition">¶</a></dt>
<dd><p>Return the customizations.timezone dict</p>
<codeclass="descclassname">pylorax.api.compose.</code><codeclass="descname">keyboard_cmd</code><spanclass="sig-paren">(</span><em>line</em>, <em>layout</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/compose.html#keyboard_cmd"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.compose.keyboard_cmd"title="Permalink to this definition">¶</a></dt>
<dd><p>Update the keyboard line with the layout</p>
<trclass="field-odd field"><thclass="field-name">Parameters:</th><tdclass="field-body"><ulclass="first last simple">
<li><strong>line</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#str"title="(in Python v3.7)"><em>str</em></a>) -- The keyboard ... line</li>
<li><strong>settings</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#str"title="(in Python v3.7)"><em>str</em></a>) -- The keyboard layout</li>
</ul>
</td>
</tr>
</tbody>
</table>
<p>Using pykickstart to process the line is the best way to make sure it
is parsed correctly, and re-assembled for inclusion into the final kickstart</p>
</dd></dl>
<dlclass="function">
<dtid="pylorax.api.compose.lang_cmd">
<codeclass="descclassname">pylorax.api.compose.</code><codeclass="descname">lang_cmd</code><spanclass="sig-paren">(</span><em>line</em>, <em>languages</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/compose.html#lang_cmd"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.compose.lang_cmd"title="Permalink to this definition">¶</a></dt>
<dd><p>Update the lang line with the languages</p>
<trclass="field-odd field"><thclass="field-name">Parameters:</th><tdclass="field-body"><ulclass="first last simple">
<li><strong>line</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#str"title="(in Python v3.7)"><em>str</em></a>) -- The lang ... line</li>
<li><strong>settings</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#list"title="(in Python v3.7)"><em>list</em></a>) -- The list of languages</li>
</ul>
</td>
</tr>
</tbody>
</table>
<p>Using pykickstart to process the line is the best way to make sure it
is parsed correctly, and re-assembled for inclusion into the final kickstart</p>
<codeclass="descclassname">pylorax.api.compose.</code><codeclass="descname">move_compose_results</code><spanclass="sig-paren">(</span><em>cfg</em>, <em>results_dir</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/compose.html#move_compose_results"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.compose.move_compose_results"title="Permalink to this definition">¶</a></dt>
<dd><p>Move the final image to the results_dir and cleanup the unneeded compose files</p>
<li><strong>results_dir</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#str"title="(in Python v3.7)"><em>str</em></a>) -- Directory to put the results into</li>
<codeclass="descclassname">pylorax.api.compose.</code><codeclass="descname">repo_to_ks</code><spanclass="sig-paren">(</span><em>r</em>, <em>url='url'</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/compose.html#repo_to_ks"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.compose.repo_to_ks"title="Permalink to this definition">¶</a></dt>
<dd><p>Return a kickstart line with the correct args.
<p>Set url to "baseurl" if it is a repo, leave it as "url" for the installation url.</p>
</dd></dl>
<dlclass="function">
<dtid="pylorax.api.compose.services_cmd">
<codeclass="descclassname">pylorax.api.compose.</code><codeclass="descname">services_cmd</code><spanclass="sig-paren">(</span><em>line</em>, <em>settings</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/compose.html#services_cmd"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.compose.services_cmd"title="Permalink to this definition">¶</a></dt>
<dd><p>Update the services line with additional services to enable/disable</p>
<trclass="field-odd field"><thclass="field-name">Parameters:</th><tdclass="field-body"><ulclass="first last simple">
<li><strong>line</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#str"title="(in Python v3.7)"><em>str</em></a>) -- The services ... line</li>
<li><strong>settings</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#dict"title="(in Python v3.7)"><em>dict</em></a>) -- A dict with the list of services to enable and disable</li>
</ul>
</td>
</tr>
</tbody>
</table>
<p>Using pykickstart to process the line is the best way to make sure it
is parsed correctly, and re-assembled for inclusion into the final kickstart</p>
<li><strong>dnflock</strong> (<em>YumLock</em>) -- Lock and YumBase for depsolving</li>
<li><strong>recipe</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#str"title="(in Python v3.7)"><em>str</em></a>) -- The recipe to build</li>
<li><strong>compose_type</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#str"title="(in Python v3.7)"><em>str</em></a>) -- The type of output to create from the recipe</li>
<trclass="field-even field"><thclass="field-name">Returns:</th><tdclass="field-body"><pclass="first">Unique ID for the build that can be used to track its status</p>
<codeclass="descclassname">pylorax.api.compose.</code><codeclass="descname">test_templates</code><spanclass="sig-paren">(</span><em>dbo</em>, <em>share_dir</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/compose.html#test_templates"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.compose.test_templates"title="Permalink to this definition">¶</a></dt>
<dd><p>Try depsolving each of the the templates and report any errors</p>
<codeclass="descclassname">pylorax.api.compose.</code><codeclass="descname">timezone_cmd</code><spanclass="sig-paren">(</span><em>line</em>, <em>settings</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/compose.html#timezone_cmd"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.compose.timezone_cmd"title="Permalink to this definition">¶</a></dt>
<dd><p>Update the timezone line with the settings</p>
<codeclass="descclassname">pylorax.api.compose.</code><codeclass="descname">write_ks_group</code><spanclass="sig-paren">(</span><em>f</em>, <em>group</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/compose.html#write_ks_group"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.compose.write_ks_group"title="Permalink to this definition">¶</a></dt>
<codeclass="descclassname">pylorax.api.compose.</code><codeclass="descname">write_ks_root</code><spanclass="sig-paren">(</span><em>f</em>, <em>user</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/compose.html#write_ks_root"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.compose.write_ks_root"title="Permalink to this definition">¶</a></dt>
<dd><p>Write kickstart root password and sshkey entry</p>
<li><strong>user</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#dict"title="(in Python v3.7)"><em>dict</em></a>) -- A blueprint user dictionary</li>
<trclass="field-even field"><thclass="field-name">Returns:</th><tdclass="field-body"><pclass="first">True if it wrote a rootpw command to the kickstart</p>
<codeclass="descclassname">pylorax.api.compose.</code><codeclass="descname">write_ks_user</code><spanclass="sig-paren">(</span><em>f</em>, <em>user</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/compose.html#write_ks_user"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.compose.write_ks_user"title="Permalink to this definition">¶</a></dt>
<li><strong>user</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#dict"title="(in Python v3.7)"><em>dict</em></a>) -- A blueprint user dictionary</li>
<spanid="pylorax-api-config-module"></span><h2>pylorax.api.config module<aclass="headerlink"href="#module-pylorax.api.config"title="Permalink to this headline">¶</a></h2>
<codeclass="descname">get_default</code><spanclass="sig-paren">(</span><em>section</em>, <em>option</em>, <em>default</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/config.html#ComposerConfig.get_default"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.config.ComposerConfig.get_default"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
</dd></dl>
<dlclass="function">
<dtid="pylorax.api.config.configure">
<codeclass="descclassname">pylorax.api.config.</code><codeclass="descname">configure</code><spanclass="sig-paren">(</span><em>conf_file='/etc/lorax/composer.conf'</em>, <em>root_dir='/'</em>, <em>test_config=False</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/config.html#configure"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.config.configure"title="Permalink to this definition">¶</a></dt>
<li><strong>conf_file</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#str"title="(in Python v3.7)"><em>str</em></a>) -- Path to the config file overriding the default settings</li>
<li><strong>root_dir</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#str"title="(in Python v3.7)"><em>str</em></a>) -- Directory to prepend to paths, defaults to /</li>
<li><strong>test_config</strong> (<aclass="reference external"href="https://docs.python.org/3/library/functions.html#bool"title="(in Python v3.7)"><em>bool</em></a>) -- Set to True to skip reading conf_file</li>
<codeclass="descclassname">pylorax.api.config.</code><codeclass="descname">make_dnf_dirs</code><spanclass="sig-paren">(</span><em>conf</em>, <em>uid</em>, <em>gid</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/config.html#make_dnf_dirs"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.config.make_dnf_dirs"title="Permalink to this definition">¶</a></dt>
<dd><p>Make any missing dnf directories owned by user:group</p>
<li><strong>conf</strong> (<aclass="reference internal"href="#pylorax.api.config.ComposerConfig"title="pylorax.api.config.ComposerConfig"><em>ComposerConfig</em></a>) -- The configuration to use</li>
<li><strong>uid</strong> (<aclass="reference external"href="https://docs.python.org/3/library/functions.html#int"title="(in Python v3.7)"><em>int</em></a>) -- uid of owner</li>
<li><strong>gid</strong> (<aclass="reference external"href="https://docs.python.org/3/library/functions.html#int"title="(in Python v3.7)"><em>int</em></a>) -- gid of owner</li>
<trclass="field-even field"><thclass="field-name">Returns:</th><tdclass="field-body"><pclass="first">list of errors</p>
</td>
</tr>
<trclass="field-odd field"><thclass="field-name">Return type:</th><tdclass="field-body"><pclass="first last">list of str</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dlclass="function">
<dtid="pylorax.api.config.make_owned_dir">
<codeclass="descclassname">pylorax.api.config.</code><codeclass="descname">make_owned_dir</code><spanclass="sig-paren">(</span><em>p_dir</em>, <em>uid</em>, <em>gid</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/config.html#make_owned_dir"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.config.make_owned_dir"title="Permalink to this definition">¶</a></dt>
<dd><p>Make a directory and its parents, setting owner and group</p>
<codeclass="descclassname">pylorax.api.config.</code><codeclass="descname">make_queue_dirs</code><spanclass="sig-paren">(</span><em>conf</em>, <em>gid</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/config.html#make_queue_dirs"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.config.make_queue_dirs"title="Permalink to this definition">¶</a></dt>
<li><strong>conf</strong> (<aclass="reference internal"href="#pylorax.api.config.ComposerConfig"title="pylorax.api.config.ComposerConfig"><em>ComposerConfig</em></a>) -- The configuration to use</li>
<li><strong>gid</strong> (<aclass="reference external"href="https://docs.python.org/3/library/functions.html#int"title="(in Python v3.7)"><em>int</em></a>) -- Group ID that has access to the queue directories</li>
<spanid="pylorax-api-crossdomain-module"></span><h2>pylorax.api.crossdomain module<aclass="headerlink"href="#module-pylorax.api.crossdomain"title="Permalink to this headline">¶</a></h2>
<dlclass="function">
<dtid="pylorax.api.crossdomain.crossdomain">
<codeclass="descclassname">pylorax.api.crossdomain.</code><codeclass="descname">crossdomain</code><spanclass="sig-paren">(</span><em>origin</em>, <em>methods=None</em>, <em>headers=None</em>, <em>max_age=21600</em>, <em>attach_to_all=True</em>, <em>automatic_options=True</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/crossdomain.html#crossdomain"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.crossdomain.crossdomain"title="Permalink to this definition">¶</a></dt>
<spanid="pylorax-api-dnfbase-module"></span><h2>pylorax.api.dnfbase module<aclass="headerlink"href="#module-pylorax.api.dnfbase"title="Permalink to this headline">¶</a></h2>
<emclass="property">class </em><codeclass="descclassname">pylorax.api.dnfbase.</code><codeclass="descname">DNFLock</code><spanclass="sig-paren">(</span><em>conf</em>, <em>expire_secs=21600</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/dnfbase.html#DNFLock"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.dnfbase.DNFLock"title="Permalink to this definition">¶</a></dt>
<p>Hold the dnf.Base object and a Lock to control access to it.</p>
<p>self.dbo is a property that returns the dnf.Base object, but it <em>may</em> change
from one call to the next if the upstream repositories have changed.</p>
<dlclass="attribute">
<dtid="pylorax.api.dnfbase.DNFLock.lock">
<codeclass="descname">lock</code><aclass="headerlink"href="#pylorax.api.dnfbase.DNFLock.lock"title="Permalink to this definition">¶</a></dt>
<dd><p>Check for repo updates (using expiration time) and return the lock</p>
<p>If the repository has been updated, tear down the old dnf.Base and
create a new one. This is the only way to force dnf to use the new
metadata.</p>
</dd></dl>
<dlclass="attribute">
<dtid="pylorax.api.dnfbase.DNFLock.lock_check">
<codeclass="descname">lock_check</code><aclass="headerlink"href="#pylorax.api.dnfbase.DNFLock.lock_check"title="Permalink to this definition">¶</a></dt>
<dd><p>Force a check for repo updates and return the lock</p>
<p>Use this method sparingly, it removes the repodata and downloads a new copy every time.</p>
<codeclass="descclassname">pylorax.api.dnfbase.</code><codeclass="descname">get_base_object</code><spanclass="sig-paren">(</span><em>conf</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/dnfbase.html#get_base_object"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.dnfbase.get_base_object"title="Permalink to this definition">¶</a></dt>
<dd><p>Get the DNF object with settings from the config file</p>
<spanid="pylorax-api-errors-module"></span><h2>pylorax.api.errors module<aclass="headerlink"href="#module-pylorax.api.errors"title="Permalink to this headline">¶</a></h2>
<spanid="pylorax-api-gitrpm-module"></span><h2>pylorax.api.gitrpm module<aclass="headerlink"href="#module-pylorax.api.gitrpm"title="Permalink to this headline">¶</a></h2>
<p>Clone a git repository and package it as an rpm</p>
<p>This module contains functions for cloning a git repo, creating a tar archive of
the selected commit, branch, or tag, and packaging the files into an rpm that will
be installed by anaconda when creating the image.</p>
<dlclass="class">
<dtid="pylorax.api.gitrpm.GitArchiveTarball">
<emclass="property">class </em><codeclass="descclassname">pylorax.api.gitrpm.</code><codeclass="descname">GitArchiveTarball</code><spanclass="sig-paren">(</span><em>gitRepo</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/gitrpm.html#GitArchiveTarball"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.gitrpm.GitArchiveTarball"title="Permalink to this definition">¶</a></dt>
<codeclass="descname">write_file</code><spanclass="sig-paren">(</span><em>sourcesDir</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/gitrpm.html#GitArchiveTarball.write_file"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.gitrpm.GitArchiveTarball.write_file"title="Permalink to this definition">¶</a></dt>
<trclass="field-odd field"><thclass="field-name">Parameters:</th><tdclass="field-body"><strong>sourcesDir</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#str"title="(in Python v3.7)"><em>str</em></a>) -- Path to use for creating the archive</td>
<emclass="property">class </em><codeclass="descclassname">pylorax.api.gitrpm.</code><codeclass="descname">GitRpmBuild</code><spanclass="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/gitrpm.html#GitRpmBuild"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.gitrpm.GitRpmBuild"title="Permalink to this definition">¶</a></dt>
<codeclass="descname">add_git_tarball</code><spanclass="sig-paren">(</span><em>gitRepo</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/gitrpm.html#GitRpmBuild.add_git_tarball"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.gitrpm.GitRpmBuild.add_git_tarball"title="Permalink to this definition">¶</a></dt>
<dd><p>Add a tar archive of a git repository to the rpm</p>
<trclass="field-odd field"><thclass="field-name">Parameters:</th><tdclass="field-body"><strong>gitRepo</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#dict"title="(in Python v3.7)"><em>dict</em></a>) -- A dict with the repository details</td>
<p>This populates the rpm with the URL of the git repository, the summary
describing the repo, the description of the repository and reference used,
and sets up the rpm to install the archive contents into the destination
path.</p>
</dd></dl>
<dlclass="method">
<dtid="pylorax.api.gitrpm.GitRpmBuild.check">
<codeclass="descname">check</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/gitrpm.html#GitRpmBuild.check"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.gitrpm.GitRpmBuild.check"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="method">
<dtid="pylorax.api.gitrpm.GitRpmBuild.clean">
<codeclass="descname">clean</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/gitrpm.html#GitRpmBuild.clean"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.gitrpm.GitRpmBuild.clean"title="Permalink to this definition">¶</a></dt>
<dd><p>Remove the base directory from inside the tmpdir</p>
<codeclass="descname">cleanup_tmpdir</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/gitrpm.html#GitRpmBuild.cleanup_tmpdir"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.gitrpm.GitRpmBuild.cleanup_tmpdir"title="Permalink to this definition">¶</a></dt>
<dd><p>Remove the temporary directory and all of its contents</p>
<codeclass="descname">get_base_dir</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/gitrpm.html#GitRpmBuild.get_base_dir"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.gitrpm.GitRpmBuild.get_base_dir"title="Permalink to this definition">¶</a></dt>
<dd><p>Place all the files under a temporary directory + rpmbuild/</p>
</dd></dl>
</dd></dl>
<dlclass="function">
<dtid="pylorax.api.gitrpm.create_gitrpm_repo">
<codeclass="descclassname">pylorax.api.gitrpm.</code><codeclass="descname">create_gitrpm_repo</code><spanclass="sig-paren">(</span><em>results_dir</em>, <em>recipe</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/gitrpm.html#create_gitrpm_repo"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.gitrpm.create_gitrpm_repo"title="Permalink to this definition">¶</a></dt>
<dd><p>Create a dnf repository with the rpms from the recipe</p>
<li><strong>results_dir</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#str"title="(in Python v3.7)"><em>str</em></a>) -- Path to create the repository under</li>
<li><strong>recipe</strong> (<aclass="reference internal"href="#pylorax.api.recipes.Recipe"title="pylorax.api.recipes.Recipe"><em>Recipe</em></a>) -- The recipe to get the repos.git entries from</li>
</ul>
</td>
</tr>
<trclass="field-even field"><thclass="field-name">Returns:</th><tdclass="field-body"><pclass="first">Path to the dnf repository or ""</p>
<p>This function creates a dnf repository directory at results_dir+"repo/",
creates rpms for all of the repos.git entries in the recipe, runs createrepo_c
on the dnf repository so that Anaconda can use it, and returns the path to the
repository to the caller.</p>
</dd></dl>
<dlclass="function">
<dtid="pylorax.api.gitrpm.get_repo_description">
<codeclass="descclassname">pylorax.api.gitrpm.</code><codeclass="descname">get_repo_description</code><spanclass="sig-paren">(</span><em>gitRepo</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/gitrpm.html#get_repo_description"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.gitrpm.get_repo_description"title="Permalink to this definition">¶</a></dt>
<dd><p>Return a description including the git repo and reference</p>
<trclass="field-odd field"><thclass="field-name">Parameters:</th><tdclass="field-body"><strong>gitRepo</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#dict"title="(in Python v3.7)"><em>dict</em></a>) -- A dict with the repository details</td>
</tr>
<trclass="field-even field"><thclass="field-name">Returns:</th><tdclass="field-body">A string with the git repo url and reference</td>
<codeclass="descclassname">pylorax.api.gitrpm.</code><codeclass="descname">make_git_rpm</code><spanclass="sig-paren">(</span><em>gitRepo</em>, <em>dest</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/gitrpm.html#make_git_rpm"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.gitrpm.make_git_rpm"title="Permalink to this definition">¶</a></dt>
<dd><p>Create an rpm from the specified git repo</p>
<trclass="field-odd field"><thclass="field-name">Parameters:</th><tdclass="field-body"><strong>gitRepo</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#dict"title="(in Python v3.7)"><em>dict</em></a>) -- A dict with the repository details</td>
</tr>
</tbody>
</table>
<p>This will clone the git repository, create an archive of the selected reference,
and build an rpm that will install the files from the repository under the destination
directory. The gitRepo dict should have the following fields:</p>
<spanid="pylorax-api-projects-module"></span><h2>pylorax.api.projects module<aclass="headerlink"href="#module-pylorax.api.projects"title="Permalink to this headline">¶</a></h2>
<dlclass="exception">
<dtid="pylorax.api.projects.ProjectsError">
<emclass="property">exception </em><codeclass="descclassname">pylorax.api.projects.</code><codeclass="descname">ProjectsError</code><aclass="reference internal"href="_modules/pylorax/api/projects.html#ProjectsError"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.projects.ProjectsError"title="Permalink to this definition">¶</a></dt>
<codeclass="descclassname">pylorax.api.projects.</code><codeclass="descname">api_changelog</code><spanclass="sig-paren">(</span><em>changelog</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/projects.html#api_changelog"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.projects.api_changelog"title="Permalink to this definition">¶</a></dt>
<trclass="field-odd field"><thclass="field-name">Parameters:</th><tdclass="field-body"><strong>changelog</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#tuple"title="(in Python v3.7)"><em>tuple</em></a>) -- A list of time, author, string tuples.</td>
</tr>
<trclass="field-even field"><thclass="field-name">Returns:</th><tdclass="field-body">The most recent changelog text or ""</td>
<p>This returns only the most recent changelog entry.</p>
</dd></dl>
<dlclass="function">
<dtid="pylorax.api.projects.api_time">
<codeclass="descclassname">pylorax.api.projects.</code><codeclass="descname">api_time</code><spanclass="sig-paren">(</span><em>t</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/projects.html#api_time"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.projects.api_time"title="Permalink to this definition">¶</a></dt>
<codeclass="descclassname">pylorax.api.projects.</code><codeclass="descname">delete_repo_source</code><spanclass="sig-paren">(</span><em>source_glob</em>, <em>source_name</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/projects.html#delete_repo_source"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.projects.delete_repo_source"title="Permalink to this definition">¶</a></dt>
<trclass="field-odd field"><thclass="field-name">Parameters:</th><tdclass="field-body"><strong>source_glob</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#str"title="(in Python v3.7)"><em>str</em></a>) -- A glob of the repo sources to search</td>
<codeclass="descclassname">pylorax.api.projects.</code><codeclass="descname">dep_evra</code><spanclass="sig-paren">(</span><em>dep</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/projects.html#dep_evra"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.projects.dep_evra"title="Permalink to this definition">¶</a></dt>
<dd><p>Return the epoch:version-release.arch for the dep</p>
<codeclass="descclassname">pylorax.api.projects.</code><codeclass="descname">dep_nevra</code><spanclass="sig-paren">(</span><em>dep</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/projects.html#dep_nevra"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.projects.dep_nevra"title="Permalink to this definition">¶</a></dt>
<dd><p>Return the name-epoch:version-release.arch</p>
<codeclass="descclassname">pylorax.api.projects.</code><codeclass="descname">dnf_repo_to_file_repo</code><spanclass="sig-paren">(</span><em>repo</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/projects.html#dnf_repo_to_file_repo"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.projects.dnf_repo_to_file_repo"title="Permalink to this definition">¶</a></dt>
<dd><p>Return a string representation of a DNF Repo object suitable for writing to a .repo file</p>
<codeclass="descclassname">pylorax.api.projects.</code><codeclass="descname">estimate_size</code><spanclass="sig-paren">(</span><em>packages</em>, <em>block_size=6144</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/projects.html#estimate_size"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.projects.estimate_size"title="Permalink to this definition">¶</a></dt>
<dd><p>Estimate the installed size of a package list</p>
<li><strong>packages</strong> (<em>list of hawkey.Package objects</em>) -- The packages to be installed</li>
<li><strong>block_size</strong> (<aclass="reference external"href="https://docs.python.org/3/library/functions.html#int"title="(in Python v3.7)"><em>int</em></a>) -- The block size to use for rounding up file sizes.</li>
<codeclass="descclassname">pylorax.api.projects.</code><codeclass="descname">get_repo_sources</code><spanclass="sig-paren">(</span><em>source_glob</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/projects.html#get_repo_sources"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.projects.get_repo_sources"title="Permalink to this definition">¶</a></dt>
<dd><p>Return a list of sources from a directory of yum repositories</p>
<trclass="field-odd field"><thclass="field-name">Parameters:</th><tdclass="field-body"><strong>source_glob</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#str"title="(in Python v3.7)"><em>str</em></a>) -- A glob to use to match the source files, including full path</td>
<trclass="field-even field"><thclass="field-name">Returns:</th><tdclass="field-body">A list of the source ids in all of the matching files</td>
</tr>
<trclass="field-odd field"><thclass="field-name">Return type:</th><tdclass="field-body">list of str</td>
</tr>
</tbody>
</table>
</dd></dl>
<dlclass="function">
<dtid="pylorax.api.projects.get_source_ids">
<codeclass="descclassname">pylorax.api.projects.</code><codeclass="descname">get_source_ids</code><spanclass="sig-paren">(</span><em>source_path</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/projects.html#get_source_ids"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.projects.get_source_ids"title="Permalink to this definition">¶</a></dt>
<dd><p>Return a list of the source ids in a file</p>
<trclass="field-odd field"><thclass="field-name">Parameters:</th><tdclass="field-body"><strong>source_path</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#str"title="(in Python v3.7)"><em>str</em></a>) -- Full path and filename of the source (yum repo) file</td>
<codeclass="descclassname">pylorax.api.projects.</code><codeclass="descname">modules_info</code><spanclass="sig-paren">(</span><em>dbo</em>, <em>module_names</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/projects.html#modules_info"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.projects.modules_info"title="Permalink to this definition">¶</a></dt>
<dd><p>Return details about a module, including dependencies</p>
<li><strong>dbo</strong> (<em>dnf.Base</em>) -- dnf base object</li>
<li><strong>module_names</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#str"title="(in Python v3.7)"><em>str</em></a>) -- Names of the modules to get info about</li>
<trclass="field-even field"><thclass="field-name">Returns:</th><tdclass="field-body"><pclass="first">List of dicts with module details and dependencies.</p>
</td>
</tr>
<trclass="field-odd field"><thclass="field-name">Return type:</th><tdclass="field-body"><pclass="first last">list of dicts</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dlclass="function">
<dtid="pylorax.api.projects.modules_list">
<codeclass="descclassname">pylorax.api.projects.</code><codeclass="descname">modules_list</code><spanclass="sig-paren">(</span><em>dbo</em>, <em>module_names</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/projects.html#modules_list"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.projects.modules_list"title="Permalink to this definition">¶</a></dt>
<li><strong>dbo</strong> (<em>dnf.Base</em>) -- dnf base object</li>
<li><strong>offset</strong> -- Number of modules to skip</li>
<li><strong>limit</strong> (<aclass="reference external"href="https://docs.python.org/3/library/functions.html#int"title="(in Python v3.7)"><em>int</em></a>) -- Maximum number of modules to return</li>
<p>Modules don't exist in RHEL7 so this only returns projects
and sets the type to "rpm"</p>
</dd></dl>
<dlclass="function">
<dtid="pylorax.api.projects.pkg_to_build">
<codeclass="descclassname">pylorax.api.projects.</code><codeclass="descname">pkg_to_build</code><spanclass="sig-paren">(</span><em>pkg</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/projects.html#pkg_to_build"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.projects.pkg_to_build"title="Permalink to this definition">¶</a></dt>
<dd><p>Extract the build details from a hawkey.Package object</p>
<codeclass="descclassname">pylorax.api.projects.</code><codeclass="descname">pkg_to_dep</code><spanclass="sig-paren">(</span><em>pkg</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/projects.html#pkg_to_dep"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.projects.pkg_to_dep"title="Permalink to this definition">¶</a></dt>
<dd><p>Extract the info from a hawkey.Package object</p>
<codeclass="descclassname">pylorax.api.projects.</code><codeclass="descname">pkg_to_project</code><spanclass="sig-paren">(</span><em>pkg</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/projects.html#pkg_to_project"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.projects.pkg_to_project"title="Permalink to this definition">¶</a></dt>
<dd><p>Extract the details from a hawkey.Package object</p>
<codeclass="descclassname">pylorax.api.projects.</code><codeclass="descname">pkg_to_project_info</code><spanclass="sig-paren">(</span><em>pkg</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/projects.html#pkg_to_project_info"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.projects.pkg_to_project_info"title="Permalink to this definition">¶</a></dt>
<dd><p>Extract the details from a hawkey.Package object</p>
<trclass="field-even field"><thclass="field-name">Returns:</th><tdclass="field-body">A dict with the project details, as well as epoch, release, arch, build_time, changelog, ...</td>
<codeclass="descclassname">pylorax.api.projects.</code><codeclass="descname">proj_to_module</code><spanclass="sig-paren">(</span><em>proj</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/projects.html#proj_to_module"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.projects.proj_to_module"title="Permalink to this definition">¶</a></dt>
<dd><p>Extract the name from a project_info dict</p>
<codeclass="descclassname">pylorax.api.projects.</code><codeclass="descname">projects_depsolve</code><spanclass="sig-paren">(</span><em>dbo</em>, <em>projects</em>, <em>groups</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/projects.html#projects_depsolve"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.projects.projects_depsolve"title="Permalink to this definition">¶</a></dt>
<trclass="field-odd field"><thclass="field-name">Return type:</th><tdclass="field-body"><pclass="first">list of dicts</p>
</td>
</tr>
<trclass="field-even field"><thclass="field-name">Raises:</th><tdclass="field-body"><pclass="first last">ProjectsError if there was a problem installing something</p>
<codeclass="descclassname">pylorax.api.projects.</code><codeclass="descname">projects_depsolve_with_size</code><spanclass="sig-paren">(</span><em>dbo</em>, <em>projects</em>, <em>groups</em>, <em>with_core=True</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/projects.html#projects_depsolve_with_size"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.projects.projects_depsolve_with_size"title="Permalink to this definition">¶</a></dt>
<trclass="field-even field"><thclass="field-name">Returns:</th><tdclass="field-body"><pclass="first">installed size and a list of NEVRA's of the project and its dependencies</p>
<trclass="field-odd field"><thclass="field-name">Return type:</th><tdclass="field-body"><pclass="first">tuple of (<aclass="reference external"href="https://docs.python.org/3/library/functions.html#int"title="(in Python v3.7)">int</a>, list of dicts)</p>
<trclass="field-even field"><thclass="field-name">Raises:</th><tdclass="field-body"><pclass="first last">ProjectsError if there was a problem installing something</p>
<codeclass="descclassname">pylorax.api.projects.</code><codeclass="descname">projects_info</code><spanclass="sig-paren">(</span><em>dbo</em>, <em>project_names</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/projects.html#projects_info"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.projects.projects_info"title="Permalink to this definition">¶</a></dt>
<li><strong>dbo</strong> (<em>dnf.Base</em>) -- dnf base object</li>
<li><strong>project_names</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#str"title="(in Python v3.7)"><em>str</em></a>) -- List of names of projects to get info about</li>
<trclass="field-even field"><thclass="field-name">Returns:</th><tdclass="field-body"><pclass="first">List of project info dicts with pkg_to_project as well as epoch, version, release, etc.</p>
</td>
</tr>
<trclass="field-odd field"><thclass="field-name">Return type:</th><tdclass="field-body"><pclass="first last">list of dicts</p>
</td>
</tr>
</tbody>
</table>
<p>If project_names is None it will return the full list of available packages</p>
</dd></dl>
<dlclass="function">
<dtid="pylorax.api.projects.projects_list">
<codeclass="descclassname">pylorax.api.projects.</code><codeclass="descname">projects_list</code><spanclass="sig-paren">(</span><em>dbo</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/projects.html#projects_list"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.projects.projects_list"title="Permalink to this definition">¶</a></dt>
<trclass="field-even field"><thclass="field-name">Returns:</th><tdclass="field-body">List of project info dicts with name, summary, description, homepage, upstream_vcs</td>
</tr>
<trclass="field-odd field"><thclass="field-name">Return type:</th><tdclass="field-body">list of dicts</td>
<codeclass="descclassname">pylorax.api.projects.</code><codeclass="descname">repo_to_source</code><spanclass="sig-paren">(</span><em>repo</em>, <em>system_source</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/projects.html#repo_to_source"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.projects.repo_to_source"title="Permalink to this definition">¶</a></dt>
<dd><p>Return a Weldr Source dict created from the DNF Repository</p>
<li><strong>system_source</strong> (<aclass="reference external"href="https://docs.python.org/3/library/functions.html#bool"title="(in Python v3.7)"><em>bool</em></a>) -- True if this source is an immutable system source</li>
<codeclass="descclassname">pylorax.api.projects.</code><codeclass="descname">source_to_repo</code><spanclass="sig-paren">(</span><em>source</em>, <em>dnf_conf</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/projects.html#source_to_repo"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.projects.source_to_repo"title="Permalink to this definition">¶</a></dt>
<dd><p>Return a dnf Repo object created from a source dict</p>
<spanid="pylorax-api-recipes-module"></span><h2>pylorax.api.recipes module<aclass="headerlink"href="#module-pylorax.api.recipes"title="Permalink to this headline">¶</a></h2>
<dlclass="class">
<dtid="pylorax.api.recipes.CommitDetails">
<emclass="property">class </em><codeclass="descclassname">pylorax.api.recipes.</code><codeclass="descname">CommitDetails</code><spanclass="sig-paren">(</span><em>commit</em>, <em>timestamp</em>, <em>message</em>, <em>revision=None</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/recipes.html#CommitDetails"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.recipes.CommitDetails"title="Permalink to this definition">¶</a></dt>
<emclass="property">exception </em><codeclass="descclassname">pylorax.api.recipes.</code><codeclass="descname">CommitTimeValError</code><aclass="reference internal"href="_modules/pylorax/api/recipes.html#CommitTimeValError"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.recipes.CommitTimeValError"title="Permalink to this definition">¶</a></dt>
<codeclass="descclassname">pylorax.api.recipes.</code><codeclass="descname">NewRecipeGit</code><spanclass="sig-paren">(</span><em>toml_dict</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/recipes.html#NewRecipeGit"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.recipes.NewRecipeGit"title="Permalink to this definition">¶</a></dt>
<dd><p>Create a RecipeGit object from fields in a TOML dict</p>
<li><strong>rpmname</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#str"title="(in Python v3.7)"><em>str</em></a>) -- Name of the rpm to create, also used as the prefix name in the tar archive</li>
<li><strong>rpmversion</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#str"title="(in Python v3.7)"><em>str</em></a>) -- Version of the rpm, eg. "1.0.0"</li>
<li><strong>rpmrelease</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#str"title="(in Python v3.7)"><em>str</em></a>) -- Release of the rpm, eg. "1"</li>
<li><strong>summary</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#str"title="(in Python v3.7)"><em>str</em></a>) -- Summary string for the rpm</li>
<li><strong>repo</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#str"title="(in Python v3.7)"><em>str</em></a>) -- URL of the get repo to clone and create the archive from</li>
<li><strong>ref</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#str"title="(in Python v3.7)"><em>str</em></a>) -- Git reference to check out. eg. origin/branch-name, git tag, or git commit hash</li>
<li><strong>destination</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#str"title="(in Python v3.7)"><em>str</em></a>) -- Path to install the / of the git repo at when installing the rpm</li>
and a .toml() function to return the recipe as a TOML string.</p>
<dlclass="method">
<dtid="pylorax.api.recipes.Recipe.bump_version">
<codeclass="descname">bump_version</code><spanclass="sig-paren">(</span><em>old_version=None</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/recipes.html#Recipe.bump_version"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.recipes.Recipe.bump_version"title="Permalink to this definition">¶</a></dt>
<trclass="field-odd field"><thclass="field-name">Parameters:</th><tdclass="field-body"><strong>old_version</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#str"title="(in Python v3.7)"><em>str</em></a>) -- An optional old version number</td>
<codeclass="descname">freeze</code><spanclass="sig-paren">(</span><em>deps</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/recipes.html#Recipe.freeze"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.recipes.Recipe.freeze"title="Permalink to this definition">¶</a></dt>
<dd><p>Return a new Recipe with full module and package NEVRA</p>
<trclass="field-odd field"><thclass="field-name">Parameters:</th><tdclass="field-body"><strong>deps</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#list"title="(in Python v3.7)"><em>list</em></a><em>(</em>) -- A list of dependency NEVRA to use to fill in the modules and packages</td>
<codeclass="descname">group_names</code><aclass="headerlink"href="#pylorax.api.recipes.Recipe.group_names"title="Permalink to this definition">¶</a></dt>
<dd><p>Return the names of the groups. Groups do not have versions.</p>
<codeclass="descname">module_names</code><aclass="headerlink"href="#pylorax.api.recipes.Recipe.module_names"title="Permalink to this definition">¶</a></dt>
<codeclass="descname">module_nver</code><aclass="headerlink"href="#pylorax.api.recipes.Recipe.module_nver"title="Permalink to this definition">¶</a></dt>
<dd><p>Return the names and version globs of the modules</p>
<codeclass="descname">package_names</code><aclass="headerlink"href="#pylorax.api.recipes.Recipe.package_names"title="Permalink to this definition">¶</a></dt>
<codeclass="descname">package_nver</code><aclass="headerlink"href="#pylorax.api.recipes.Recipe.package_nver"title="Permalink to this definition">¶</a></dt>
<dd><p>Return the names and version globs of the packages</p>
<codeclass="descname">toml</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/recipes.html#Recipe.toml"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.recipes.Recipe.toml"title="Permalink to this definition">¶</a></dt>
<dd><p>Return the Recipe in TOML format</p>
</dd></dl>
</dd></dl>
<dlclass="exception">
<dtid="pylorax.api.recipes.RecipeError">
<emclass="property">exception </em><codeclass="descclassname">pylorax.api.recipes.</code><codeclass="descname">RecipeError</code><aclass="reference internal"href="_modules/pylorax/api/recipes.html#RecipeError"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.recipes.RecipeError"title="Permalink to this definition">¶</a></dt>
<emclass="property">exception </em><codeclass="descclassname">pylorax.api.recipes.</code><codeclass="descname">RecipeFileError</code><aclass="reference internal"href="_modules/pylorax/api/recipes.html#RecipeFileError"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.recipes.RecipeFileError"title="Permalink to this definition">¶</a></dt>
<emclass="property">class </em><codeclass="descclassname">pylorax.api.recipes.</code><codeclass="descname">RecipeGroup</code><spanclass="sig-paren">(</span><em>name</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/recipes.html#RecipeGroup"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.recipes.RecipeGroup"title="Permalink to this definition">¶</a></dt>
<emclass="property">class </em><codeclass="descclassname">pylorax.api.recipes.</code><codeclass="descname">RecipeModule</code><spanclass="sig-paren">(</span><em>name</em>, <em>version</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/recipes.html#RecipeModule"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.recipes.RecipeModule"title="Permalink to this definition">¶</a></dt>
<emclass="property">class </em><codeclass="descclassname">pylorax.api.recipes.</code><codeclass="descname">RecipePackage</code><spanclass="sig-paren">(</span><em>name</em>, <em>version</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/recipes.html#RecipePackage"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.recipes.RecipePackage"title="Permalink to this definition">¶</a></dt>
<codeclass="descclassname">pylorax.api.recipes.</code><codeclass="descname">commit_recipe</code><spanclass="sig-paren">(</span><em>repo</em>, <em>branch</em>, <em>recipe</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/recipes.html#commit_recipe"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.recipes.commit_recipe"title="Permalink to this definition">¶</a></dt>
<codeclass="descclassname">pylorax.api.recipes.</code><codeclass="descname">commit_recipe_directory</code><spanclass="sig-paren">(</span><em>repo</em>, <em>branch</em>, <em>directory</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/recipes.html#commit_recipe_directory"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.recipes.commit_recipe_directory"title="Permalink to this definition">¶</a></dt>
<li><strong>directory</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#str"title="(in Python v3.7)"><em>str</em></a>) -- The directory of *.toml recipes to commit</li>
<trclass="field-odd field"><thclass="field-name">Raises:</th><tdclass="field-body"><pclass="first last">Can raise errors from Ggit or RecipeFileError</p>
</td>
</tr>
</tbody>
</table>
<p>Files with Toml or RecipeFileErrors will be skipped, and the remainder will
be tried.</p>
</dd></dl>
<dlclass="function">
<dtid="pylorax.api.recipes.commit_recipe_file">
<codeclass="descclassname">pylorax.api.recipes.</code><codeclass="descname">commit_recipe_file</code><spanclass="sig-paren">(</span><em>repo</em>, <em>branch</em>, <em>filename</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/recipes.html#commit_recipe_file"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.recipes.commit_recipe_file"title="Permalink to this definition">¶</a></dt>
<li><strong>filename</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#str"title="(in Python v3.7)"><em>str</em></a>) -- Path to the recipe file to commit</li>
<trclass="field-even field"><thclass="field-name">Raises:</th><tdclass="field-body"><pclass="first last">Can raise errors from Ggit or RecipeFileError</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dlclass="function">
<dtid="pylorax.api.recipes.delete_file">
<codeclass="descclassname">pylorax.api.recipes.</code><codeclass="descname">delete_file</code><spanclass="sig-paren">(</span><em>repo</em>, <em>branch</em>, <em>filename</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/recipes.html#delete_file"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.recipes.delete_file"title="Permalink to this definition">¶</a></dt>
<trclass="field-even field"><thclass="field-name">Raises:</th><tdclass="field-body"><pclass="first last">Can raise errors from Ggit</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dlclass="function">
<dtid="pylorax.api.recipes.delete_recipe">
<codeclass="descclassname">pylorax.api.recipes.</code><codeclass="descname">delete_recipe</code><spanclass="sig-paren">(</span><em>repo</em>, <em>branch</em>, <em>recipe_name</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/recipes.html#delete_recipe"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.recipes.delete_recipe"title="Permalink to this definition">¶</a></dt>
<li><strong>recipe_name</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#str"title="(in Python v3.7)"><em>str</em></a>) -- Recipe name to delete</li>
<trclass="field-even field"><thclass="field-name">Raises:</th><tdclass="field-body"><pclass="first last">Can raise errors from Ggit</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dlclass="function">
<dtid="pylorax.api.recipes.diff_items">
<codeclass="descclassname">pylorax.api.recipes.</code><codeclass="descname">diff_items</code><spanclass="sig-paren">(</span><em>title</em>, <em>old_items</em>, <em>new_items</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/recipes.html#diff_items"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.recipes.diff_items"title="Permalink to this definition">¶</a></dt>
<dd><p>Return the differences between two lists of dicts.</p>
<li><strong>title</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#str"title="(in Python v3.7)"><em>str</em></a>) -- Title of the entry</li>
<li><strong>old_items</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#list"title="(in Python v3.7)"><em>list</em></a><em>(</em><aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#dict"title="(in Python v3.7)"><em>dict</em></a><em>)</em>) -- List of item dicts with "name" field</li>
<li><strong>new_items</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#list"title="(in Python v3.7)"><em>list</em></a><em>(</em><aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#dict"title="(in Python v3.7)"><em>dict</em></a><em>)</em>) -- List of item dicts with "name" field</li>
<codeclass="descclassname">pylorax.api.recipes.</code><codeclass="descname">find_commit_tag</code><spanclass="sig-paren">(</span><em>repo</em>, <em>branch</em>, <em>filename</em>, <em>commit_id</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/recipes.html#find_commit_tag"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.recipes.find_commit_tag"title="Permalink to this definition">¶</a></dt>
<dd><p>Find the tag that matches the commit_id</p>
<codeclass="descclassname">pylorax.api.recipes.</code><codeclass="descname">find_name</code><spanclass="sig-paren">(</span><em>name</em>, <em>lst</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/recipes.html#find_name"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.recipes.find_name"title="Permalink to this definition">¶</a></dt>
<dd><p>Find the dict matching the name in a list and return it.</p>
<li><strong>name</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#str"title="(in Python v3.7)"><em>str</em></a>) -- Name to search for</li>
<li><strong>lst</strong> -- List of dict's with "name" field</li>
<codeclass="descclassname">pylorax.api.recipes.</code><codeclass="descname">get_commit_details</code><spanclass="sig-paren">(</span><em>commit</em>, <em>revision=None</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/recipes.html#get_commit_details"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.recipes.get_commit_details"title="Permalink to this definition">¶</a></dt>
<dd><p>Return the details about a specific commit.</p>
<codeclass="descclassname">pylorax.api.recipes.</code><codeclass="descname">get_revision_from_tag</code><spanclass="sig-paren">(</span><em>tag</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/recipes.html#get_revision_from_tag"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.recipes.get_revision_from_tag"title="Permalink to this definition">¶</a></dt>
<trclass="field-odd field"><thclass="field-name">Parameters:</th><tdclass="field-body"><strong>tag</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#str"title="(in Python v3.7)"><em>str</em></a>) -- The tag to exract the revision from</td>
<codeclass="descclassname">pylorax.api.recipes.</code><codeclass="descname">gfile</code><spanclass="sig-paren">(</span><em>path</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/recipes.html#gfile"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.recipes.gfile"title="Permalink to this definition">¶</a></dt>
<dd><p>Convert a string path to GFile for use with Git</p>
</dd></dl>
<dlclass="function">
<dtid="pylorax.api.recipes.head_commit">
<codeclass="descclassname">pylorax.api.recipes.</code><codeclass="descname">head_commit</code><spanclass="sig-paren">(</span><em>repo</em>, <em>branch</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/recipes.html#head_commit"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.recipes.head_commit"title="Permalink to this definition">¶</a></dt>
<trclass="field-even field"><thclass="field-name">Raises:</th><tdclass="field-body"><pclass="first last">Can raise errors from Ggit</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dlclass="function">
<dtid="pylorax.api.recipes.is_commit_tag">
<codeclass="descclassname">pylorax.api.recipes.</code><codeclass="descname">is_commit_tag</code><spanclass="sig-paren">(</span><em>repo</em>, <em>commit_id</em>, <em>tag</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/recipes.html#is_commit_tag"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.recipes.is_commit_tag"title="Permalink to this definition">¶</a></dt>
<dd><p>Check to see if a tag points to a specific commit.</p>
<li><strong>repo</strong> (<em>Git.Repository</em>) -- Open repository</li>
<li><strong>commit_id</strong> (<em>Git.OId</em>) -- The commit id to check</li>
<li><strong>tag</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#str"title="(in Python v3.7)"><em>str</em></a>) -- The tag to check</li>
<trclass="field-even field"><thclass="field-name">Returns:</th><tdclass="field-body"><pclass="first">True if the tag points to the commit, False otherwise</p>
<codeclass="descclassname">pylorax.api.recipes.</code><codeclass="descname">is_parent_diff</code><spanclass="sig-paren">(</span><em>repo</em>, <em>filename</em>, <em>tree</em>, <em>parent</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/recipes.html#is_parent_diff"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.recipes.is_parent_diff"title="Permalink to this definition">¶</a></dt>
<dd><p>Check to see if the commit is different from its parents</p>
<trclass="field-even field"><thclass="field-name">Retuns:</th><tdclass="field-body"><pclass="first">True if filename in the commit is different from its parents</p>
<codeclass="descclassname">pylorax.api.recipes.</code><codeclass="descname">list_branch_files</code><spanclass="sig-paren">(</span><em>repo</em>, <em>branch</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/recipes.html#list_branch_files"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.recipes.list_branch_files"title="Permalink to this definition">¶</a></dt>
<dd><p>Return a sorted list of the files on the branch HEAD</p>
<trclass="field-even field"><thclass="field-name">Raises:</th><tdclass="field-body"><pclass="first last">Can raise errors from Ggit</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dlclass="function">
<dtid="pylorax.api.recipes.list_commit_files">
<codeclass="descclassname">pylorax.api.recipes.</code><codeclass="descname">list_commit_files</code><spanclass="sig-paren">(</span><em>repo</em>, <em>commit</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/recipes.html#list_commit_files"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.recipes.list_commit_files"title="Permalink to this definition">¶</a></dt>
<dd><p>Return a sorted list of the files on a commit</p>
<trclass="field-even field"><thclass="field-name">Raises:</th><tdclass="field-body"><pclass="first last">Can raise errors from Ggit</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dlclass="function">
<dtid="pylorax.api.recipes.list_commits">
<codeclass="descclassname">pylorax.api.recipes.</code><codeclass="descname">list_commits</code><spanclass="sig-paren">(</span><em>repo</em>, <em>branch</em>, <em>filename</em>, <em>limit=0</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/recipes.html#list_commits"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.recipes.list_commits"title="Permalink to this definition">¶</a></dt>
<dd><p>List the commit history of a file on a branch.</p>
<li><strong>filename</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#str"title="(in Python v3.7)"><em>str</em></a>) -- filename to revert</li>
<li><strong>limit</strong> (<aclass="reference external"href="https://docs.python.org/3/library/functions.html#int"title="(in Python v3.7)"><em>int</em></a>) -- Number of commits to return (0=all)</li>
<trclass="field-even field"><thclass="field-name">Raises:</th><tdclass="field-body"><pclass="first last">Can raise errors from Ggit</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dlclass="function">
<dtid="pylorax.api.recipes.open_or_create_repo">
<codeclass="descclassname">pylorax.api.recipes.</code><codeclass="descname">open_or_create_repo</code><spanclass="sig-paren">(</span><em>path</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/recipes.html#open_or_create_repo"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.recipes.open_or_create_repo"title="Permalink to this definition">¶</a></dt>
<dd><p>Open an existing repo, or create a new one</p>
<trclass="field-even field"><thclass="field-name">Raises:</th><tdclass="field-body">Can raise errors from Ggit</td>
</tr>
</tbody>
</table>
<p>A bare git repo will be created in the git directory of the specified path.
If a repo already exists it will be opened and returned instead of
creating a new one.</p>
</dd></dl>
<dlclass="function">
<dtid="pylorax.api.recipes.prepare_commit">
<codeclass="descclassname">pylorax.api.recipes.</code><codeclass="descname">prepare_commit</code><spanclass="sig-paren">(</span><em>repo</em>, <em>branch</em>, <em>builder</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/recipes.html#prepare_commit"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.recipes.prepare_commit"title="Permalink to this definition">¶</a></dt>
<trclass="field-even field"><thclass="field-name">Raises:</th><tdclass="field-body"><pclass="first last">Can raise errors from Ggit</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dlclass="function">
<dtid="pylorax.api.recipes.read_commit">
<codeclass="descclassname">pylorax.api.recipes.</code><codeclass="descname">read_commit</code><spanclass="sig-paren">(</span><em>repo</em>, <em>branch</em>, <em>filename</em>, <em>commit=None</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/recipes.html#read_commit"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.recipes.read_commit"title="Permalink to this definition">¶</a></dt>
<dd><p>Return the contents of a file on a specific branch or commit.</p>
<trclass="field-even field"><thclass="field-name">Raises:</th><tdclass="field-body"><pclass="first last">Can raise errors from Ggit</p>
</td>
</tr>
</tbody>
</table>
<p>If no commit is passed the master:filename is returned, otherwise it will be
commit:filename</p>
</dd></dl>
<dlclass="function">
<dtid="pylorax.api.recipes.read_commit_spec">
<codeclass="descclassname">pylorax.api.recipes.</code><codeclass="descname">read_commit_spec</code><spanclass="sig-paren">(</span><em>repo</em>, <em>spec</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/recipes.html#read_commit_spec"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.recipes.read_commit_spec"title="Permalink to this definition">¶</a></dt>
<dd><p>Return the raw content of the blob specified by the spec</p>
<codeclass="descclassname">pylorax.api.recipes.</code><codeclass="descname">read_recipe_and_id</code><spanclass="sig-paren">(</span><em>repo</em>, <em>branch</em>, <em>recipe_name</em>, <em>commit=None</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/recipes.html#read_recipe_and_id"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.recipes.read_recipe_and_id"title="Permalink to this definition">¶</a></dt>
<dd><p>Read a recipe commit and its id from git</p>
<li><strong>recipe_name</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#str"title="(in Python v3.7)"><em>str</em></a>) -- Recipe name to read</li>
<trclass="field-even field"><thclass="field-name">Raises:</th><tdclass="field-body"><pclass="first last">Can raise errors from Ggit</p>
</td>
</tr>
</tbody>
</table>
<p>If no commit is passed the master:filename is returned, otherwise it will be
commit:filename</p>
</dd></dl>
<dlclass="function">
<dtid="pylorax.api.recipes.read_recipe_commit">
<codeclass="descclassname">pylorax.api.recipes.</code><codeclass="descname">read_recipe_commit</code><spanclass="sig-paren">(</span><em>repo</em>, <em>branch</em>, <em>recipe_name</em>, <em>commit=None</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/recipes.html#read_recipe_commit"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.recipes.read_recipe_commit"title="Permalink to this definition">¶</a></dt>
<dd><p>Read a recipe commit from git and return a Recipe object</p>
<li><strong>recipe_name</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#str"title="(in Python v3.7)"><em>str</em></a>) -- Recipe name to read</li>
<trclass="field-even field"><thclass="field-name">Raises:</th><tdclass="field-body"><pclass="first last">Can raise errors from Ggit</p>
</td>
</tr>
</tbody>
</table>
<p>If no commit is passed the master:filename is returned, otherwise it will be
commit:filename</p>
</dd></dl>
<dlclass="function">
<dtid="pylorax.api.recipes.recipe_diff">
<codeclass="descclassname">pylorax.api.recipes.</code><codeclass="descname">recipe_diff</code><spanclass="sig-paren">(</span><em>old_recipe</em>, <em>new_recipe</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/recipes.html#recipe_diff"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.recipes.recipe_diff"title="Permalink to this definition">¶</a></dt>
<li><strong>old_recipe</strong> (<aclass="reference internal"href="#pylorax.api.recipes.Recipe"title="pylorax.api.recipes.Recipe"><em>Recipe</em></a>) -- The old version of the recipe</li>
<li><strong>new_recipe</strong> (<aclass="reference internal"href="#pylorax.api.recipes.Recipe"title="pylorax.api.recipes.Recipe"><em>Recipe</em></a>) -- The new version of the recipe</li>
<codeclass="descclassname">pylorax.api.recipes.</code><codeclass="descname">recipe_filename</code><spanclass="sig-paren">(</span><em>name</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/recipes.html#recipe_filename"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.recipes.recipe_filename"title="Permalink to this definition">¶</a></dt>
<codeclass="descclassname">pylorax.api.recipes.</code><codeclass="descname">recipe_from_dict</code><spanclass="sig-paren">(</span><em>recipe_dict</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/recipes.html#recipe_from_dict"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.recipes.recipe_from_dict"title="Permalink to this definition">¶</a></dt>
<dd><p>Create a Recipe object from a plain dict.</p>
<trclass="field-odd field"><thclass="field-name">Parameters:</th><tdclass="field-body"><strong>recipe_dict</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#dict"title="(in Python v3.7)"><em>dict</em></a>) -- A plain dict of the recipe</td>
<codeclass="descclassname">pylorax.api.recipes.</code><codeclass="descname">recipe_from_file</code><spanclass="sig-paren">(</span><em>recipe_path</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/recipes.html#recipe_from_file"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.recipes.recipe_from_file"title="Permalink to this definition">¶</a></dt>
<dd><p>Return a recipe file as a Recipe object</p>
<codeclass="descclassname">pylorax.api.recipes.</code><codeclass="descname">recipe_from_toml</code><spanclass="sig-paren">(</span><em>recipe_str</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/recipes.html#recipe_from_toml"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.recipes.recipe_from_toml"title="Permalink to this definition">¶</a></dt>
<dd><p>Create a Recipe object from a toml string.</p>
<codeclass="descclassname">pylorax.api.recipes.</code><codeclass="descname">repo_file_exists</code><spanclass="sig-paren">(</span><em>repo</em>, <em>branch</em>, <em>filename</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/recipes.html#repo_file_exists"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.recipes.repo_file_exists"title="Permalink to this definition">¶</a></dt>
<dd><p>Return True if the filename exists on the branch</p>
<li><strong>filename</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#str"title="(in Python v3.7)"><em>str</em></a>) -- Filename to check</li>
</ul>
</td>
</tr>
<trclass="field-even field"><thclass="field-name">Returns:</th><tdclass="field-body"><pclass="first">True if the filename exists on the HEAD of the branch, False otherwise.</p>
<codeclass="descclassname">pylorax.api.recipes.</code><codeclass="descname">revert_file</code><spanclass="sig-paren">(</span><em>repo</em>, <em>branch</em>, <em>filename</em>, <em>commit</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/recipes.html#revert_file"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.recipes.revert_file"title="Permalink to this definition">¶</a></dt>
<dd><p>Revert the contents of a file to that of a previous commit</p>
<trclass="field-even field"><thclass="field-name">Raises:</th><tdclass="field-body"><pclass="first last">Can raise errors from Ggit</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dlclass="function">
<dtid="pylorax.api.recipes.revert_recipe">
<codeclass="descclassname">pylorax.api.recipes.</code><codeclass="descname">revert_recipe</code><spanclass="sig-paren">(</span><em>repo</em>, <em>branch</em>, <em>recipe_name</em>, <em>commit</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/recipes.html#revert_recipe"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.recipes.revert_recipe"title="Permalink to this definition">¶</a></dt>
<dd><p>Revert the contents of a recipe to that of a previous commit</p>
<li><strong>recipe_name</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#str"title="(in Python v3.7)"><em>str</em></a>) -- Recipe name to revert</li>
<trclass="field-even field"><thclass="field-name">Raises:</th><tdclass="field-body"><pclass="first last">Can raise errors from Ggit</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dlclass="function">
<dtid="pylorax.api.recipes.tag_file_commit">
<codeclass="descclassname">pylorax.api.recipes.</code><codeclass="descname">tag_file_commit</code><spanclass="sig-paren">(</span><em>repo</em>, <em>branch</em>, <em>filename</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/recipes.html#tag_file_commit"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.recipes.tag_file_commit"title="Permalink to this definition">¶</a></dt>
<trclass="field-even field"><thclass="field-name">Raises:</th><tdclass="field-body"><pclass="first last">Can raise errors from Ggit</p>
</td>
</tr>
</tbody>
</table>
<p>This uses git tags, of the form <cite>refs/tags/<branch>/<filename>/r<revision></cite>
Only the most recent recipe commit can be tagged to prevent out of order tagging.
Revisions start at 1 and increment for each new commit that is tagged.
If the commit has already been tagged it will return false.</p>
</dd></dl>
<dlclass="function">
<dtid="pylorax.api.recipes.tag_recipe_commit">
<codeclass="descclassname">pylorax.api.recipes.</code><codeclass="descname">tag_recipe_commit</code><spanclass="sig-paren">(</span><em>repo</em>, <em>branch</em>, <em>recipe_name</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/recipes.html#tag_recipe_commit"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.recipes.tag_recipe_commit"title="Permalink to this definition">¶</a></dt>
<li><strong>recipe_name</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#str"title="(in Python v3.7)"><em>str</em></a>) -- Recipe name to tag</li>
<trclass="field-even field"><thclass="field-name">Raises:</th><tdclass="field-body"><pclass="first last">Can raise errors from Ggit</p>
</td>
</tr>
</tbody>
</table>
<p>Uses tag_file_commit()</p>
</dd></dl>
<dlclass="function">
<dtid="pylorax.api.recipes.write_commit">
<codeclass="descclassname">pylorax.api.recipes.</code><codeclass="descname">write_commit</code><spanclass="sig-paren">(</span><em>repo</em>, <em>branch</em>, <em>filename</em>, <em>message</em>, <em>content</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/recipes.html#write_commit"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.recipes.write_commit"title="Permalink to this definition">¶</a></dt>
<li><strong>filename</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#str"title="(in Python v3.7)"><em>str</em></a>) -- full path of the file to add</li>
<li><strong>message</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#str"title="(in Python v3.7)"><em>str</em></a>) -- The commit message</li>
<li><strong>content</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#str"title="(in Python v3.7)"><em>str</em></a>) -- The data to write</li>
<spanid="pylorax-api-regexes-module"></span><h2>pylorax.api.regexes module<aclass="headerlink"href="#module-pylorax.api.regexes"title="Permalink to this headline">¶</a></h2>
<spanid="pylorax-api-timestamp-module"></span><h2>pylorax.api.timestamp module<aclass="headerlink"href="#module-pylorax.api.timestamp"title="Permalink to this headline">¶</a></h2>
<dlclass="function">
<dtid="pylorax.api.timestamp.timestamp_dict">
<codeclass="descclassname">pylorax.api.timestamp.</code><codeclass="descname">timestamp_dict</code><spanclass="sig-paren">(</span><em>destdir</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/timestamp.html#timestamp_dict"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.timestamp.timestamp_dict"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="function">
<dtid="pylorax.api.timestamp.write_timestamp">
<codeclass="descclassname">pylorax.api.timestamp.</code><codeclass="descname">write_timestamp</code><spanclass="sig-paren">(</span><em>destdir</em>, <em>ty</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/timestamp.html#write_timestamp"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.timestamp.write_timestamp"title="Permalink to this definition">¶</a></dt>
<spanid="pylorax-api-workspace-module"></span><h2>pylorax.api.workspace module<aclass="headerlink"href="#module-pylorax.api.workspace"title="Permalink to this headline">¶</a></h2>
<dlclass="function">
<dtid="pylorax.api.workspace.workspace_delete">
<codeclass="descclassname">pylorax.api.workspace.</code><codeclass="descname">workspace_delete</code><spanclass="sig-paren">(</span><em>repo</em>, <em>branch</em>, <em>recipe_name</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/workspace.html#workspace_delete"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.workspace.workspace_delete"title="Permalink to this definition">¶</a></dt>
<li><strong>recipe_name</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#str"title="(in Python v3.7)"><em>str</em></a>) -- The name of the recipe</li>
<trclass="field-odd field"><thclass="field-name">Raises:</th><tdclass="field-body"><pclass="first last">IO related errors</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dlclass="function">
<dtid="pylorax.api.workspace.workspace_dir">
<codeclass="descclassname">pylorax.api.workspace.</code><codeclass="descname">workspace_dir</code><spanclass="sig-paren">(</span><em>repo</em>, <em>branch</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/workspace.html#workspace_dir"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.workspace.workspace_dir"title="Permalink to this definition">¶</a></dt>
<codeclass="descclassname">pylorax.api.workspace.</code><codeclass="descname">workspace_read</code><spanclass="sig-paren">(</span><em>repo</em>, <em>branch</em>, <em>recipe_name</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/workspace.html#workspace_read"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.workspace.workspace_read"title="Permalink to this definition">¶</a></dt>
<li><strong>recipe_name</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#str"title="(in Python v3.7)"><em>str</em></a>) -- The name of the recipe</li>
<trclass="field-even field"><thclass="field-name">Returns:</th><tdclass="field-body"><pclass="first">The workspace copy of the recipe, or None if it doesn't exist</p>
<codeclass="descclassname">pylorax.api.workspace.</code><codeclass="descname">workspace_write</code><spanclass="sig-paren">(</span><em>repo</em>, <em>branch</em>, <em>recipe</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/workspace.html#workspace_write"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.workspace.workspace_write"title="Permalink to this definition">¶</a></dt>
<li><strong>recipe</strong> (<aclass="reference internal"href="#pylorax.api.recipes.Recipe"title="pylorax.api.recipes.Recipe"><em>Recipe</em></a>) -- The recipe to write to the workspace</li>
<trclass="field-odd field"><thclass="field-name">Raises:</th><tdclass="field-body"><pclass="first last">IO related errors</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
</div>
<divclass="section"id="module-pylorax.api">
<spanid="module-contents"></span><h2>Module contents<aclass="headerlink"href="#module-pylorax.api"title="Permalink to this headline">¶</a></h2>
<dlclass="function">
<dtid="pylorax.api.crossdomain">
<codeclass="descclassname">pylorax.api.</code><codeclass="descname">crossdomain</code><spanclass="sig-paren">(</span><em>origin</em>, <em>methods=None</em>, <em>headers=None</em>, <em>max_age=21600</em>, <em>attach_to_all=True</em>, <em>automatic_options=True</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/api/crossdomain.html#crossdomain"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.api.crossdomain"title="Permalink to this definition">¶</a></dt>
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>.