<!DOCTYPE html> <!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]--> <!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]--> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>General — python-copr 1.63 documentation</title> <script type="text/javascript" src="../_static/js/modernizr.min.js"></script> <script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script> <script type="text/javascript" src="../_static/jquery.js"></script> <script type="text/javascript" src="../_static/underscore.js"></script> <script type="text/javascript" src="../_static/doctools.js"></script> <script type="text/javascript" src="../_static/language_data.js"></script> <script type="text/javascript" src="../_static/js/theme.js"></script> <link rel="stylesheet" href="../_static/css/theme.css" type="text/css" /> <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> <link rel="index" title="Index" href="../genindex.html" /> <link rel="search" title="Search" href="../search.html" /> <link rel="next" title="Handlers" href="handlers.html" /> <link rel="prev" title="Mock chroot" href="resource_info/mock_chroot.html" /> </head> <body class="wy-body-for-nav"> <div class="wy-grid-for-nav"> <nav data-toggle="wy-nav-shift" class="wy-nav-side"> <div class="wy-side-scroll"> <div class="wy-side-nav-search" > <a href="../index.html" class="icon icon-home"> python-copr </a> <div class="version"> 1.63 </div> <div role="search"> <form id="rtd-search-form" class="wy-form" action="../search.html" method="get"> <input type="text" name="q" placeholder="Search docs" /> <input type="hidden" name="check_keywords" value="yes" /> <input type="hidden" name="area" value="default" /> </form> </div> </div> <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation"> <ul> <li class="toctree-l1"><a class="reference internal" href="../installation.html">Installation</a></li> </ul> <ul class="current"> <li class="toctree-l1"><a class="reference internal" href="../ClientV1.html">Legacy client</a></li> <li class="toctree-l1 current"><a class="reference internal" href="../ClientV2.html">Client version 2</a><ul class="current"> <li class="toctree-l2"><a class="reference internal" href="initialization.html">Client initialization</a></li> <li class="toctree-l2"><a class="reference internal" href="resources_usage.html">Resources</a></li> <li class="toctree-l2"><a class="reference internal" href="errors.html">Error handling</a></li> <li class="toctree-l2"><a class="reference internal" href="../ClientV2.html#resources-info">Resources info</a></li> <li class="toctree-l2 current"><a class="reference internal" href="../ClientV2.html#autodoc">Autodoc</a><ul class="current"> <li class="toctree-l3 current"><a class="current reference internal" href="#">General</a></li> <li class="toctree-l3"><a class="reference internal" href="#coprclient">CoprClient</a></li> <li class="toctree-l3"><a class="reference internal" href="handlers.html">Handlers</a></li> <li class="toctree-l3"><a class="reference internal" href="resources.html">Resources</a></li> <li class="toctree-l3"><a class="reference internal" href="entities.html">Entities</a></li> </ul> </li> </ul> </li> <li class="toctree-l1"><a class="reference internal" href="../ClientV3.html">Client version 3</a></li> </ul> </div> </div> </nav> <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"> <nav class="wy-nav-top" aria-label="top navigation"> <i data-toggle="wy-nav-top" class="fa fa-bars"></i> <a href="../index.html">python-copr</a> </nav> <div class="wy-nav-content"> <div class="rst-content"> <div role="navigation" aria-label="breadcrumbs navigation"> <ul class="wy-breadcrumbs"> <li><a href="../index.html">Docs</a> »</li> <li><a href="../ClientV2.html">Client version 2</a> »</li> <li>General</li> <li class="wy-breadcrumbs-aside"> <a href="../_sources/client_v2/general.rst.txt" rel="nofollow"> View page source</a> </li> </ul> <hr/> </div> <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article"> <div itemprop="articleBody"> <div class="section" id="general"> <h1>General<a class="headerlink" href="#general" title="Permalink to this headline">¶</a></h1> <dl class="function"> <dt id="copr.create_client2_from_params"> <code class="descclassname">copr.</code><code class="descname">create_client2_from_params</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#copr.create_client2_from_params" title="Permalink to this definition">¶</a></dt> <dd><p>Create client instance using the given parameters</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> <li><strong>root_url</strong> (<em>str</em>) – Url to the Copr service, default: “<a class="reference external" href="http://copr.fedoraproject.org">http://copr.fedoraproject.org</a>”</li> <li><strong>login</strong> (<em>str</em>) – api login</li> <li><strong>token</strong> (<em>str</em>) – api token</li> </ul> </td> </tr> <tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#copr.client_v2.client.CoprClient" title="copr.client_v2.client.CoprClient"><code class="xref py py-class docutils literal notranslate"><span class="pre">client_v2.client.CoprClient</span></code></a></p> </td> </tr> </tbody> </table> </dd></dl> <dl class="function"> <dt id="copr.create_client2_from_file_config"> <code class="descclassname">copr.</code><code class="descname">create_client2_from_file_config</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#copr.create_client2_from_file_config" title="Permalink to this definition">¶</a></dt> <dd><p>Creates Copr client using the information from the config file.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> <li><strong>filepath</strong> (<code class="xref any docutils literal notranslate"><span class="pre">str</span></code>) – specifies config location, default: “~/.config/copr”</li> <li><strong>ignore_error</strong> (<em>bool</em>) – When true and config is missing, creates default Client without credentionals</li> </ul> </td> </tr> <tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#copr.client_v2.client.CoprClient" title="copr.client_v2.client.CoprClient"><code class="xref py py-class docutils literal notranslate"><span class="pre">client_v2.client.CoprClient</span></code></a></p> </td> </tr> </tbody> </table> </dd></dl> </div> <div class="section" id="coprclient"> <h1>CoprClient<a class="headerlink" href="#coprclient" title="Permalink to this headline">¶</a></h1> <dl class="class"> <dt id="copr.client_v2.client.CoprClient"> <em class="property">class </em><code class="descclassname">copr.client_v2.client.</code><code class="descname">CoprClient</code><span class="sig-paren">(</span><em>net_client</em>, <em>root_url=None</em>, <em>no_config=False</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/copr/client_v2/client.html#CoprClient"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#copr.client_v2.client.CoprClient" title="Permalink to this definition">¶</a></dt> <dd><p>Main interface to the copr service</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> <li><strong>net_client</strong> (<em>NetClient</em>) – wrapper for http requests</li> <li><strong>root_url</strong> (<em>unicode</em>) – used as copr projects root</li> <li><strong>no_config</strong> (<em>bool</em>) – helper flag to indicate that no config was provided</li> </ul> </td> </tr> </tbody> </table> <dl class="docutils"> <dt>Could be created:</dt> <dd><ul class="first last simple"> <li>using static method <a class="reference internal" href="#copr.client_v2.client.CoprClient.create_from_file_config" title="copr.client_v2.client.CoprClient.create_from_file_config"><code class="xref py py-meth docutils literal notranslate"><span class="pre">create_from_file_config()</span></code></a></li> <li>using static method <a class="reference internal" href="#copr.client_v2.client.CoprClient.create_from_params" title="copr.client_v2.client.CoprClient.create_from_params"><code class="xref py py-meth docutils literal notranslate"><span class="pre">create_from_params()</span></code></a></li> </ul> </dd> </dl> <p>If you create Client directly call <a class="reference internal" href="#copr.client_v2.client.CoprClient.post_init" title="copr.client_v2.client.CoprClient.post_init"><code class="xref py py-meth docutils literal notranslate"><span class="pre">CoprClient.post_init()</span></code></a> method after the creation.</p> <dl class="attribute"> <dt id="copr.client_v2.client.CoprClient.projects"> <code class="descname">projects</code><a class="headerlink" href="#copr.client_v2.client.CoprClient.projects" title="Permalink to this definition">¶</a></dt> <dd><table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference internal" href="handlers.html#copr.client_v2.handlers.ProjectHandle" title="copr.client_v2.handlers.ProjectHandle"><code class="xref py py-class docutils literal notranslate"><span class="pre">ProjectHandle</span></code></a></td> </tr> </tbody> </table> </dd></dl> <dl class="attribute"> <dt id="copr.client_v2.client.CoprClient.project_chroots"> <code class="descname">project_chroots</code><a class="headerlink" href="#copr.client_v2.client.CoprClient.project_chroots" title="Permalink to this definition">¶</a></dt> <dd><table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference internal" href="handlers.html#copr.client_v2.handlers.ProjectChrootHandle" title="copr.client_v2.handlers.ProjectChrootHandle"><code class="xref py py-class docutils literal notranslate"><span class="pre">ProjectChrootHandle</span></code></a></td> </tr> </tbody> </table> </dd></dl> <dl class="attribute"> <dt id="copr.client_v2.client.CoprClient.builds"> <code class="descname">builds</code><a class="headerlink" href="#copr.client_v2.client.CoprClient.builds" title="Permalink to this definition">¶</a></dt> <dd><table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference internal" href="handlers.html#copr.client_v2.handlers.BuildHandle" title="copr.client_v2.handlers.BuildHandle"><code class="xref py py-class docutils literal notranslate"><span class="pre">BuildHandle</span></code></a></td> </tr> </tbody> </table> </dd></dl> <dl class="attribute"> <dt id="copr.client_v2.client.CoprClient.build_tasks"> <code class="descname">build_tasks</code><a class="headerlink" href="#copr.client_v2.client.CoprClient.build_tasks" title="Permalink to this definition">¶</a></dt> <dd><table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference internal" href="handlers.html#copr.client_v2.handlers.BuildTaskHandle" title="copr.client_v2.handlers.BuildTaskHandle"><code class="xref py py-class docutils literal notranslate"><span class="pre">BuildTaskHandle</span></code></a></td> </tr> </tbody> </table> </dd></dl> <dl class="attribute"> <dt id="copr.client_v2.client.CoprClient.mock_chroots"> <code class="descname">mock_chroots</code><a class="headerlink" href="#copr.client_v2.client.CoprClient.mock_chroots" title="Permalink to this definition">¶</a></dt> <dd><table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference internal" href="handlers.html#copr.client_v2.handlers.MockChrootHandle" title="copr.client_v2.handlers.MockChrootHandle"><code class="xref py py-class docutils literal notranslate"><span class="pre">MockChrootHandle</span></code></a></td> </tr> </tbody> </table> </dd></dl> <dl class="classmethod"> <dt id="copr.client_v2.client.CoprClient.create_from_params"> <em class="property">classmethod </em><code class="descname">create_from_params</code><span class="sig-paren">(</span><em>root_url=None</em>, <em>login=None</em>, <em>token=None</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/copr/client_v2/client.html#CoprClient.create_from_params"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#copr.client_v2.client.CoprClient.create_from_params" title="Permalink to this definition">¶</a></dt> <dd><p>Create client instance using the given parameters</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> <li><strong>root_url</strong> (<em>str</em>) – Url to the Copr service, default: “<a class="reference external" href="http://copr.fedoraproject.org">http://copr.fedoraproject.org</a>”</li> <li><strong>login</strong> (<em>str</em>) – api login</li> <li><strong>token</strong> (<em>str</em>) – api token</li> </ul> </td> </tr> <tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#copr.client_v2.client.CoprClient" title="copr.client_v2.client.CoprClient"><code class="xref py py-class docutils literal notranslate"><span class="pre">client_v2.client.CoprClient</span></code></a></p> </td> </tr> </tbody> </table> </dd></dl> <dl class="classmethod"> <dt id="copr.client_v2.client.CoprClient.create_from_file_config"> <em class="property">classmethod </em><code class="descname">create_from_file_config</code><span class="sig-paren">(</span><em>filepath=None</em>, <em>ignore_error=False</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/copr/client_v2/client.html#CoprClient.create_from_file_config"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#copr.client_v2.client.CoprClient.create_from_file_config" title="Permalink to this definition">¶</a></dt> <dd><p>Creates Copr client using the information from the config file.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> <li><strong>filepath</strong> (<code class="xref any docutils literal notranslate"><span class="pre">str</span></code>) – specifies config location, default: “~/.config/copr”</li> <li><strong>ignore_error</strong> (<em>bool</em>) – When true and config is missing, creates default Client without credentionals</li> </ul> </td> </tr> <tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#copr.client_v2.client.CoprClient" title="copr.client_v2.client.CoprClient"><code class="xref py py-class docutils literal notranslate"><span class="pre">client_v2.client.CoprClient</span></code></a></p> </td> </tr> </tbody> </table> </dd></dl> <dl class="method"> <dt id="copr.client_v2.client.CoprClient.post_init"> <code class="descname">post_init</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/copr/client_v2/client.html#CoprClient.post_init"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#copr.client_v2.client.CoprClient.post_init" title="Permalink to this definition">¶</a></dt> <dd><p>Finalizes client initialization by querying API root info</p> </dd></dl> </dd></dl> </div> </div> </div> <footer> <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation"> <a href="handlers.html" class="btn btn-neutral float-right" title="Handlers" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a> <a href="resource_info/mock_chroot.html" class="btn btn-neutral float-left" title="Mock chroot" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a> </div> <hr/> <div role="contentinfo"> <p> © Copyright 2018, Red Hat, Inc. </p> </div> Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>. </footer> </div> </div> </section> </div> <script type="text/javascript"> jQuery(function () { SphinxRtdTheme.Navigation.enable(true); }); </script> </body> </html>