Added docs for cpl.console

This commit is contained in:
Sven Heidemann 2021-05-16 17:42:09 +02:00
parent cda1fabd4f
commit 7b90b5af57
19 changed files with 479 additions and 283 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -187,8 +187,12 @@
<code class="sig-name descname"><span class="pre">add_configuration</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">key_type</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">Union</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">,</span> </span><span class="pre">type</span><span class="p"><span class="pre">]</span></span></span></em>, <em class="sig-param"><span class="n"><span class="pre">value</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><a class="reference internal" href="#cpl.configuration.configuration_model_abc.ConfigurationModelABC" title="cpl.configuration.configuration_model_abc.ConfigurationModelABC"><span class="pre">cpl.configuration.configuration_model_abc.ConfigurationModelABC</span></a></span></em><span class="sig-paren">)</span><a class="headerlink" href="#cpl.configuration.configuration.Configuration.add_configuration" title="Permalink to this definition"></a></dt> <code class="sig-name descname"><span class="pre">add_configuration</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">key_type</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">Union</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">,</span> </span><span class="pre">type</span><span class="p"><span class="pre">]</span></span></span></em>, <em class="sig-param"><span class="n"><span class="pre">value</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><a class="reference internal" href="#cpl.configuration.configuration_model_abc.ConfigurationModelABC" title="cpl.configuration.configuration_model_abc.ConfigurationModelABC"><span class="pre">cpl.configuration.configuration_model_abc.ConfigurationModelABC</span></a></span></em><span class="sig-paren">)</span><a class="headerlink" href="#cpl.configuration.configuration.Configuration.add_configuration" title="Permalink to this definition"></a></dt>
<dd><p>Add configuration object</p> <dd><p>Add configuration object</p>
<blockquote> <blockquote>
<div><p>key_type: Union[<code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">type</span></code>] <div><dl class="simple">
value: <a class="reference internal" href="#cpl.configuration.configuration_model_abc.ConfigurationModelABC" title="cpl.configuration.configuration_model_abc.ConfigurationModelABC"><code class="xref py py-class docutils literal notranslate"><span class="pre">cpl.configuration.configuration_model_abc.ConfigurationModelABC</span></code></a></p> <dt>key_type: Union[<code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">type</span></code>]</dt><dd><p>Type of the value</p>
</dd>
<dt>value: <a class="reference internal" href="#cpl.configuration.configuration_model_abc.ConfigurationModelABC" title="cpl.configuration.configuration_model_abc.ConfigurationModelABC"><code class="xref py py-class docutils literal notranslate"><span class="pre">cpl.configuration.configuration_model_abc.ConfigurationModelABC</span></code></a></dt><dd><p>Object of the value</p>
</dd>
</dl>
</div></blockquote> </div></blockquote>
</dd></dl> </dd></dl>
@ -197,7 +201,10 @@ value: <a class="reference internal" href="#cpl.configuration.configuration_mode
<code class="sig-name descname"><span class="pre">add_console_argument</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">argument</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><a class="reference internal" href="#cpl.configuration.console_argument.ConsoleArgument" title="cpl.configuration.console_argument.ConsoleArgument"><span class="pre">cpl.configuration.console_argument.ConsoleArgument</span></a></span></em><span class="sig-paren">)</span><a class="headerlink" href="#cpl.configuration.configuration.Configuration.add_console_argument" title="Permalink to this definition"></a></dt> <code class="sig-name descname"><span class="pre">add_console_argument</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">argument</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><a class="reference internal" href="#cpl.configuration.console_argument.ConsoleArgument" title="cpl.configuration.console_argument.ConsoleArgument"><span class="pre">cpl.configuration.console_argument.ConsoleArgument</span></a></span></em><span class="sig-paren">)</span><a class="headerlink" href="#cpl.configuration.configuration.Configuration.add_console_argument" title="Permalink to this definition"></a></dt>
<dd><p>Adds console argument to known console arguments</p> <dd><p>Adds console argument to known console arguments</p>
<blockquote> <blockquote>
<div><p>argument: <code class="xref py py-class docutils literal notranslate"><span class="pre">cpl.console.console_argument.ConsoleArgument</span></code></p> <div><dl class="simple">
<dt>argument: <a class="reference internal" href="#cpl.configuration.console_argument.ConsoleArgument" title="cpl.configuration.console_argument.ConsoleArgument"><code class="xref py py-class docutils literal notranslate"><span class="pre">cpl.configuration.console_argument.ConsoleArgument</span></code></a></dt><dd><p>Specifies the console argument</p>
</dd>
</dl>
</div></blockquote> </div></blockquote>
</dd></dl> </dd></dl>
@ -218,7 +225,10 @@ value: <a class="reference internal" href="#cpl.configuration.configuration_mode
<code class="sig-name descname"><span class="pre">add_environment_variables</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">prefix</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">str</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#cpl.configuration.configuration.Configuration.add_environment_variables" title="Permalink to this definition"></a></dt> <code class="sig-name descname"><span class="pre">add_environment_variables</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">prefix</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">str</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#cpl.configuration.configuration.Configuration.add_environment_variables" title="Permalink to this definition"></a></dt>
<dd><p>Reads the environment variables</p> <dd><p>Reads the environment variables</p>
<blockquote> <blockquote>
<div><p>prefix: <code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></p> <div><dl class="simple">
<dt>prefix: <code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></dt><dd><p>Prefix of the variables</p>
</dd>
</dl>
</div></blockquote> </div></blockquote>
</dd></dl> </dd></dl>
@ -227,10 +237,16 @@ value: <a class="reference internal" href="#cpl.configuration.configuration_mode
<code class="sig-name descname"><span class="pre">add_json_file</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">name</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">str</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">optional</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">bool</span><span class="p"><span class="pre">]</span></span></span> <span class="o"><span class="pre">=</span></span> <span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">output</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">bool</span></span> <span class="o"><span class="pre">=</span></span> <span class="default_value"><span class="pre">True</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">path</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">]</span></span></span> <span class="o"><span class="pre">=</span></span> <span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#cpl.configuration.configuration.Configuration.add_json_file" title="Permalink to this definition"></a></dt> <code class="sig-name descname"><span class="pre">add_json_file</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">name</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">str</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">optional</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">bool</span><span class="p"><span class="pre">]</span></span></span> <span class="o"><span class="pre">=</span></span> <span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">output</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">bool</span></span> <span class="o"><span class="pre">=</span></span> <span class="default_value"><span class="pre">True</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">path</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">]</span></span></span> <span class="o"><span class="pre">=</span></span> <span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#cpl.configuration.configuration.Configuration.add_json_file" title="Permalink to this definition"></a></dt>
<dd><p>Reads and saves settings from given json file</p> <dd><p>Reads and saves settings from given json file</p>
<blockquote> <blockquote>
<div><p>name (str): Name of the file <div><dl class="simple">
optional: <code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code> <dt>name: <code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></dt><dd><p>Name of the file</p>
output: <code class="xref py py-class docutils literal notranslate"><span class="pre">bool</span></code> </dd>
path: <code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></p> <dt>optional: <code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></dt><dd><p>Specifies whether an error should occur if the file was not found</p>
</dd>
<dt>output: <code class="xref py py-class docutils literal notranslate"><span class="pre">bool</span></code></dt><dd><p>Specifies whether an output should take place</p>
</dd>
<dt>path: <code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></dt><dd><p>Path in which the file should be stored</p>
</dd>
</dl>
</div></blockquote> </div></blockquote>
</dd></dl> </dd></dl>
@ -254,7 +270,10 @@ path: <code class="xref py py-class docutils literal notranslate"><span class="p
<code class="sig-name descname"><span class="pre">get_configuration</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">search_type</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">Union</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">,</span> </span><span class="pre">Type</span><span class="p"><span class="pre">[</span></span><a class="reference internal" href="#cpl.configuration.configuration_model_abc.ConfigurationModelABC" title="cpl.configuration.configuration_model_abc.ConfigurationModelABC"><span class="pre">cpl.configuration.configuration_model_abc.ConfigurationModelABC</span></a><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">]</span></span></span></em><span class="sig-paren">)</span> &#x2192; <span class="pre">Union</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">,</span> </span><span class="pre">collections.abc.Callable</span><span class="p"><span class="pre">[</span></span><a class="reference internal" href="#cpl.configuration.configuration_model_abc.ConfigurationModelABC" title="cpl.configuration.configuration_model_abc.ConfigurationModelABC"><span class="pre">cpl.configuration.configuration_model_abc.ConfigurationModelABC</span></a><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">]</span></span><a class="headerlink" href="#cpl.configuration.configuration.Configuration.get_configuration" title="Permalink to this definition"></a></dt> <code class="sig-name descname"><span class="pre">get_configuration</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">search_type</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">Union</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">,</span> </span><span class="pre">Type</span><span class="p"><span class="pre">[</span></span><a class="reference internal" href="#cpl.configuration.configuration_model_abc.ConfigurationModelABC" title="cpl.configuration.configuration_model_abc.ConfigurationModelABC"><span class="pre">cpl.configuration.configuration_model_abc.ConfigurationModelABC</span></a><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">]</span></span></span></em><span class="sig-paren">)</span> &#x2192; <span class="pre">Union</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">,</span> </span><span class="pre">collections.abc.Callable</span><span class="p"><span class="pre">[</span></span><a class="reference internal" href="#cpl.configuration.configuration_model_abc.ConfigurationModelABC" title="cpl.configuration.configuration_model_abc.ConfigurationModelABC"><span class="pre">cpl.configuration.configuration_model_abc.ConfigurationModelABC</span></a><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">]</span></span><a class="headerlink" href="#cpl.configuration.configuration.Configuration.get_configuration" title="Permalink to this definition"></a></dt>
<dd><p>Returns value from configuration by given type</p> <dd><p>Returns value from configuration by given type</p>
<blockquote> <blockquote>
<div><p>search_type: Union[<code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code>, Type[<a class="reference internal" href="#cpl.configuration.configuration_model_abc.ConfigurationModelABC" title="cpl.configuration.configuration_model_abc.ConfigurationModelABC"><code class="xref py py-class docutils literal notranslate"><span class="pre">cpl.configuration.configuration_model_abc.ConfigurationModelABC</span></code></a>]]</p> <div><dl class="simple">
<dt>search_type: Union[<code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code>, Type[<a class="reference internal" href="#cpl.configuration.configuration_model_abc.ConfigurationModelABC" title="cpl.configuration.configuration_model_abc.ConfigurationModelABC"><code class="xref py py-class docutils literal notranslate"><span class="pre">cpl.configuration.configuration_model_abc.ConfigurationModelABC</span></code></a>]]</dt><dd><p>Type to search for</p>
</dd>
</dl>
</div></blockquote> </div></blockquote>
<blockquote> <blockquote>
<div><p>Object of Union[<code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code>, Callable[<a class="reference internal" href="#cpl.configuration.configuration_model_abc.ConfigurationModelABC" title="cpl.configuration.configuration_model_abc.ConfigurationModelABC"><code class="xref py py-class docutils literal notranslate"><span class="pre">cpl.configuration.configuration_model_abc.ConfigurationModelABC</span></code></a>]]</p> <div><p>Object of Union[<code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code>, Callable[<a class="reference internal" href="#cpl.configuration.configuration_model_abc.ConfigurationModelABC" title="cpl.configuration.configuration_model_abc.ConfigurationModelABC"><code class="xref py py-class docutils literal notranslate"><span class="pre">cpl.configuration.configuration_model_abc.ConfigurationModelABC</span></code></a>]]</p>
@ -275,8 +294,12 @@ path: <code class="xref py py-class docutils literal notranslate"><span class="p
<em class="property"><span class="pre">abstract</span> </em><code class="sig-name descname"><span class="pre">add_configuration</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">key_type</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">Union</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">,</span> </span><span class="pre">type</span><span class="p"><span class="pre">]</span></span></span></em>, <em class="sig-param"><span class="n"><span class="pre">value</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><a class="reference internal" href="#cpl.configuration.configuration_model_abc.ConfigurationModelABC" title="cpl.configuration.configuration_model_abc.ConfigurationModelABC"><span class="pre">cpl.configuration.configuration_model_abc.ConfigurationModelABC</span></a></span></em><span class="sig-paren">)</span><a class="headerlink" href="#cpl.configuration.configuration_abc.ConfigurationABC.add_configuration" title="Permalink to this definition"></a></dt> <em class="property"><span class="pre">abstract</span> </em><code class="sig-name descname"><span class="pre">add_configuration</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">key_type</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">Union</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">,</span> </span><span class="pre">type</span><span class="p"><span class="pre">]</span></span></span></em>, <em class="sig-param"><span class="n"><span class="pre">value</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><a class="reference internal" href="#cpl.configuration.configuration_model_abc.ConfigurationModelABC" title="cpl.configuration.configuration_model_abc.ConfigurationModelABC"><span class="pre">cpl.configuration.configuration_model_abc.ConfigurationModelABC</span></a></span></em><span class="sig-paren">)</span><a class="headerlink" href="#cpl.configuration.configuration_abc.ConfigurationABC.add_configuration" title="Permalink to this definition"></a></dt>
<dd><p>Add configuration object</p> <dd><p>Add configuration object</p>
<blockquote> <blockquote>
<div><p>key_type: Union[<code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">type</span></code>] <div><dl class="simple">
value: <a class="reference internal" href="#cpl.configuration.configuration_model_abc.ConfigurationModelABC" title="cpl.configuration.configuration_model_abc.ConfigurationModelABC"><code class="xref py py-class docutils literal notranslate"><span class="pre">cpl.configuration.configuration_model_abc.ConfigurationModelABC</span></code></a></p> <dt>key_type: Union[<code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">type</span></code>]</dt><dd><p>Type of the value</p>
</dd>
<dt>value: <a class="reference internal" href="#cpl.configuration.configuration_model_abc.ConfigurationModelABC" title="cpl.configuration.configuration_model_abc.ConfigurationModelABC"><code class="xref py py-class docutils literal notranslate"><span class="pre">cpl.configuration.configuration_model_abc.ConfigurationModelABC</span></code></a></dt><dd><p>Object of the value</p>
</dd>
</dl>
</div></blockquote> </div></blockquote>
</dd></dl> </dd></dl>
@ -285,7 +308,10 @@ value: <a class="reference internal" href="#cpl.configuration.configuration_mode
<em class="property"><span class="pre">abstract</span> </em><code class="sig-name descname"><span class="pre">add_console_argument</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">argument</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><a class="reference internal" href="#cpl.configuration.console_argument.ConsoleArgument" title="cpl.configuration.console_argument.ConsoleArgument"><span class="pre">cpl.configuration.console_argument.ConsoleArgument</span></a></span></em><span class="sig-paren">)</span><a class="headerlink" href="#cpl.configuration.configuration_abc.ConfigurationABC.add_console_argument" title="Permalink to this definition"></a></dt> <em class="property"><span class="pre">abstract</span> </em><code class="sig-name descname"><span class="pre">add_console_argument</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">argument</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><a class="reference internal" href="#cpl.configuration.console_argument.ConsoleArgument" title="cpl.configuration.console_argument.ConsoleArgument"><span class="pre">cpl.configuration.console_argument.ConsoleArgument</span></a></span></em><span class="sig-paren">)</span><a class="headerlink" href="#cpl.configuration.configuration_abc.ConfigurationABC.add_console_argument" title="Permalink to this definition"></a></dt>
<dd><p>Adds console argument to known console arguments</p> <dd><p>Adds console argument to known console arguments</p>
<blockquote> <blockquote>
<div><p>argument: <code class="xref py py-class docutils literal notranslate"><span class="pre">cpl.console.console_argument.ConsoleArgument</span></code></p> <div><dl class="simple">
<dt>argument: <a class="reference internal" href="#cpl.configuration.console_argument.ConsoleArgument" title="cpl.configuration.console_argument.ConsoleArgument"><code class="xref py py-class docutils literal notranslate"><span class="pre">cpl.configuration.console_argument.ConsoleArgument</span></code></a></dt><dd><p>Specifies the console argument</p>
</dd>
</dl>
</div></blockquote> </div></blockquote>
</dd></dl> </dd></dl>
@ -306,7 +332,10 @@ value: <a class="reference internal" href="#cpl.configuration.configuration_mode
<em class="property"><span class="pre">abstract</span> </em><code class="sig-name descname"><span class="pre">add_environment_variables</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">prefix</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">str</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#cpl.configuration.configuration_abc.ConfigurationABC.add_environment_variables" title="Permalink to this definition"></a></dt> <em class="property"><span class="pre">abstract</span> </em><code class="sig-name descname"><span class="pre">add_environment_variables</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">prefix</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">str</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#cpl.configuration.configuration_abc.ConfigurationABC.add_environment_variables" title="Permalink to this definition"></a></dt>
<dd><p>Reads the environment variables</p> <dd><p>Reads the environment variables</p>
<blockquote> <blockquote>
<div><p>prefix: <code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></p> <div><dl class="simple">
<dt>prefix: <code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></dt><dd><p>Prefix of the variables</p>
</dd>
</dl>
</div></blockquote> </div></blockquote>
</dd></dl> </dd></dl>
@ -315,10 +344,16 @@ value: <a class="reference internal" href="#cpl.configuration.configuration_mode
<em class="property"><span class="pre">abstract</span> </em><code class="sig-name descname"><span class="pre">add_json_file</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">name</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">str</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">optional</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">bool</span><span class="p"><span class="pre">]</span></span></span> <span class="o"><span class="pre">=</span></span> <span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">output</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">bool</span></span> <span class="o"><span class="pre">=</span></span> <span class="default_value"><span class="pre">True</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">path</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">]</span></span></span> <span class="o"><span class="pre">=</span></span> <span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#cpl.configuration.configuration_abc.ConfigurationABC.add_json_file" title="Permalink to this definition"></a></dt> <em class="property"><span class="pre">abstract</span> </em><code class="sig-name descname"><span class="pre">add_json_file</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">name</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">str</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">optional</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">bool</span><span class="p"><span class="pre">]</span></span></span> <span class="o"><span class="pre">=</span></span> <span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">output</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">bool</span></span> <span class="o"><span class="pre">=</span></span> <span class="default_value"><span class="pre">True</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">path</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">]</span></span></span> <span class="o"><span class="pre">=</span></span> <span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#cpl.configuration.configuration_abc.ConfigurationABC.add_json_file" title="Permalink to this definition"></a></dt>
<dd><p>Reads and saves settings from given json file</p> <dd><p>Reads and saves settings from given json file</p>
<blockquote> <blockquote>
<div><p>name (str): Name of the file <div><dl class="simple">
optional: <code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code> <dt>name: <code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></dt><dd><p>Name of the file</p>
output: <code class="xref py py-class docutils literal notranslate"><span class="pre">bool</span></code> </dd>
path: <code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></p> <dt>optional: <code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></dt><dd><p>Specifies whether an error should occur if the file was not found</p>
</dd>
<dt>output: <code class="xref py py-class docutils literal notranslate"><span class="pre">bool</span></code></dt><dd><p>Specifies whether an output should take place</p>
</dd>
<dt>path: <code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></dt><dd><p>Path in which the file should be stored</p>
</dd>
</dl>
</div></blockquote> </div></blockquote>
</dd></dl> </dd></dl>
@ -342,7 +377,10 @@ path: <code class="xref py py-class docutils literal notranslate"><span class="p
<em class="property"><span class="pre">abstract</span> </em><code class="sig-name descname"><span class="pre">get_configuration</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">search_type</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">Union</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">,</span> </span><span class="pre">Type</span><span class="p"><span class="pre">[</span></span><a class="reference internal" href="#cpl.configuration.configuration_model_abc.ConfigurationModelABC" title="cpl.configuration.configuration_model_abc.ConfigurationModelABC"><span class="pre">cpl.configuration.configuration_model_abc.ConfigurationModelABC</span></a><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">]</span></span></span></em><span class="sig-paren">)</span> &#x2192; <span class="pre">Union</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">,</span> </span><span class="pre">collections.abc.Callable</span><span class="p"><span class="pre">[</span></span><a class="reference internal" href="#cpl.configuration.configuration_model_abc.ConfigurationModelABC" title="cpl.configuration.configuration_model_abc.ConfigurationModelABC"><span class="pre">cpl.configuration.configuration_model_abc.ConfigurationModelABC</span></a><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">]</span></span><a class="headerlink" href="#cpl.configuration.configuration_abc.ConfigurationABC.get_configuration" title="Permalink to this definition"></a></dt> <em class="property"><span class="pre">abstract</span> </em><code class="sig-name descname"><span class="pre">get_configuration</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">search_type</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">Union</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">,</span> </span><span class="pre">Type</span><span class="p"><span class="pre">[</span></span><a class="reference internal" href="#cpl.configuration.configuration_model_abc.ConfigurationModelABC" title="cpl.configuration.configuration_model_abc.ConfigurationModelABC"><span class="pre">cpl.configuration.configuration_model_abc.ConfigurationModelABC</span></a><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">]</span></span></span></em><span class="sig-paren">)</span> &#x2192; <span class="pre">Union</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">,</span> </span><span class="pre">collections.abc.Callable</span><span class="p"><span class="pre">[</span></span><a class="reference internal" href="#cpl.configuration.configuration_model_abc.ConfigurationModelABC" title="cpl.configuration.configuration_model_abc.ConfigurationModelABC"><span class="pre">cpl.configuration.configuration_model_abc.ConfigurationModelABC</span></a><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">]</span></span><a class="headerlink" href="#cpl.configuration.configuration_abc.ConfigurationABC.get_configuration" title="Permalink to this definition"></a></dt>
<dd><p>Returns value from configuration by given type</p> <dd><p>Returns value from configuration by given type</p>
<blockquote> <blockquote>
<div><p>search_type: Union[<code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code>, Type[<a class="reference internal" href="#cpl.configuration.configuration_model_abc.ConfigurationModelABC" title="cpl.configuration.configuration_model_abc.ConfigurationModelABC"><code class="xref py py-class docutils literal notranslate"><span class="pre">cpl.configuration.configuration_model_abc.ConfigurationModelABC</span></code></a>]]</p> <div><dl class="simple">
<dt>search_type: Union[<code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code>, Type[<a class="reference internal" href="#cpl.configuration.configuration_model_abc.ConfigurationModelABC" title="cpl.configuration.configuration_model_abc.ConfigurationModelABC"><code class="xref py py-class docutils literal notranslate"><span class="pre">cpl.configuration.configuration_model_abc.ConfigurationModelABC</span></code></a>]]</dt><dd><p>Type to search for</p>
</dd>
</dl>
</div></blockquote> </div></blockquote>
<blockquote> <blockquote>
<div><p>Object of Union[<code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code>, Callable[<a class="reference internal" href="#cpl.configuration.configuration_model_abc.ConfigurationModelABC" title="cpl.configuration.configuration_model_abc.ConfigurationModelABC"><code class="xref py py-class docutils literal notranslate"><span class="pre">cpl.configuration.configuration_model_abc.ConfigurationModelABC</span></code></a>]]</p> <div><p>Object of Union[<code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code>, Callable[<a class="reference internal" href="#cpl.configuration.configuration_model_abc.ConfigurationModelABC" title="cpl.configuration.configuration_model_abc.ConfigurationModelABC"><code class="xref py py-class docutils literal notranslate"><span class="pre">cpl.configuration.configuration_model_abc.ConfigurationModelABC</span></code></a>]]</p>
@ -361,9 +399,10 @@ path: <code class="xref py py-class docutils literal notranslate"><span class="p
<dl class="py method"> <dl class="py method">
<dt id="cpl.configuration.configuration_model_abc.ConfigurationModelABC.from_dict"> <dt id="cpl.configuration.configuration_model_abc.ConfigurationModelABC.from_dict">
<em class="property"><span class="pre">abstract</span> </em><code class="sig-name descname"><span class="pre">from_dict</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">settings</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">dict</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#cpl.configuration.configuration_model_abc.ConfigurationModelABC.from_dict" title="Permalink to this definition"></a></dt> <em class="property"><span class="pre">abstract</span> </em><code class="sig-name descname"><span class="pre">from_dict</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">settings</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">dict</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#cpl.configuration.configuration_model_abc.ConfigurationModelABC.from_dict" title="Permalink to this definition"></a></dt>
<dd><p>Converts attributes to dict <dd><p>Converts attributes to dict</p>
:param settings: <blockquote>
:return:</p> <div><p>settings: <code class="xref py py-class docutils literal notranslate"><span class="pre">dict</span></code></p>
</div></blockquote>
</dd></dl> </dd></dl>
</dd></dl> </dd></dl>

View File

@ -246,53 +246,57 @@
<dl class="py method"> <dl class="py method">
<dt id="cpl.console.console.Console.banner"> <dt id="cpl.console.console.Console.banner">
<em class="property"><span class="pre">classmethod</span> </em><code class="sig-name descname"><span class="pre">banner</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">string</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">str</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#cpl.console.console.Console.banner" title="Permalink to this definition"></a></dt> <em class="property"><span class="pre">classmethod</span> </em><code class="sig-name descname"><span class="pre">banner</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">string</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">str</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#cpl.console.console.Console.banner" title="Permalink to this definition"></a></dt>
<dd><p>Prints the string as a banner <dd><p>Prints the string as a banner</p>
:param string: <blockquote>
:return:</p> <div><dl class="simple">
<dt>string: <code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></dt><dd><p>Message to print as banner</p>
</dd>
</dl>
</div></blockquote>
</dd></dl> </dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="cpl.console.console.Console.clear"> <dt id="cpl.console.console.Console.clear">
<em class="property"><span class="pre">classmethod</span> </em><code class="sig-name descname"><span class="pre">clear</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#cpl.console.console.Console.clear" title="Permalink to this definition"></a></dt> <em class="property"><span class="pre">classmethod</span> </em><code class="sig-name descname"><span class="pre">clear</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#cpl.console.console.Console.clear" title="Permalink to this definition"></a></dt>
<dd><p>Clears the console <dd><p>Clears the console</p>
:return:</p>
</dd></dl> </dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="cpl.console.console.Console.close"> <dt id="cpl.console.console.Console.close">
<em class="property"><span class="pre">classmethod</span> </em><code class="sig-name descname"><span class="pre">close</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#cpl.console.console.Console.close" title="Permalink to this definition"></a></dt> <em class="property"><span class="pre">classmethod</span> </em><code class="sig-name descname"><span class="pre">close</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#cpl.console.console.Console.close" title="Permalink to this definition"></a></dt>
<dd><p>Close the application <dd><p>Closes the application</p>
:return:</p>
</dd></dl> </dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="cpl.console.console.Console.color_reset"> <dt id="cpl.console.console.Console.color_reset">
<em class="property"><span class="pre">classmethod</span> </em><code class="sig-name descname"><span class="pre">color_reset</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#cpl.console.console.Console.color_reset" title="Permalink to this definition"></a></dt> <em class="property"><span class="pre">classmethod</span> </em><code class="sig-name descname"><span class="pre">color_reset</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#cpl.console.console.Console.color_reset" title="Permalink to this definition"></a></dt>
<dd><p>Resets color <dd><p>Resets the color settings</p>
:return:</p>
</dd></dl> </dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="cpl.console.console.Console.disable"> <dt id="cpl.console.console.Console.disable">
<em class="property"><span class="pre">classmethod</span> </em><code class="sig-name descname"><span class="pre">disable</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#cpl.console.console.Console.disable" title="Permalink to this definition"></a></dt> <em class="property"><span class="pre">classmethod</span> </em><code class="sig-name descname"><span class="pre">disable</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#cpl.console.console.Console.disable" title="Permalink to this definition"></a></dt>
<dd><p>Disable console interaction <dd><p>Disables console interaction</p>
:return:</p>
</dd></dl> </dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="cpl.console.console.Console.enable"> <dt id="cpl.console.console.Console.enable">
<em class="property"><span class="pre">classmethod</span> </em><code class="sig-name descname"><span class="pre">enable</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#cpl.console.console.Console.enable" title="Permalink to this definition"></a></dt> <em class="property"><span class="pre">classmethod</span> </em><code class="sig-name descname"><span class="pre">enable</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#cpl.console.console.Console.enable" title="Permalink to this definition"></a></dt>
<dd><p>Enable console interaction <dd><p>Enables console interaction</p>
:return:</p>
</dd></dl> </dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="cpl.console.console.Console.error"> <dt id="cpl.console.console.Console.error">
<em class="property"><span class="pre">classmethod</span> </em><code class="sig-name descname"><span class="pre">error</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">string</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">str</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">tb</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">]</span></span></span> <span class="o"><span class="pre">=</span></span> <span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#cpl.console.console.Console.error" title="Permalink to this definition"></a></dt> <em class="property"><span class="pre">classmethod</span> </em><code class="sig-name descname"><span class="pre">error</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">string</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">str</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">tb</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">]</span></span></span> <span class="o"><span class="pre">=</span></span> <span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#cpl.console.console.Console.error" title="Permalink to this definition"></a></dt>
<dd><p>Prints an error with traceback <dd><p>Prints an error with traceback</p>
:param string: <blockquote>
:param tb: <div><dl class="simple">
:return:</p> <dt>string: <code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></dt><dd><p>Error message</p>
</dd>
<dt>tb: <code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></dt><dd><p>Error traceback</p>
</dd>
</dl>
</div></blockquote>
</dd></dl> </dd></dl>
<dl class="py attribute"> <dl class="py attribute">
@ -303,65 +307,106 @@
<dl class="py method"> <dl class="py method">
<dt id="cpl.console.console.Console.read"> <dt id="cpl.console.console.Console.read">
<em class="property"><span class="pre">classmethod</span> </em><code class="sig-name descname"><span class="pre">read</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">output</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">]</span></span></span> <span class="o"><span class="pre">=</span></span> <span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span> &#x2192; <span class="pre">str</span><a class="headerlink" href="#cpl.console.console.Console.read" title="Permalink to this definition"></a></dt> <em class="property"><span class="pre">classmethod</span> </em><code class="sig-name descname"><span class="pre">read</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">output</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">]</span></span></span> <span class="o"><span class="pre">=</span></span> <span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span> &#x2192; <span class="pre">str</span><a class="headerlink" href="#cpl.console.console.Console.read" title="Permalink to this definition"></a></dt>
<dd><p>Read in line <dd><p>Reads in line</p>
:param output: <blockquote>
:return:</p> <div><dl class="simple">
<dt>output: <code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></dt><dd><p>String to print before input</p>
</dd>
</dl>
</div></blockquote>
<blockquote>
<div><p>input()</p>
</div></blockquote>
</dd></dl> </dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="cpl.console.console.Console.read_line"> <dt id="cpl.console.console.Console.read_line">
<em class="property"><span class="pre">classmethod</span> </em><code class="sig-name descname"><span class="pre">read_line</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">output</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">]</span></span></span> <span class="o"><span class="pre">=</span></span> <span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span> &#x2192; <span class="pre">str</span><a class="headerlink" href="#cpl.console.console.Console.read_line" title="Permalink to this definition"></a></dt> <em class="property"><span class="pre">classmethod</span> </em><code class="sig-name descname"><span class="pre">read_line</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">output</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">]</span></span></span> <span class="o"><span class="pre">=</span></span> <span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span> &#x2192; <span class="pre">str</span><a class="headerlink" href="#cpl.console.console.Console.read_line" title="Permalink to this definition"></a></dt>
<dd><p>Reads in next line <dd><p>Reads in next line</p>
:param output: <blockquote>
:return:</p> <div><dl class="simple">
<dt>output: <code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></dt><dd><p>String to print before input</p>
</dd>
</dl>
</div></blockquote>
<blockquote>
<div><p>input()</p>
</div></blockquote>
</dd></dl> </dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="cpl.console.console.Console.reset_cursor_position"> <dt id="cpl.console.console.Console.reset_cursor_position">
<em class="property"><span class="pre">classmethod</span> </em><code class="sig-name descname"><span class="pre">reset_cursor_position</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#cpl.console.console.Console.reset_cursor_position" title="Permalink to this definition"></a></dt> <em class="property"><span class="pre">classmethod</span> </em><code class="sig-name descname"><span class="pre">reset_cursor_position</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#cpl.console.console.Console.reset_cursor_position" title="Permalink to this definition"></a></dt>
<dd><p>Resets cursor position <dd><p>Resets cursor position</p>
:return:</p>
</dd></dl> </dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="cpl.console.console.Console.select"> <dt id="cpl.console.console.Console.select">
<em class="property"><span class="pre">classmethod</span> </em><code class="sig-name descname"><span class="pre">select</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="pre">char:</span> <span class="pre">str</span></em>, <em class="sig-param"><span class="pre">message:</span> <span class="pre">str</span></em>, <em class="sig-param"><span class="pre">options:</span> <span class="pre">list</span></em>, <em class="sig-param"><span class="pre">header_foreground_color:</span> <span class="pre">Union[str</span></em>, <em class="sig-param"><span class="pre">cpl.console.foreground_color_enum.ForegroundColorEnum]</span> <span class="pre">=</span> <span class="pre">&lt;ForegroundColorEnum.default:</span> <span class="pre">'default'&gt;</span></em>, <em class="sig-param"><span class="pre">header_background_color:</span> <span class="pre">Union[str</span></em>, <em class="sig-param"><span class="pre">cpl.console.background_color_enum.BackgroundColorEnum]</span> <span class="pre">=</span> <span class="pre">&lt;BackgroundColorEnum.default:</span> <span class="pre">'on_default'&gt;</span></em>, <em class="sig-param"><span class="pre">option_foreground_color:</span> <span class="pre">Union[str</span></em>, <em class="sig-param"><span class="pre">cpl.console.foreground_color_enum.ForegroundColorEnum]</span> <span class="pre">=</span> <span class="pre">&lt;ForegroundColorEnum.default:</span> <span class="pre">'default'&gt;</span></em>, <em class="sig-param"><span class="pre">option_background_color:</span> <span class="pre">Union[str</span></em>, <em class="sig-param"><span class="pre">cpl.console.background_color_enum.BackgroundColorEnum]</span> <span class="pre">=</span> <span class="pre">&lt;BackgroundColorEnum.default:</span> <span class="pre">'on_default'&gt;</span></em>, <em class="sig-param"><span class="pre">cursor_foreground_color:</span> <span class="pre">Union[str</span></em>, <em class="sig-param"><span class="pre">cpl.console.foreground_color_enum.ForegroundColorEnum]</span> <span class="pre">=</span> <span class="pre">&lt;ForegroundColorEnum.default:</span> <span class="pre">'default'&gt;</span></em>, <em class="sig-param"><span class="pre">cursor_background_color:</span> <span class="pre">Union[str</span></em>, <em class="sig-param"><span class="pre">cpl.console.background_color_enum.BackgroundColorEnum]</span> <span class="pre">=</span> <span class="pre">&lt;BackgroundColorEnum.default:</span> <span class="pre">'on_default'&gt;</span></em><span class="sig-paren">)</span> &#x2192; <span class="pre">str</span><a class="headerlink" href="#cpl.console.console.Console.select" title="Permalink to this definition"></a></dt> <em class="property"><span class="pre">classmethod</span> </em><code class="sig-name descname"><span class="pre">select</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="pre">char:</span> <span class="pre">str</span></em>, <em class="sig-param"><span class="pre">message:</span> <span class="pre">str</span></em>, <em class="sig-param"><span class="pre">options:</span> <span class="pre">list</span></em>, <em class="sig-param"><span class="pre">header_foreground_color:</span> <span class="pre">Union[str</span></em>, <em class="sig-param"><span class="pre">cpl.console.foreground_color_enum.ForegroundColorEnum]</span> <span class="pre">=</span> <span class="pre">&lt;ForegroundColorEnum.default:</span> <span class="pre">'default'&gt;</span></em>, <em class="sig-param"><span class="pre">header_background_color:</span> <span class="pre">Union[str</span></em>, <em class="sig-param"><span class="pre">cpl.console.background_color_enum.BackgroundColorEnum]</span> <span class="pre">=</span> <span class="pre">&lt;BackgroundColorEnum.default:</span> <span class="pre">'on_default'&gt;</span></em>, <em class="sig-param"><span class="pre">option_foreground_color:</span> <span class="pre">Union[str</span></em>, <em class="sig-param"><span class="pre">cpl.console.foreground_color_enum.ForegroundColorEnum]</span> <span class="pre">=</span> <span class="pre">&lt;ForegroundColorEnum.default:</span> <span class="pre">'default'&gt;</span></em>, <em class="sig-param"><span class="pre">option_background_color:</span> <span class="pre">Union[str</span></em>, <em class="sig-param"><span class="pre">cpl.console.background_color_enum.BackgroundColorEnum]</span> <span class="pre">=</span> <span class="pre">&lt;BackgroundColorEnum.default:</span> <span class="pre">'on_default'&gt;</span></em>, <em class="sig-param"><span class="pre">cursor_foreground_color:</span> <span class="pre">Union[str</span></em>, <em class="sig-param"><span class="pre">cpl.console.foreground_color_enum.ForegroundColorEnum]</span> <span class="pre">=</span> <span class="pre">&lt;ForegroundColorEnum.default:</span> <span class="pre">'default'&gt;</span></em>, <em class="sig-param"><span class="pre">cursor_background_color:</span> <span class="pre">Union[str</span></em>, <em class="sig-param"><span class="pre">cpl.console.background_color_enum.BackgroundColorEnum]</span> <span class="pre">=</span> <span class="pre">&lt;BackgroundColorEnum.default:</span> <span class="pre">'on_default'&gt;</span></em><span class="sig-paren">)</span> &#x2192; <span class="pre">str</span><a class="headerlink" href="#cpl.console.console.Console.select" title="Permalink to this definition"></a></dt>
<dd><p>Prints select menu <dd><p>Prints select menu</p>
:param char: <blockquote>
:param message: <div><dl class="simple">
:param options: <dt>char: <code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></dt><dd><p>Character to show which element is selected</p>
:param header_foreground_color: </dd>
:param header_background_color: <dt>message: <code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></dt><dd><p>Message or header of the selection</p>
:param option_foreground_color: </dd>
:param option_background_color: <dt>options: List[<code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code>]</dt><dd><p>Selectable options</p>
:param cursor_foreground_color: </dd>
:param cursor_background_color: <dt>header_foreground_color: Union[<code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code>, <a class="reference internal" href="#cpl.console.foreground_color_enum.ForegroundColorEnum" title="cpl.console.foreground_color_enum.ForegroundColorEnum"><code class="xref py py-class docutils literal notranslate"><span class="pre">cpl.console.foreground_color_enum.ForegroundColorEnum</span></code></a>]</dt><dd><p>Foreground color of the header</p>
:return: Selected option as str</p> </dd>
<dt>header_background_color: Union[<code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code>, <a class="reference internal" href="#cpl.console.background_color_enum.BackgroundColorEnum" title="cpl.console.background_color_enum.BackgroundColorEnum"><code class="xref py py-class docutils literal notranslate"><span class="pre">cpl.console.background_color_enum.BackgroundColorEnum</span></code></a>]</dt><dd><p>Background color of the header</p>
</dd>
<dt>option_foreground_color: Union[<code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code>, <a class="reference internal" href="#cpl.console.foreground_color_enum.ForegroundColorEnum" title="cpl.console.foreground_color_enum.ForegroundColorEnum"><code class="xref py py-class docutils literal notranslate"><span class="pre">cpl.console.foreground_color_enum.ForegroundColorEnum</span></code></a>]</dt><dd><p>Foreground color of the options</p>
</dd>
<dt>option_background_color: Union[<code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code>, <a class="reference internal" href="#cpl.console.background_color_enum.BackgroundColorEnum" title="cpl.console.background_color_enum.BackgroundColorEnum"><code class="xref py py-class docutils literal notranslate"><span class="pre">cpl.console.background_color_enum.BackgroundColorEnum</span></code></a>]</dt><dd><p>Background color of the options</p>
</dd>
<dt>cursor_foreground_color: Union[<code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code>, <a class="reference internal" href="#cpl.console.foreground_color_enum.ForegroundColorEnum" title="cpl.console.foreground_color_enum.ForegroundColorEnum"><code class="xref py py-class docutils literal notranslate"><span class="pre">cpl.console.foreground_color_enum.ForegroundColorEnum</span></code></a>]</dt><dd><p>Foreground color of the cursor</p>
</dd>
<dt>cursor_background_color: Union[<code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code>, <a class="reference internal" href="#cpl.console.background_color_enum.BackgroundColorEnum" title="cpl.console.background_color_enum.BackgroundColorEnum"><code class="xref py py-class docutils literal notranslate"><span class="pre">cpl.console.background_color_enum.BackgroundColorEnum</span></code></a>]</dt><dd><p>Background color of the cursor</p>
</dd>
</dl>
</div></blockquote>
<blockquote>
<div><p>Selected option as <code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></p>
</div></blockquote>
</dd></dl> </dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="cpl.console.console.Console.set_background_color"> <dt id="cpl.console.console.Console.set_background_color">
<em class="property"><span class="pre">classmethod</span> </em><code class="sig-name descname"><span class="pre">set_background_color</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">color</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">Union</span><span class="p"><span class="pre">[</span></span><a class="reference internal" href="#cpl.console.background_color_enum.BackgroundColorEnum" title="cpl.console.background_color_enum.BackgroundColorEnum"><span class="pre">cpl.console.background_color_enum.BackgroundColorEnum</span></a><span class="p"><span class="pre">,</span> </span><span class="pre">str</span><span class="p"><span class="pre">]</span></span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#cpl.console.console.Console.set_background_color" title="Permalink to this definition"></a></dt> <em class="property"><span class="pre">classmethod</span> </em><code class="sig-name descname"><span class="pre">set_background_color</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">color</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">Union</span><span class="p"><span class="pre">[</span></span><a class="reference internal" href="#cpl.console.background_color_enum.BackgroundColorEnum" title="cpl.console.background_color_enum.BackgroundColorEnum"><span class="pre">cpl.console.background_color_enum.BackgroundColorEnum</span></a><span class="p"><span class="pre">,</span> </span><span class="pre">str</span><span class="p"><span class="pre">]</span></span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#cpl.console.console.Console.set_background_color" title="Permalink to this definition"></a></dt>
<dd><p>Sets the background color <dd><p>Sets the background color</p>
:param color: <blockquote>
:return:</p> <div><dl class="simple">
<dt>color: Union[<a class="reference internal" href="#cpl.console.background_color_enum.BackgroundColorEnum" title="cpl.console.background_color_enum.BackgroundColorEnum"><code class="xref py py-class docutils literal notranslate"><span class="pre">cpl.console.background_color_enum.BackgroundColorEnum</span></code></a>, <code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code>]</dt><dd><p>Background color of the console</p>
</dd>
</dl>
</div></blockquote>
</dd></dl> </dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="cpl.console.console.Console.set_cursor_position"> <dt id="cpl.console.console.Console.set_cursor_position">
<em class="property"><span class="pre">classmethod</span> </em><code class="sig-name descname"><span class="pre">set_cursor_position</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">x</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">int</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">y</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">int</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#cpl.console.console.Console.set_cursor_position" title="Permalink to this definition"></a></dt> <em class="property"><span class="pre">classmethod</span> </em><code class="sig-name descname"><span class="pre">set_cursor_position</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">x</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">int</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">y</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">int</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#cpl.console.console.Console.set_cursor_position" title="Permalink to this definition"></a></dt>
<dd><p>Sets cursor position <dd><p>Sets cursor position</p>
:param x: <blockquote>
:param y: <div><dl class="simple">
:return:</p> <dt>x: <code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code></dt><dd><p>X coordinate</p>
</dd>
<dt>y: <code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code></dt><dd><p>Y coordinate</p>
</dd>
</dl>
</div></blockquote>
</dd></dl> </dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="cpl.console.console.Console.set_foreground_color"> <dt id="cpl.console.console.Console.set_foreground_color">
<em class="property"><span class="pre">classmethod</span> </em><code class="sig-name descname"><span class="pre">set_foreground_color</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">color</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">Union</span><span class="p"><span class="pre">[</span></span><a class="reference internal" href="#cpl.console.foreground_color_enum.ForegroundColorEnum" title="cpl.console.foreground_color_enum.ForegroundColorEnum"><span class="pre">cpl.console.foreground_color_enum.ForegroundColorEnum</span></a><span class="p"><span class="pre">,</span> </span><span class="pre">str</span><span class="p"><span class="pre">]</span></span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#cpl.console.console.Console.set_foreground_color" title="Permalink to this definition"></a></dt> <em class="property"><span class="pre">classmethod</span> </em><code class="sig-name descname"><span class="pre">set_foreground_color</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">color</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">Union</span><span class="p"><span class="pre">[</span></span><a class="reference internal" href="#cpl.console.foreground_color_enum.ForegroundColorEnum" title="cpl.console.foreground_color_enum.ForegroundColorEnum"><span class="pre">cpl.console.foreground_color_enum.ForegroundColorEnum</span></a><span class="p"><span class="pre">,</span> </span><span class="pre">str</span><span class="p"><span class="pre">]</span></span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#cpl.console.console.Console.set_foreground_color" title="Permalink to this definition"></a></dt>
<dd><p>Sets the foreground color <dd><p>Sets the foreground color</p>
:param color: <blockquote>
:return:</p> <div><dl class="simple">
<dt>color: Union[<a class="reference internal" href="#cpl.console.background_color_enum.BackgroundColorEnum" title="cpl.console.background_color_enum.BackgroundColorEnum"><code class="xref py py-class docutils literal notranslate"><span class="pre">cpl.console.background_color_enum.BackgroundColorEnum</span></code></a>, <code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code>]</dt><dd><p>Foreground color of the console</p>
</dd>
</dl>
</div></blockquote>
</dd></dl> </dd></dl>
<dl class="py method"> <dl class="py method">
@ -372,63 +417,102 @@
<dl class="py method"> <dl class="py method">
<dt id="cpl.console.console.Console.spinner"> <dt id="cpl.console.console.Console.spinner">
<em class="property"><span class="pre">classmethod</span> </em><code class="sig-name descname"><span class="pre">spinner</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">message</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">str</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">call</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">collections.abc.Callable</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">text_foreground_color</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">Union</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">,</span> </span><a class="reference internal" href="#cpl.console.foreground_color_enum.ForegroundColorEnum" title="cpl.console.foreground_color_enum.ForegroundColorEnum"><span class="pre">cpl.console.foreground_color_enum.ForegroundColorEnum</span></a><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">]</span></span></span> <span class="o"><span class="pre">=</span></span> <span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">spinner_foreground_color</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">Union</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">,</span> </span><a class="reference internal" href="#cpl.console.foreground_color_enum.ForegroundColorEnum" title="cpl.console.foreground_color_enum.ForegroundColorEnum"><span class="pre">cpl.console.foreground_color_enum.ForegroundColorEnum</span></a><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">]</span></span></span> <span class="o"><span class="pre">=</span></span> <span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">text_background_color</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">Union</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">,</span> </span><a class="reference internal" href="#cpl.console.background_color_enum.BackgroundColorEnum" title="cpl.console.background_color_enum.BackgroundColorEnum"><span class="pre">cpl.console.background_color_enum.BackgroundColorEnum</span></a><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">]</span></span></span> <span class="o"><span class="pre">=</span></span> <span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">spinner_background_color</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">Union</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">,</span> </span><a class="reference internal" href="#cpl.console.background_color_enum.BackgroundColorEnum" title="cpl.console.background_color_enum.BackgroundColorEnum"><span class="pre">cpl.console.background_color_enum.BackgroundColorEnum</span></a><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">]</span></span></span> <span class="o"><span class="pre">=</span></span> <span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span> &#x2192; <span class="pre">any</span><a class="headerlink" href="#cpl.console.console.Console.spinner" title="Permalink to this definition"></a></dt> <em class="property"><span class="pre">classmethod</span> </em><code class="sig-name descname"><span class="pre">spinner</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">message</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">str</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">call</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">collections.abc.Callable</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">text_foreground_color</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">Union</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">,</span> </span><a class="reference internal" href="#cpl.console.foreground_color_enum.ForegroundColorEnum" title="cpl.console.foreground_color_enum.ForegroundColorEnum"><span class="pre">cpl.console.foreground_color_enum.ForegroundColorEnum</span></a><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">]</span></span></span> <span class="o"><span class="pre">=</span></span> <span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">spinner_foreground_color</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">Union</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">,</span> </span><a class="reference internal" href="#cpl.console.foreground_color_enum.ForegroundColorEnum" title="cpl.console.foreground_color_enum.ForegroundColorEnum"><span class="pre">cpl.console.foreground_color_enum.ForegroundColorEnum</span></a><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">]</span></span></span> <span class="o"><span class="pre">=</span></span> <span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">text_background_color</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">Union</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">,</span> </span><a class="reference internal" href="#cpl.console.background_color_enum.BackgroundColorEnum" title="cpl.console.background_color_enum.BackgroundColorEnum"><span class="pre">cpl.console.background_color_enum.BackgroundColorEnum</span></a><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">]</span></span></span> <span class="o"><span class="pre">=</span></span> <span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">spinner_background_color</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">Union</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">,</span> </span><a class="reference internal" href="#cpl.console.background_color_enum.BackgroundColorEnum" title="cpl.console.background_color_enum.BackgroundColorEnum"><span class="pre">cpl.console.background_color_enum.BackgroundColorEnum</span></a><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">]</span></span></span> <span class="o"><span class="pre">=</span></span> <span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span> &#x2192; <span class="pre">any</span><a class="headerlink" href="#cpl.console.console.Console.spinner" title="Permalink to this definition"></a></dt>
<dd><p>Shows spinner and calls given function <dd><p>Shows spinner and calls given function, when function has ended the spinner stops</p>
When function has ended the spinner stops <blockquote>
:param message: <div><dl class="simple">
:param call: <dt>message: <code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></dt><dd><p>Message of the spinner</p>
:param args: </dd>
:param text_foreground_color: <dt>call: <code class="xref py py-class docutils literal notranslate"><span class="pre">Callable</span></code></dt><dd><p>Function to call</p>
:param spinner_foreground_color: </dd>
:param text_background_color: <dt>args: <code class="xref py py-class docutils literal notranslate"><span class="pre">list</span></code></dt><dd><p>Arguments of the function</p>
:param spinner_background_color: </dd>
:param kwargs: <dt>text_foreground_color: Union[<code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code>, <a class="reference internal" href="#cpl.console.foreground_color_enum.ForegroundColorEnum" title="cpl.console.foreground_color_enum.ForegroundColorEnum"><code class="xref py py-class docutils literal notranslate"><span class="pre">cpl.console.foreground_color_enum.ForegroundColorEnum</span></code></a>]</dt><dd><p>Foreground color of the text</p>
:return: Return value of call</p> </dd>
<dt>spinner_foreground_color: Union[<code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code>, <a class="reference internal" href="#cpl.console.foreground_color_enum.ForegroundColorEnum" title="cpl.console.foreground_color_enum.ForegroundColorEnum"><code class="xref py py-class docutils literal notranslate"><span class="pre">cpl.console.foreground_color_enum.ForegroundColorEnum</span></code></a>]</dt><dd><p>Foreground color of the spinner</p>
</dd>
<dt>text_background_color: Union[<code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code>, <a class="reference internal" href="#cpl.console.background_color_enum.BackgroundColorEnum" title="cpl.console.background_color_enum.BackgroundColorEnum"><code class="xref py py-class docutils literal notranslate"><span class="pre">cpl.console.background_color_enum.BackgroundColorEnum</span></code></a>]</dt><dd><p>Background color of the text</p>
</dd>
<dt>spinner_background_color: Union[<code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code>, <a class="reference internal" href="#cpl.console.background_color_enum.BackgroundColorEnum" title="cpl.console.background_color_enum.BackgroundColorEnum"><code class="xref py py-class docutils literal notranslate"><span class="pre">cpl.console.background_color_enum.BackgroundColorEnum</span></code></a>]</dt><dd><p>Background color of the spinner</p>
</dd>
<dt>kwargs: <code class="xref py py-class docutils literal notranslate"><span class="pre">dict</span></code></dt><dd><p>Keyword arguments of the call</p>
</dd>
</dl>
</div></blockquote>
<blockquote>
<div><p>Return value of call</p>
</div></blockquote>
</dd></dl> </dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="cpl.console.console.Console.table"> <dt id="cpl.console.console.Console.table">
<em class="property"><span class="pre">classmethod</span> </em><code class="sig-name descname"><span class="pre">table</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">header</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">list</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">values</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">list</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#cpl.console.console.Console.table" title="Permalink to this definition"></a></dt> <em class="property"><span class="pre">classmethod</span> </em><code class="sig-name descname"><span class="pre">table</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">header</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">list</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">values</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">list</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#cpl.console.console.Console.table" title="Permalink to this definition"></a></dt>
<dd><p>Prints a table with header and values <dd><p>Prints a table with header and values</p>
:param header: <blockquote>
:param values: <div><dl class="simple">
:return:</p> <dt>header: List[<code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code>]</dt><dd><p>Header of the table</p>
</dd>
<dt>values: List[List[<code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code>]]</dt><dd><p>Values of the table</p>
</dd>
</dl>
</div></blockquote>
</dd></dl> </dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="cpl.console.console.Console.write"> <dt id="cpl.console.console.Console.write">
<em class="property"><span class="pre">classmethod</span> </em><code class="sig-name descname"><span class="pre">write</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">end</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">''</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#cpl.console.console.Console.write" title="Permalink to this definition"></a></dt> <em class="property"><span class="pre">classmethod</span> </em><code class="sig-name descname"><span class="pre">write</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">end</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">''</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#cpl.console.console.Console.write" title="Permalink to this definition"></a></dt>
<dd><p>Prints in active line <dd><p>Prints in active line</p>
:param args: <blockquote>
:param end: <div><dl class="simple">
:return:</p> <dt>args: <code class="xref py py-class docutils literal notranslate"><span class="pre">list</span></code></dt><dd><p>Elements to print</p>
</dd>
<dt>end: <code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></dt><dd><p>Last character to print</p>
</dd>
</dl>
</div></blockquote>
</dd></dl> </dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="cpl.console.console.Console.write_at"> <dt id="cpl.console.console.Console.write_at">
<em class="property"><span class="pre">classmethod</span> </em><code class="sig-name descname"><span class="pre">write_at</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">x</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">int</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">y</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">int</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#cpl.console.console.Console.write_at" title="Permalink to this definition"></a></dt> <em class="property"><span class="pre">classmethod</span> </em><code class="sig-name descname"><span class="pre">write_at</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">x</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">int</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">y</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">int</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#cpl.console.console.Console.write_at" title="Permalink to this definition"></a></dt>
<dd><p>Prints at given position <dd><p>Prints at given position</p>
:param x: <blockquote>
:param y: <div><dl class="simple">
:param args: <dt>x: <code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code></dt><dd><p>X coordinate</p>
:return:</p> </dd>
<dt>y: <code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code></dt><dd><p>Y coordinate</p>
</dd>
<dt>args: <code class="xref py py-class docutils literal notranslate"><span class="pre">list</span></code></dt><dd><p>Elements to print</p>
</dd>
</dl>
</div></blockquote>
</dd></dl> </dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="cpl.console.console.Console.write_line"> <dt id="cpl.console.console.Console.write_line">
<em class="property"><span class="pre">classmethod</span> </em><code class="sig-name descname"><span class="pre">write_line</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#cpl.console.console.Console.write_line" title="Permalink to this definition"></a></dt> <em class="property"><span class="pre">classmethod</span> </em><code class="sig-name descname"><span class="pre">write_line</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#cpl.console.console.Console.write_line" title="Permalink to this definition"></a></dt>
<dd><p>Prints to new line <dd><p>Prints to new line</p>
:param args: <blockquote>
:return:</p> <div><dl class="simple">
<dt>args: <code class="xref py py-class docutils literal notranslate"><span class="pre">list</span></code></dt><dd><p>Elements to print</p>
</dd>
</dl>
</div></blockquote>
</dd></dl> </dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="cpl.console.console.Console.write_line_at"> <dt id="cpl.console.console.Console.write_line_at">
<em class="property"><span class="pre">classmethod</span> </em><code class="sig-name descname"><span class="pre">write_line_at</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">x</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">int</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">y</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">int</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#cpl.console.console.Console.write_line_at" title="Permalink to this definition"></a></dt> <em class="property"><span class="pre">classmethod</span> </em><code class="sig-name descname"><span class="pre">write_line_at</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">x</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">int</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">y</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">int</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#cpl.console.console.Console.write_line_at" title="Permalink to this definition"></a></dt>
<dd><p>Prints new line at given position <dd><p>Prints new line at given position</p>
:param x: <blockquote>
:param y: <div><dl class="simple">
:param args: <dt>x: <code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code></dt><dd><p>X coordinate</p>
:return:</p> </dd>
<dt>y: <code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code></dt><dd><p>Y coordinate</p>
</dd>
<dt>args: <code class="xref py py-class docutils literal notranslate"><span class="pre">list</span></code></dt><dd><p>Elements to print</p>
</dd>
</dl>
</div></blockquote>
</dd></dl> </dd></dl>
</dd></dl> </dd></dl>
@ -440,6 +524,15 @@ When function has ended the spinner stops
<dt id="cpl.console.console_call.ConsoleCall"> <dt id="cpl.console.console_call.ConsoleCall">
<em class="property"><span class="pre">class</span> </em><code class="sig-prename descclassname"><span class="pre">cpl.console.console_call.</span></code><code class="sig-name descname"><span class="pre">ConsoleCall</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">function</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">collections.abc.Callable</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#cpl.console.console_call.ConsoleCall" title="Permalink to this definition"></a></dt> <em class="property"><span class="pre">class</span> </em><code class="sig-prename descclassname"><span class="pre">cpl.console.console_call.</span></code><code class="sig-name descname"><span class="pre">ConsoleCall</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">function</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">collections.abc.Callable</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#cpl.console.console_call.ConsoleCall" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p> <dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<p>Represents a console call, for hold back when spinner is active</p>
<blockquote>
<div><dl class="simple">
<dt>function: <code class="xref py py-class docutils literal notranslate"><span class="pre">Callable</span></code></dt><dd><p>Function to call</p>
</dd>
<dt>args: <code class="xref py py-class docutils literal notranslate"><span class="pre">list</span></code></dt><dd><p>List of arguments</p>
</dd>
</dl>
</div></blockquote>
<dl class="py method"> <dl class="py method">
<dt id="cpl.console.console_call.ConsoleCall.args"> <dt id="cpl.console.console_call.ConsoleCall.args">
<em class="property"><span class="pre">property</span> </em><code class="sig-name descname"><span class="pre">args</span></code><a class="headerlink" href="#cpl.console.console_call.ConsoleCall.args" title="Permalink to this definition"></a></dt> <em class="property"><span class="pre">property</span> </em><code class="sig-name descname"><span class="pre">args</span></code><a class="headerlink" href="#cpl.console.console_call.ConsoleCall.args" title="Permalink to this definition"></a></dt>
@ -514,25 +607,33 @@ When function has ended the spinner stops
<dt id="cpl.console.spinner_thread.SpinnerThread"> <dt id="cpl.console.spinner_thread.SpinnerThread">
<em class="property"><span class="pre">class</span> </em><code class="sig-prename descclassname"><span class="pre">cpl.console.spinner_thread.</span></code><code class="sig-name descname"><span class="pre">SpinnerThread</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">msg_len</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">int</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">foreground_color</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><a class="reference internal" href="#cpl.console.foreground_color_enum.ForegroundColorEnum" title="cpl.console.foreground_color_enum.ForegroundColorEnum"><span class="pre">cpl.console.foreground_color_enum.ForegroundColorEnum</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">background_color</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><a class="reference internal" href="#cpl.console.background_color_enum.BackgroundColorEnum" title="cpl.console.background_color_enum.BackgroundColorEnum"><span class="pre">cpl.console.background_color_enum.BackgroundColorEnum</span></a></span></em><span class="sig-paren">)</span><a class="headerlink" href="#cpl.console.spinner_thread.SpinnerThread" title="Permalink to this definition"></a></dt> <em class="property"><span class="pre">class</span> </em><code class="sig-prename descclassname"><span class="pre">cpl.console.spinner_thread.</span></code><code class="sig-name descname"><span class="pre">SpinnerThread</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">msg_len</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">int</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">foreground_color</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><a class="reference internal" href="#cpl.console.foreground_color_enum.ForegroundColorEnum" title="cpl.console.foreground_color_enum.ForegroundColorEnum"><span class="pre">cpl.console.foreground_color_enum.ForegroundColorEnum</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">background_color</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><a class="reference internal" href="#cpl.console.background_color_enum.BackgroundColorEnum" title="cpl.console.background_color_enum.BackgroundColorEnum"><span class="pre">cpl.console.background_color_enum.BackgroundColorEnum</span></a></span></em><span class="sig-paren">)</span><a class="headerlink" href="#cpl.console.spinner_thread.SpinnerThread" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">threading.Thread</span></code></p> <dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">threading.Thread</span></code></p>
<p>Thread to show spinner in terminal</p>
<blockquote>
<div><dl class="simple">
<dt>msg_len: <code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code></dt><dd><p>Length of the message</p>
</dd>
<dt>foreground_color: <code class="xref py py-class docutils literal notranslate"><span class="pre">cpl.console.foreground_color.ForegroundColorEnum</span></code></dt><dd><p>Foreground color of the spinner</p>
</dd>
<dt>background_color: <code class="xref py py-class docutils literal notranslate"><span class="pre">cpl.console.background_color.BackgroundColorEnum</span></code></dt><dd><p>Background color of the spinner</p>
</dd>
</dl>
</div></blockquote>
<dl class="py method"> <dl class="py method">
<dt id="cpl.console.spinner_thread.SpinnerThread.exit"> <dt id="cpl.console.spinner_thread.SpinnerThread.exit">
<code class="sig-name descname"><span class="pre">exit</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#cpl.console.spinner_thread.SpinnerThread.exit" title="Permalink to this definition"></a></dt> <code class="sig-name descname"><span class="pre">exit</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#cpl.console.spinner_thread.SpinnerThread.exit" title="Permalink to this definition"></a></dt>
<dd><p>Stops the spinner <dd><p>Stops the spinner</p>
:return:</p>
</dd></dl> </dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="cpl.console.spinner_thread.SpinnerThread.run"> <dt id="cpl.console.spinner_thread.SpinnerThread.run">
<code class="sig-name descname"><span class="pre">run</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; <span class="pre">None</span><a class="headerlink" href="#cpl.console.spinner_thread.SpinnerThread.run" title="Permalink to this definition"></a></dt> <code class="sig-name descname"><span class="pre">run</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; <span class="pre">None</span><a class="headerlink" href="#cpl.console.spinner_thread.SpinnerThread.run" title="Permalink to this definition"></a></dt>
<dd><p>Entry point of thread, shows the spinner <dd><p>Entry point of thread, shows the spinner</p>
:return:</p>
</dd></dl> </dd></dl>
<dl class="py method"> <dl class="py method">
<dt id="cpl.console.spinner_thread.SpinnerThread.stop_spinning"> <dt id="cpl.console.spinner_thread.SpinnerThread.stop_spinning">
<code class="sig-name descname"><span class="pre">stop_spinning</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#cpl.console.spinner_thread.SpinnerThread.stop_spinning" title="Permalink to this definition"></a></dt> <code class="sig-name descname"><span class="pre">stop_spinning</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#cpl.console.spinner_thread.SpinnerThread.stop_spinning" title="Permalink to this definition"></a></dt>
<dd><p>Stops the spinner <dd><p>Stops the spinner</p>
:return:</p>
</dd></dl> </dd></dl>
</dd></dl> </dd></dl>

View File

@ -236,9 +236,10 @@
<dl class="py method"> <dl class="py method">
<dt id="cpl.database.database_settings.DatabaseSettings.from_dict"> <dt id="cpl.database.database_settings.DatabaseSettings.from_dict">
<code class="sig-name descname"><span class="pre">from_dict</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">settings</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">dict</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#cpl.database.database_settings.DatabaseSettings.from_dict" title="Permalink to this definition"></a></dt> <code class="sig-name descname"><span class="pre">from_dict</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">settings</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">dict</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#cpl.database.database_settings.DatabaseSettings.from_dict" title="Permalink to this definition"></a></dt>
<dd><p>Converts attributes to dict <dd><p>Converts attributes to dict</p>
:param settings: <blockquote>
:return:</p> <div><p>settings: <code class="xref py py-class docutils literal notranslate"><span class="pre">dict</span></code></p>
</div></blockquote>
</dd></dl> </dd></dl>
</dd></dl> </dd></dl>

View File

@ -393,9 +393,10 @@
<dl class="py method"> <dl class="py method">
<dt id="cpl.logging.logging_settings.LoggingSettings.from_dict"> <dt id="cpl.logging.logging_settings.LoggingSettings.from_dict">
<code class="sig-name descname"><span class="pre">from_dict</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">settings</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">dict</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#cpl.logging.logging_settings.LoggingSettings.from_dict" title="Permalink to this definition"></a></dt> <code class="sig-name descname"><span class="pre">from_dict</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">settings</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">dict</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#cpl.logging.logging_settings.LoggingSettings.from_dict" title="Permalink to this definition"></a></dt>
<dd><p>Converts attributes to dict <dd><p>Converts attributes to dict</p>
:param settings: <blockquote>
:return:</p> <div><p>settings: <code class="xref py py-class docutils literal notranslate"><span class="pre">dict</span></code></p>
</div></blockquote>
</dd></dl> </dd></dl>
<dl class="py method"> <dl class="py method">

View File

@ -328,9 +328,10 @@
<dl class="py method"> <dl class="py method">
<dt id="cpl.mailing.email_client_settings.EMailClientSettings.from_dict"> <dt id="cpl.mailing.email_client_settings.EMailClientSettings.from_dict">
<code class="sig-name descname"><span class="pre">from_dict</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">settings</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">dict</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#cpl.mailing.email_client_settings.EMailClientSettings.from_dict" title="Permalink to this definition"></a></dt> <code class="sig-name descname"><span class="pre">from_dict</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">settings</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">dict</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#cpl.mailing.email_client_settings.EMailClientSettings.from_dict" title="Permalink to this definition"></a></dt>
<dd><p>Converts attributes to dict <dd><p>Converts attributes to dict</p>
:param settings: <blockquote>
:return:</p> <div><p>settings: <code class="xref py py-class docutils literal notranslate"><span class="pre">dict</span></code></p>
</div></blockquote>
</dd></dl> </dd></dl>
<dl class="py method"> <dl class="py method">

View File

@ -197,9 +197,10 @@
<dl class="py method"> <dl class="py method">
<dt id="cpl.time.time_format_settings.TimeFormatSettings.from_dict"> <dt id="cpl.time.time_format_settings.TimeFormatSettings.from_dict">
<code class="sig-name descname"><span class="pre">from_dict</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">settings</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">dict</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#cpl.time.time_format_settings.TimeFormatSettings.from_dict" title="Permalink to this definition"></a></dt> <code class="sig-name descname"><span class="pre">from_dict</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">settings</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">dict</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#cpl.time.time_format_settings.TimeFormatSettings.from_dict" title="Permalink to this definition"></a></dt>
<dd><p>Converts attributes to dict <dd><p>Converts attributes to dict</p>
:param settings: <blockquote>
:return:</p> <div><p>settings: <code class="xref py py-class docutils literal notranslate"><span class="pre">dict</span></code></p>
</div></blockquote>
</dd></dl> </dd></dl>
<dl class="py method"> <dl class="py method">

File diff suppressed because one or more lines are too long

View File

@ -54,7 +54,9 @@ class Configuration(ConfigurationABC):
Parameter Parameter
--------- ---------
name: :class:`str` name: :class:`str`
Info name
message: :class:`str` message: :class:`str`
Info message
""" """
Console.set_foreground_color(ForegroundColorEnum.green) Console.set_foreground_color(ForegroundColorEnum.green)
Console.write_line(f'[{name}] {message}') Console.write_line(f'[{name}] {message}')
@ -67,7 +69,9 @@ class Configuration(ConfigurationABC):
Parameter Parameter
--------- ---------
name: :class:`str` name: :class:`str`
Warning name
message: :class:`str` message: :class:`str`
Warning message
""" """
Console.set_foreground_color(ForegroundColorEnum.yellow) Console.set_foreground_color(ForegroundColorEnum.yellow)
Console.write_line(f'[{name}] {message}') Console.write_line(f'[{name}] {message}')
@ -80,7 +84,9 @@ class Configuration(ConfigurationABC):
Parameter Parameter
--------- ---------
name: :class:`str` name: :class:`str`
Error name
message: :class:`str` message: :class:`str`
Error message
""" """
Console.set_foreground_color(ForegroundColorEnum.red) Console.set_foreground_color(ForegroundColorEnum.red)
Console.write_line(f'[{name}] {message}') Console.write_line(f'[{name}] {message}')
@ -92,7 +98,9 @@ class Configuration(ConfigurationABC):
Parameter Parameter
--------- ---------
name: :class:`str` name: :class:`str`
Name of the variable
value: :class:`any` value: :class:`any`
Value of the variable
""" """
if name == ConfigurationVariableNameEnum.environment.value: if name == ConfigurationVariableNameEnum.environment.value:
self._application_environment.environment_name = EnvironmentNameEnum(value) self._application_environment.environment_name = EnvironmentNameEnum(value)
@ -113,8 +121,11 @@ class Configuration(ConfigurationABC):
Parameter Parameter
--------- ---------
argument: :class:`str` argument: :class:`str`
Command as string
argument_type: :class:`cpl.configuration.console_argument.ConsoleArgument` argument_type: :class:`cpl.configuration.console_argument.ConsoleArgument`
Command type as ConsoleArgument
next_arguments: list[:class:`str`] next_arguments: list[:class:`str`]
Following arguments of argument
Returns Returns
------- -------

View File

@ -37,6 +37,7 @@ class ConfigurationABC(ABC):
Parameter Parameter
--------- ---------
prefix: :class:`str` prefix: :class:`str`
Prefix of the variables
""" """
pass pass
@ -47,6 +48,7 @@ class ConfigurationABC(ABC):
Parameter Parameter
--------- ---------
argument: :class:`cpl.configuration.console_argument.ConsoleArgument` argument: :class:`cpl.configuration.console_argument.ConsoleArgument`
Specifies the console argument
""" """
pass pass
@ -85,7 +87,9 @@ class ConfigurationABC(ABC):
Parameter Parameter
--------- ---------
key_type: Union[:class:`str`, :class:`type`] key_type: Union[:class:`str`, :class:`type`]
Type of the value
value: :class:`cpl.configuration.configuration_model_abc.ConfigurationModelABC` value: :class:`cpl.configuration.configuration_model_abc.ConfigurationModelABC`
Object of the value
""" """
pass pass
@ -96,6 +100,7 @@ class ConfigurationABC(ABC):
Parameter Parameter
--------- ---------
search_type: Union[:class:`str`, Type[:class:`cpl.configuration.configuration_model_abc.ConfigurationModelABC`]] search_type: Union[:class:`str`, Type[:class:`cpl.configuration.configuration_model_abc.ConfigurationModelABC`]]
Type to search for
Returns Returns
------- -------

View File

@ -18,9 +18,7 @@ from cpl.console.spinner_thread import SpinnerThread
class Console: class Console:
""" r"""Useful functions for handling with input and output"""
Useful functions for handling with input and output
"""
colorama.init() colorama.init()
_is_first_write = True _is_first_write = True
@ -42,9 +40,7 @@ class Console:
_selected_menu_cursor_foreground_color: ForegroundColorEnum = ForegroundColorEnum.default _selected_menu_cursor_foreground_color: ForegroundColorEnum = ForegroundColorEnum.default
_selected_menu_cursor_background_color: BackgroundColorEnum = BackgroundColorEnum.default _selected_menu_cursor_background_color: BackgroundColorEnum = BackgroundColorEnum.default
""" """Properties"""
Properties
"""
@classmethod @classmethod
@property @property
@ -56,9 +52,7 @@ class Console:
def foreground_color(cls) -> str: def foreground_color(cls) -> str:
return str(cls._foreground_color.value) return str(cls._foreground_color.value)
""" """Settings"""
Settings
"""
@classmethod @classmethod
def set_hold_back(cls, value: bool): def set_hold_back(cls, value: bool):
@ -66,10 +60,12 @@ class Console:
@classmethod @classmethod
def set_background_color(cls, color: Union[BackgroundColorEnum, str]): def set_background_color(cls, color: Union[BackgroundColorEnum, str]):
""" r"""Sets the background color
Sets the background color
:param color: Parameter
:return: ---------
color: Union[:class:`cpl.console.background_color_enum.BackgroundColorEnum`, :class:`str`]
Background color of the console
""" """
if type(color) is str: if type(color) is str:
cls._background_color = BackgroundColorEnum[color] cls._background_color = BackgroundColorEnum[color]
@ -78,10 +74,12 @@ class Console:
@classmethod @classmethod
def set_foreground_color(cls, color: Union[ForegroundColorEnum, str]): def set_foreground_color(cls, color: Union[ForegroundColorEnum, str]):
""" r"""Sets the foreground color
Sets the foreground color
:param color: Parameter
:return: ---------
color: Union[:class:`cpl.console.background_color_enum.BackgroundColorEnum`, :class:`str`]
Foreground color of the console
""" """
if type(color) is str: if type(color) is str:
cls._foreground_color = ForegroundColorEnum[color] cls._foreground_color = ForegroundColorEnum[color]
@ -90,37 +88,40 @@ class Console:
@classmethod @classmethod
def reset_cursor_position(cls): def reset_cursor_position(cls):
""" r"""Resets cursor position"""
Resets cursor position
:return:
"""
cls._x = None cls._x = None
cls._y = None cls._y = None
@classmethod @classmethod
def set_cursor_position(cls, x: int, y: int): def set_cursor_position(cls, x: int, y: int):
""" r"""Sets cursor position
Sets cursor position
:param x: Parameter
:param y: ---------
:return: x: :class:`int`
X coordinate
y: :class:`int`
Y coordinate
""" """
cls._x = x cls._x = x
cls._y = y cls._y = y
""" """Useful protected functions"""
Useful protected methods
"""
@classmethod @classmethod
def _output(cls, string: str, x: int = None, y: int = None, end: str = None): def _output(cls, string: str, x: int = None, y: int = None, end: str = None):
""" r"""Prints given output with given format
Prints given output with given format
:param string: Parameter
:param x: ---------
:param y: string: :class:`str`
:param end: Message to print
:return: x: :class:`int`
X coordinate
y: :class:`int`
Y coordinate
end: :class:`str`
End character of the message (could be \n)
""" """
if cls._is_first_write: if cls._is_first_write:
cls._is_first_write = False cls._is_first_write = False
@ -149,10 +150,7 @@ class Console:
@classmethod @classmethod
def _show_select_menu(cls): def _show_select_menu(cls):
""" r"""Shows the select menu"""
Shows the select menu
:return:
"""
if not cls._is_first_select_menu_output: if not cls._is_first_select_menu_output:
for _ in range(0, len(cls._select_menu_items) + 1): for _ in range(0, len(cls._select_menu_items) + 1):
sys.stdout.write('\x1b[1A\x1b[2K') sys.stdout.write('\x1b[1A\x1b[2K')
@ -176,10 +174,12 @@ class Console:
@classmethod @classmethod
def _select_menu_key_press(cls, key: Key): def _select_menu_key_press(cls, key: Key):
""" r"""Event function when key press is detected
Event function when key press is detected
:param key: Parameter
:return: ---------
key: :class:`pynput.keyboard.Key`
Pressed key
""" """
if key == Key.down: if key == Key.down:
if cls._selected_menu_item_index == len(cls._select_menu_items) - 1: if cls._selected_menu_item_index == len(cls._select_menu_items) - 1:
@ -196,16 +196,16 @@ class Console:
elif key == Key.enter: elif key == Key.enter:
return False return False
""" """ Useful public functions"""
Useful public methods
"""
@classmethod @classmethod
def banner(cls, string: str): def banner(cls, string: str):
""" r"""Prints the string as a banner
Prints the string as a banner
:param string: Parameter
:return: ---------
string: :class:`str`
Message to print as banner
""" """
if cls._disabled: if cls._disabled:
return return
@ -219,19 +219,13 @@ class Console:
@classmethod @classmethod
def color_reset(cls): def color_reset(cls):
""" r"""Resets the color settings"""
Resets color
:return:
"""
cls._background_color = BackgroundColorEnum.default cls._background_color = BackgroundColorEnum.default
cls._foreground_color = ForegroundColorEnum.default cls._foreground_color = ForegroundColorEnum.default
@classmethod @classmethod
def clear(cls): def clear(cls):
""" r"""Clears the console"""
Clears the console
:return:
"""
if cls._hold_back: if cls._hold_back:
cls._hold_back_calls.append(ConsoleCall(cls.clear)) cls._hold_back_calls.append(ConsoleCall(cls.clear))
return return
@ -240,10 +234,7 @@ class Console:
@classmethod @classmethod
def close(cls): def close(cls):
""" r"""Closes the application"""
Close the application
:return:
"""
if cls._disabled: if cls._disabled:
return return
@ -258,19 +249,19 @@ class Console:
@classmethod @classmethod
def disable(cls): def disable(cls):
""" r"""Disables console interaction"""
Disable console interaction
:return:
"""
cls._disabled = True cls._disabled = True
@classmethod @classmethod
def error(cls, string: str, tb: str = None): def error(cls, string: str, tb: str = None):
""" r"""Prints an error with traceback
Prints an error with traceback
:param string: Parameter
:param tb: ---------
:return: string: :class:`str`
Error message
tb: :class:`str`
Error traceback
""" """
if cls._disabled: if cls._disabled:
return return
@ -288,18 +279,21 @@ class Console:
@classmethod @classmethod
def enable(cls): def enable(cls):
""" r"""Enables console interaction"""
Enable console interaction
:return:
"""
cls._disabled = False cls._disabled = False
@classmethod @classmethod
def read(cls, output: str = None) -> str: def read(cls, output: str = None) -> str:
""" r"""Reads in line
Read in line
:param output: Parameter
:return: ---------
output: :class:`str`
String to print before input
Returns
-------
input()
""" """
if output is not None and not cls._hold_back: if output is not None and not cls._hold_back:
cls.write_line(output) cls.write_line(output)
@ -308,10 +302,16 @@ class Console:
@classmethod @classmethod
def read_line(cls, output: str = None) -> str: def read_line(cls, output: str = None) -> str:
""" r"""Reads in next line
Reads in next line
:param output: Parameter
:return: ---------
output: :class:`str`
String to print before input
Returns
-------
input()
""" """
if cls._disabled and not cls._hold_back: if cls._disabled and not cls._hold_back:
return '' return ''
@ -325,11 +325,14 @@ class Console:
@classmethod @classmethod
def table(cls, header: list[str], values: list[list[str]]): def table(cls, header: list[str], values: list[list[str]]):
""" r"""Prints a table with header and values
Prints a table with header and values
:param header: Parameter
:param values: ---------
:return: header: List[:class:`str`]
Header of the table
values: List[List[:class:`str`]]
Values of the table
""" """
if cls._disabled: if cls._disabled:
return return
@ -352,18 +355,32 @@ class Console:
cursor_foreground_color: Union[str, ForegroundColorEnum] = ForegroundColorEnum.default, cursor_foreground_color: Union[str, ForegroundColorEnum] = ForegroundColorEnum.default,
cursor_background_color: Union[str, BackgroundColorEnum] = BackgroundColorEnum.default cursor_background_color: Union[str, BackgroundColorEnum] = BackgroundColorEnum.default
) -> str: ) -> str:
""" r"""Prints select menu
Prints select menu
:param char: Parameter
:param message: ---------
:param options: char: :class:`str`
:param header_foreground_color: Character to show which element is selected
:param header_background_color: message: :class:`str`
:param option_foreground_color: Message or header of the selection
:param option_background_color: options: List[:class:`str`]
:param cursor_foreground_color: Selectable options
:param cursor_background_color: header_foreground_color: Union[:class:`str`, :class:`cpl.console.foreground_color_enum.ForegroundColorEnum`]
:return: Selected option as str Foreground color of the header
header_background_color: Union[:class:`str`, :class:`cpl.console.background_color_enum.BackgroundColorEnum`]
Background color of the header
option_foreground_color: Union[:class:`str`, :class:`cpl.console.foreground_color_enum.ForegroundColorEnum`]
Foreground color of the options
option_background_color: Union[:class:`str`, :class:`cpl.console.background_color_enum.BackgroundColorEnum`]
Background color of the options
cursor_foreground_color: Union[:class:`str`, :class:`cpl.console.foreground_color_enum.ForegroundColorEnum`]
Foreground color of the cursor
cursor_background_color: Union[:class:`str`, :class:`cpl.console.background_color_enum.BackgroundColorEnum`]
Background color of the cursor
Returns
-------
Selected option as :class:`str`
""" """
cls._selected_menu_item_char = char cls._selected_menu_item_char = char
cls.options = options cls.options = options
@ -396,18 +413,30 @@ class Console:
spinner_foreground_color: Union[str, ForegroundColorEnum] = None, spinner_foreground_color: Union[str, ForegroundColorEnum] = None,
text_background_color: Union[str, BackgroundColorEnum] = None, text_background_color: Union[str, BackgroundColorEnum] = None,
spinner_background_color: Union[str, BackgroundColorEnum] = None, **kwargs) -> any: spinner_background_color: Union[str, BackgroundColorEnum] = None, **kwargs) -> any:
""" r"""Shows spinner and calls given function, when function has ended the spinner stops
Shows spinner and calls given function
When function has ended the spinner stops Parameter
:param message: ---------
:param call: message: :class:`str`
:param args: Message of the spinner
:param text_foreground_color: call: :class:`Callable`
:param spinner_foreground_color: Function to call
:param text_background_color: args: :class:`list`
:param spinner_background_color: Arguments of the function
:param kwargs: text_foreground_color: Union[:class:`str`, :class:`cpl.console.foreground_color_enum.ForegroundColorEnum`]
:return: Return value of call Foreground color of the text
spinner_foreground_color: Union[:class:`str`, :class:`cpl.console.foreground_color_enum.ForegroundColorEnum`]
Foreground color of the spinner
text_background_color: Union[:class:`str`, :class:`cpl.console.background_color_enum.BackgroundColorEnum`]
Background color of the text
spinner_background_color: Union[:class:`str`, :class:`cpl.console.background_color_enum.BackgroundColorEnum`]
Background color of the spinner
kwargs: :class:`dict`
Keyword arguments of the call
Returns
-------
Return value of call
""" """
if cls._hold_back: if cls._hold_back:
cls._hold_back_calls.append(ConsoleCall(cls.spinner, message, call, *args)) cls._hold_back_calls.append(ConsoleCall(cls.spinner, message, call, *args))
@ -454,11 +483,14 @@ class Console:
@classmethod @classmethod
def write(cls, *args, end=''): def write(cls, *args, end=''):
""" r"""Prints in active line
Prints in active line
:param args: Parameter
:param end: ---------
:return: args: :class:`list`
Elements to print
end: :class:`str`
Last character to print
""" """
if cls._disabled: if cls._disabled:
return return
@ -472,12 +504,16 @@ class Console:
@classmethod @classmethod
def write_at(cls, x: int, y: int, *args): def write_at(cls, x: int, y: int, *args):
""" r"""Prints at given position
Prints at given position
:param x: Parameter
:param y: ---------
:param args: x: :class:`int`
:return: X coordinate
y: :class:`int`
Y coordinate
args: :class:`list`
Elements to print
""" """
if cls._disabled: if cls._disabled:
return return
@ -491,10 +527,12 @@ class Console:
@classmethod @classmethod
def write_line(cls, *args): def write_line(cls, *args):
""" r"""Prints to new line
Prints to new line
:param args: Parameter
:return: ---------
args: :class:`list`
Elements to print
""" """
if cls._disabled: if cls._disabled:
return return
@ -510,12 +548,16 @@ class Console:
@classmethod @classmethod
def write_line_at(cls, x: int, y: int, *args): def write_line_at(cls, x: int, y: int, *args):
""" r"""Prints new line at given position
Prints new line at given position
:param x: Parameter
:param y: ---------
:param args: x: :class:`int`
:return: X coordinate
y: :class:`int`
Y coordinate
args: :class:`list`
Elements to print
""" """
if cls._disabled: if cls._disabled:
return return

View File

@ -2,13 +2,17 @@ from collections import Callable
class ConsoleCall: class ConsoleCall:
r"""Represents a console call, for hold back when spinner is active
Parameter
---------
function: :class:`Callable`
Function to call
args: :class:`list`
List of arguments
"""
def __init__(self, function: Callable, *args): def __init__(self, function: Callable, *args):
"""
Represents a console call, for hold back when spinner is active
:param function:
:param args:
"""
self._func = function self._func = function
self._args = args self._args = args

View File

@ -10,14 +10,19 @@ from cpl.console.foreground_color_enum import ForegroundColorEnum
class SpinnerThread(threading.Thread): class SpinnerThread(threading.Thread):
r"""Thread to show spinner in terminal
Parameter
---------
msg_len: :class:`int`
Length of the message
foreground_color: :class:`cpl.console.foreground_color.ForegroundColorEnum`
Foreground color of the spinner
background_color: :class:`cpl.console.background_color.BackgroundColorEnum`
Background color of the spinner
"""
def __init__(self, msg_len: int, foreground_color: ForegroundColorEnum, background_color: BackgroundColorEnum): def __init__(self, msg_len: int, foreground_color: ForegroundColorEnum, background_color: BackgroundColorEnum):
"""
Thread to show spinner in terminal
:param msg_len:
:param foreground_color:
:param background_color:
"""
threading.Thread.__init__(self) threading.Thread.__init__(self)
self._msg_len = msg_len self._msg_len = msg_len
@ -29,19 +34,13 @@ class SpinnerThread(threading.Thread):
@staticmethod @staticmethod
def _spinner(): def _spinner():
""" r"""Selects active spinner char"""
Selects active spinner char
:return:
"""
while True: while True:
for cursor in '|/-\\': for cursor in '|/-\\':
yield cursor yield cursor
def _get_color_args(self) -> list[str]: def _get_color_args(self) -> list[str]:
""" r"""Creates color arguments"""
Creates color arguments
:return:
"""
color_args = [] color_args = []
if self._foreground_color is not None: if self._foreground_color is not None:
color_args.append(str(self._foreground_color.value)) color_args.append(str(self._foreground_color.value))
@ -52,10 +51,7 @@ class SpinnerThread(threading.Thread):
return color_args return color_args
def run(self) -> None: def run(self) -> None:
""" r"""Entry point of thread, shows the spinner"""
Entry point of thread, shows the spinner
:return:
"""
columns = 0 columns = 0
if sys.platform == 'win32': if sys.platform == 'win32':
columns = os.get_terminal_size().columns columns = os.get_terminal_size().columns
@ -90,18 +86,12 @@ class SpinnerThread(threading.Thread):
print(colored(end_msg, *self._get_color_args()), end='') print(colored(end_msg, *self._get_color_args()), end='')
def stop_spinning(self): def stop_spinning(self):
""" r"""Stops the spinner"""
Stops the spinner
:return:
"""
self._is_spinning = False self._is_spinning = False
time.sleep(0.1) time.sleep(0.1)
def exit(self): def exit(self):
""" r"""Stops the spinner"""
Stops the spinner
:return:
"""
self._is_spinning = False self._is_spinning = False
self._exit = True self._exit = True
time.sleep(0.1) time.sleep(0.1)