2021.4.post1 #31
BIN
docs/build/doctrees/cpl.application.doctree
vendored
BIN
docs/build/doctrees/cpl.application.doctree
vendored
Binary file not shown.
BIN
docs/build/doctrees/cpl.configuration.doctree
vendored
BIN
docs/build/doctrees/cpl.configuration.doctree
vendored
Binary file not shown.
BIN
docs/build/doctrees/cpl.doctree
vendored
BIN
docs/build/doctrees/cpl.doctree
vendored
Binary file not shown.
BIN
docs/build/doctrees/environment.pickle
vendored
BIN
docs/build/doctrees/environment.pickle
vendored
Binary file not shown.
7
docs/build/html/_sources/cpl.rst.txt
vendored
7
docs/build/html/_sources/cpl.rst.txt
vendored
@ -15,10 +15,3 @@ CPL
|
|||||||
cpl.time
|
cpl.time
|
||||||
cpl.utils
|
cpl.utils
|
||||||
|
|
||||||
Module contents
|
|
||||||
---------------
|
|
||||||
|
|
||||||
.. automodule:: cpl
|
|
||||||
:members:
|
|
||||||
:undoc-members:
|
|
||||||
:show-inheritance:
|
|
||||||
|
5
docs/build/html/cpl.application.html
vendored
5
docs/build/html/cpl.application.html
vendored
@ -102,7 +102,6 @@
|
|||||||
<li class="toctree-l2"><a class="reference internal" href="cpl.mailing.html">cpl.mailing</a></li>
|
<li class="toctree-l2"><a class="reference internal" href="cpl.mailing.html">cpl.mailing</a></li>
|
||||||
<li class="toctree-l2"><a class="reference internal" href="cpl.time.html">cpl.time</a></li>
|
<li class="toctree-l2"><a class="reference internal" href="cpl.time.html">cpl.time</a></li>
|
||||||
<li class="toctree-l2"><a class="reference internal" href="cpl.utils.html">cpl.utils</a></li>
|
<li class="toctree-l2"><a class="reference internal" href="cpl.utils.html">cpl.utils</a></li>
|
||||||
<li class="toctree-l2"><a class="reference internal" href="cpl.html#module-cpl">Module contents</a></li>
|
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@ -243,7 +242,7 @@
|
|||||||
<dd><p>Sets the custom startup class to use</p>
|
<dd><p>Sets the custom startup class to use</p>
|
||||||
<blockquote>
|
<blockquote>
|
||||||
<div><dl class="simple">
|
<div><dl class="simple">
|
||||||
<dt>startup: Type[<a class="reference internal" href="#cpl.application.startup_abc.StartupABC" title="cpl.application.startup_abc.StartupABC"><code class="xref py py-class docutils literal notranslate"><span class="pre">cpl.application.startup_abc.StartupABC</span></code></a>]</dt><dd><p>Type of <a class="reference internal" href="#cpl.application.startup_abc.StartupABC" title="cpl.application.startup_abc.StartupABC"><code class="xref py py-class docutils literal notranslate"><span class="pre">cpl.application.startup_abc.StartupABC</span></code></a></p>
|
<dt>startup: Type[<a class="reference internal" href="#cpl.application.startup_abc.StartupABC" title="cpl.application.startup_abc.StartupABC"><code class="xref py py-class docutils literal notranslate"><span class="pre">cpl.application.startup_abc.StartupABC</span></code></a>]</dt><dd><p>Startup class to use</p>
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
</div></blockquote>
|
</div></blockquote>
|
||||||
@ -274,7 +273,7 @@
|
|||||||
<dd><p>Sets the custom startup class to use</p>
|
<dd><p>Sets the custom startup class to use</p>
|
||||||
<blockquote>
|
<blockquote>
|
||||||
<div><dl class="simple">
|
<div><dl class="simple">
|
||||||
<dt>startup: Type[<a class="reference internal" href="#cpl.application.startup_abc.StartupABC" title="cpl.application.startup_abc.StartupABC"><code class="xref py py-class docutils literal notranslate"><span class="pre">cpl.application.startup_abc.StartupABC</span></code></a>]</dt><dd><p>Type of <a class="reference internal" href="#cpl.application.startup_abc.StartupABC" title="cpl.application.startup_abc.StartupABC"><code class="xref py py-class docutils literal notranslate"><span class="pre">cpl.application.startup_abc.StartupABC</span></code></a></p>
|
<dt>startup: Type[<a class="reference internal" href="#cpl.application.startup_abc.StartupABC" title="cpl.application.startup_abc.StartupABC"><code class="xref py py-class docutils literal notranslate"><span class="pre">cpl.application.startup_abc.StartupABC</span></code></a>]</dt><dd><p>Startup class to use</p>
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
</div></blockquote>
|
</div></blockquote>
|
||||||
|
115
docs/build/html/cpl.configuration.html
vendored
115
docs/build/html/cpl.configuration.html
vendored
@ -103,7 +103,6 @@
|
|||||||
<li class="toctree-l2"><a class="reference internal" href="cpl.mailing.html">cpl.mailing</a></li>
|
<li class="toctree-l2"><a class="reference internal" href="cpl.mailing.html">cpl.mailing</a></li>
|
||||||
<li class="toctree-l2"><a class="reference internal" href="cpl.time.html">cpl.time</a></li>
|
<li class="toctree-l2"><a class="reference internal" href="cpl.time.html">cpl.time</a></li>
|
||||||
<li class="toctree-l2"><a class="reference internal" href="cpl.utils.html">cpl.utils</a></li>
|
<li class="toctree-l2"><a class="reference internal" href="cpl.utils.html">cpl.utils</a></li>
|
||||||
<li class="toctree-l2"><a class="reference internal" href="cpl.html#module-cpl">Module contents</a></li>
|
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@ -186,45 +185,53 @@
|
|||||||
<dl class="py method">
|
<dl class="py method">
|
||||||
<dt id="cpl.configuration.configuration.Configuration.add_configuration">
|
<dt id="cpl.configuration.configuration.Configuration.add_configuration">
|
||||||
<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
|
<dd><p>Add configuration object</p>
|
||||||
:param key_type:
|
<blockquote>
|
||||||
:param value:
|
<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>]
|
||||||
:return:</p>
|
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>
|
||||||
|
</div></blockquote>
|
||||||
</dd></dl>
|
</dd></dl>
|
||||||
|
|
||||||
<dl class="py method">
|
<dl class="py method">
|
||||||
<dt id="cpl.configuration.configuration.Configuration.add_console_argument">
|
<dt id="cpl.configuration.configuration.Configuration.add_console_argument">
|
||||||
<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
|
<dd><p>Adds console argument to known console arguments</p>
|
||||||
:param argument:
|
<blockquote>
|
||||||
:return:</p>
|
<div><p>argument: <code class="xref py py-class docutils literal notranslate"><span class="pre">cpl.console.console_argument.ConsoleArgument</span></code></p>
|
||||||
|
</div></blockquote>
|
||||||
</dd></dl>
|
</dd></dl>
|
||||||
|
|
||||||
<dl class="py method">
|
<dl class="py method">
|
||||||
<dt id="cpl.configuration.configuration.Configuration.add_console_arguments">
|
<dt id="cpl.configuration.configuration.Configuration.add_console_arguments">
|
||||||
<code class="sig-name descname"><span class="pre">add_console_arguments</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">error</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><span class="sig-paren">)</span><a class="headerlink" href="#cpl.configuration.configuration.Configuration.add_console_arguments" title="Permalink to this definition">¶</a></dt>
|
<code class="sig-name descname"><span class="pre">add_console_arguments</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">error</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><span class="sig-paren">)</span><a class="headerlink" href="#cpl.configuration.configuration.Configuration.add_console_arguments" title="Permalink to this definition">¶</a></dt>
|
||||||
<dd><p>Reads the console arguments
|
<dd><p>Reads the console arguments</p>
|
||||||
:param error: defines is invalid argument error will be shown or not
|
<blockquote>
|
||||||
:return:</p>
|
<div><dl class="simple">
|
||||||
|
<dt>error: <code class="xref py py-class docutils literal notranslate"><span class="pre">bool</span></code></dt><dd><p>Defines is invalid argument error will be shown or not</p>
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
</div></blockquote>
|
||||||
</dd></dl>
|
</dd></dl>
|
||||||
|
|
||||||
<dl class="py method">
|
<dl class="py method">
|
||||||
<dt id="cpl.configuration.configuration.Configuration.add_environment_variables">
|
<dt id="cpl.configuration.configuration.Configuration.add_environment_variables">
|
||||||
<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
|
<dd><p>Reads the environment variables</p>
|
||||||
:param prefix:
|
<blockquote>
|
||||||
:return:</p>
|
<div><p>prefix: <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.configuration.configuration.Configuration.add_json_file">
|
<dt id="cpl.configuration.configuration.Configuration.add_json_file">
|
||||||
<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
|
<dd><p>Reads and saves settings from given json file</p>
|
||||||
:param name:
|
<blockquote>
|
||||||
:param optional:
|
<div><p>name (str): Name of the file
|
||||||
:param output:
|
optional: <code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code>
|
||||||
:param path:
|
output: <code class="xref py py-class docutils literal notranslate"><span class="pre">bool</span></code>
|
||||||
:return:</p>
|
path: <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">
|
||||||
@ -245,9 +252,13 @@
|
|||||||
<dl class="py method">
|
<dl class="py method">
|
||||||
<dt id="cpl.configuration.configuration.Configuration.get_configuration">
|
<dt id="cpl.configuration.configuration.Configuration.get_configuration">
|
||||||
<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> → <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> → <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 in configuration by given type
|
<dd><p>Returns value from configuration by given type</p>
|
||||||
:param search_type:
|
<blockquote>
|
||||||
:return:</p>
|
<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></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></blockquote>
|
||||||
</dd></dl>
|
</dd></dl>
|
||||||
|
|
||||||
</dd></dl>
|
</dd></dl>
|
||||||
@ -261,46 +272,54 @@
|
|||||||
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">abc.ABC</span></code></p>
|
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">abc.ABC</span></code></p>
|
||||||
<dl class="py method">
|
<dl class="py method">
|
||||||
<dt id="cpl.configuration.configuration_abc.ConfigurationABC.add_configuration">
|
<dt id="cpl.configuration.configuration_abc.ConfigurationABC.add_configuration">
|
||||||
<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"><span class="pre">object</span></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
|
<dd><p>Add configuration object</p>
|
||||||
:param key_type:
|
<blockquote>
|
||||||
:param value:
|
<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>]
|
||||||
:return:</p>
|
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>
|
||||||
|
</div></blockquote>
|
||||||
</dd></dl>
|
</dd></dl>
|
||||||
|
|
||||||
<dl class="py method">
|
<dl class="py method">
|
||||||
<dt id="cpl.configuration.configuration_abc.ConfigurationABC.add_console_argument">
|
<dt id="cpl.configuration.configuration_abc.ConfigurationABC.add_console_argument">
|
||||||
<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
|
<dd><p>Adds console argument to known console arguments</p>
|
||||||
:param argument:
|
<blockquote>
|
||||||
:return:</p>
|
<div><p>argument: <code class="xref py py-class docutils literal notranslate"><span class="pre">cpl.console.console_argument.ConsoleArgument</span></code></p>
|
||||||
|
</div></blockquote>
|
||||||
</dd></dl>
|
</dd></dl>
|
||||||
|
|
||||||
<dl class="py method">
|
<dl class="py method">
|
||||||
<dt id="cpl.configuration.configuration_abc.ConfigurationABC.add_console_arguments">
|
<dt id="cpl.configuration.configuration_abc.ConfigurationABC.add_console_arguments">
|
||||||
<em class="property"><span class="pre">abstract</span> </em><code class="sig-name descname"><span class="pre">add_console_arguments</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">error</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><span class="sig-paren">)</span><a class="headerlink" href="#cpl.configuration.configuration_abc.ConfigurationABC.add_console_arguments" 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_arguments</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">error</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><span class="sig-paren">)</span><a class="headerlink" href="#cpl.configuration.configuration_abc.ConfigurationABC.add_console_arguments" title="Permalink to this definition">¶</a></dt>
|
||||||
<dd><p>Reads the console arguments
|
<dd><p>Reads the console arguments</p>
|
||||||
:param error: defines is invalid argument error will be shown or not
|
<blockquote>
|
||||||
:return:</p>
|
<div><dl class="simple">
|
||||||
|
<dt>error: <code class="xref py py-class docutils literal notranslate"><span class="pre">bool</span></code></dt><dd><p>Defines is invalid argument error will be shown or not</p>
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
</div></blockquote>
|
||||||
</dd></dl>
|
</dd></dl>
|
||||||
|
|
||||||
<dl class="py method">
|
<dl class="py method">
|
||||||
<dt id="cpl.configuration.configuration_abc.ConfigurationABC.add_environment_variables">
|
<dt id="cpl.configuration.configuration_abc.ConfigurationABC.add_environment_variables">
|
||||||
<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
|
<dd><p>Reads the environment variables</p>
|
||||||
:param prefix:
|
<blockquote>
|
||||||
:return:</p>
|
<div><p>prefix: <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.configuration.configuration_abc.ConfigurationABC.add_json_file">
|
<dt id="cpl.configuration.configuration_abc.ConfigurationABC.add_json_file">
|
||||||
<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
|
<dd><p>Reads and saves settings from given json file</p>
|
||||||
:param name:
|
<blockquote>
|
||||||
:param optional:
|
<div><p>name (str): Name of the file
|
||||||
:param output:
|
optional: <code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code>
|
||||||
:param path:
|
output: <code class="xref py py-class docutils literal notranslate"><span class="pre">bool</span></code>
|
||||||
:return:</p>
|
path: <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">
|
||||||
@ -321,9 +340,13 @@
|
|||||||
<dl class="py method">
|
<dl class="py method">
|
||||||
<dt id="cpl.configuration.configuration_abc.ConfigurationABC.get_configuration">
|
<dt id="cpl.configuration.configuration_abc.ConfigurationABC.get_configuration">
|
||||||
<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> → <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> → <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 in configuration by given type
|
<dd><p>Returns value from configuration by given type</p>
|
||||||
:param search_type:
|
<blockquote>
|
||||||
:return:</p>
|
<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></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></blockquote>
|
||||||
</dd></dl>
|
</dd></dl>
|
||||||
|
|
||||||
</dd></dl>
|
</dd></dl>
|
||||||
|
1
docs/build/html/cpl.console.html
vendored
1
docs/build/html/cpl.console.html
vendored
@ -103,7 +103,6 @@
|
|||||||
<li class="toctree-l2"><a class="reference internal" href="cpl.mailing.html">cpl.mailing</a></li>
|
<li class="toctree-l2"><a class="reference internal" href="cpl.mailing.html">cpl.mailing</a></li>
|
||||||
<li class="toctree-l2"><a class="reference internal" href="cpl.time.html">cpl.time</a></li>
|
<li class="toctree-l2"><a class="reference internal" href="cpl.time.html">cpl.time</a></li>
|
||||||
<li class="toctree-l2"><a class="reference internal" href="cpl.utils.html">cpl.utils</a></li>
|
<li class="toctree-l2"><a class="reference internal" href="cpl.utils.html">cpl.utils</a></li>
|
||||||
<li class="toctree-l2"><a class="reference internal" href="cpl.html#module-cpl">Module contents</a></li>
|
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
1
docs/build/html/cpl.database.connection.html
vendored
1
docs/build/html/cpl.database.connection.html
vendored
@ -108,7 +108,6 @@
|
|||||||
<li class="toctree-l2"><a class="reference internal" href="cpl.mailing.html">cpl.mailing</a></li>
|
<li class="toctree-l2"><a class="reference internal" href="cpl.mailing.html">cpl.mailing</a></li>
|
||||||
<li class="toctree-l2"><a class="reference internal" href="cpl.time.html">cpl.time</a></li>
|
<li class="toctree-l2"><a class="reference internal" href="cpl.time.html">cpl.time</a></li>
|
||||||
<li class="toctree-l2"><a class="reference internal" href="cpl.utils.html">cpl.utils</a></li>
|
<li class="toctree-l2"><a class="reference internal" href="cpl.utils.html">cpl.utils</a></li>
|
||||||
<li class="toctree-l2"><a class="reference internal" href="cpl.html#module-cpl">Module contents</a></li>
|
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
1
docs/build/html/cpl.database.context.html
vendored
1
docs/build/html/cpl.database.context.html
vendored
@ -108,7 +108,6 @@
|
|||||||
<li class="toctree-l2"><a class="reference internal" href="cpl.mailing.html">cpl.mailing</a></li>
|
<li class="toctree-l2"><a class="reference internal" href="cpl.mailing.html">cpl.mailing</a></li>
|
||||||
<li class="toctree-l2"><a class="reference internal" href="cpl.time.html">cpl.time</a></li>
|
<li class="toctree-l2"><a class="reference internal" href="cpl.time.html">cpl.time</a></li>
|
||||||
<li class="toctree-l2"><a class="reference internal" href="cpl.utils.html">cpl.utils</a></li>
|
<li class="toctree-l2"><a class="reference internal" href="cpl.utils.html">cpl.utils</a></li>
|
||||||
<li class="toctree-l2"><a class="reference internal" href="cpl.html#module-cpl">Module contents</a></li>
|
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
1
docs/build/html/cpl.database.html
vendored
1
docs/build/html/cpl.database.html
vendored
@ -104,7 +104,6 @@
|
|||||||
<li class="toctree-l2"><a class="reference internal" href="cpl.mailing.html">cpl.mailing</a></li>
|
<li class="toctree-l2"><a class="reference internal" href="cpl.mailing.html">cpl.mailing</a></li>
|
||||||
<li class="toctree-l2"><a class="reference internal" href="cpl.time.html">cpl.time</a></li>
|
<li class="toctree-l2"><a class="reference internal" href="cpl.time.html">cpl.time</a></li>
|
||||||
<li class="toctree-l2"><a class="reference internal" href="cpl.utils.html">cpl.utils</a></li>
|
<li class="toctree-l2"><a class="reference internal" href="cpl.utils.html">cpl.utils</a></li>
|
||||||
<li class="toctree-l2"><a class="reference internal" href="cpl.html#module-cpl">Module contents</a></li>
|
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -104,7 +104,6 @@
|
|||||||
<li class="toctree-l2"><a class="reference internal" href="cpl.mailing.html">cpl.mailing</a></li>
|
<li class="toctree-l2"><a class="reference internal" href="cpl.mailing.html">cpl.mailing</a></li>
|
||||||
<li class="toctree-l2"><a class="reference internal" href="cpl.time.html">cpl.time</a></li>
|
<li class="toctree-l2"><a class="reference internal" href="cpl.time.html">cpl.time</a></li>
|
||||||
<li class="toctree-l2"><a class="reference internal" href="cpl.utils.html">cpl.utils</a></li>
|
<li class="toctree-l2"><a class="reference internal" href="cpl.utils.html">cpl.utils</a></li>
|
||||||
<li class="toctree-l2"><a class="reference internal" href="cpl.html#module-cpl">Module contents</a></li>
|
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
1
docs/build/html/cpl.environment.html
vendored
1
docs/build/html/cpl.environment.html
vendored
@ -101,7 +101,6 @@
|
|||||||
<li class="toctree-l2"><a class="reference internal" href="cpl.mailing.html">cpl.mailing</a></li>
|
<li class="toctree-l2"><a class="reference internal" href="cpl.mailing.html">cpl.mailing</a></li>
|
||||||
<li class="toctree-l2"><a class="reference internal" href="cpl.time.html">cpl.time</a></li>
|
<li class="toctree-l2"><a class="reference internal" href="cpl.time.html">cpl.time</a></li>
|
||||||
<li class="toctree-l2"><a class="reference internal" href="cpl.utils.html">cpl.utils</a></li>
|
<li class="toctree-l2"><a class="reference internal" href="cpl.utils.html">cpl.utils</a></li>
|
||||||
<li class="toctree-l2"><a class="reference internal" href="cpl.html#module-cpl">Module contents</a></li>
|
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
45
docs/build/html/cpl.html
vendored
45
docs/build/html/cpl.html
vendored
@ -96,10 +96,6 @@
|
|||||||
<li class="toctree-l2"><a class="reference internal" href="cpl.mailing.html">cpl.mailing</a></li>
|
<li class="toctree-l2"><a class="reference internal" href="cpl.mailing.html">cpl.mailing</a></li>
|
||||||
<li class="toctree-l2"><a class="reference internal" href="cpl.time.html">cpl.time</a></li>
|
<li class="toctree-l2"><a class="reference internal" href="cpl.time.html">cpl.time</a></li>
|
||||||
<li class="toctree-l2"><a class="reference internal" href="cpl.utils.html">cpl.utils</a></li>
|
<li class="toctree-l2"><a class="reference internal" href="cpl.utils.html">cpl.utils</a></li>
|
||||||
<li class="toctree-l2"><a class="reference internal" href="#module-cpl">Module contents</a><ul>
|
|
||||||
<li class="toctree-l3"><a class="reference internal" href="#sh-cpl-sh-edraft-common-python-library">sh_cpl sh-edraft Common Python library</a></li>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@ -257,47 +253,6 @@
|
|||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="section" id="module-cpl">
|
|
||||||
<span id="module-contents"></span><h2>Module contents<a class="headerlink" href="#module-cpl" title="Permalink to this headline">¶</a></h2>
|
|
||||||
<div class="section" id="sh-cpl-sh-edraft-common-python-library">
|
|
||||||
<h3>sh_cpl sh-edraft Common Python library<a class="headerlink" href="#sh-cpl-sh-edraft-common-python-library" title="Permalink to this headline">¶</a></h3>
|
|
||||||
<p>sh-edraft Common Python library</p>
|
|
||||||
<dl class="field-list simple">
|
|
||||||
<dt class="field-odd">copyright</dt>
|
|
||||||
<dd class="field-odd"><ol class="loweralpha simple" start="3">
|
|
||||||
<li><p>2020 - 2021 sh-edraft.de</p></li>
|
|
||||||
</ol>
|
|
||||||
</dd>
|
|
||||||
<dt class="field-even">license</dt>
|
|
||||||
<dd class="field-even"><p>MIT, see LICENSE for more details.</p>
|
|
||||||
</dd>
|
|
||||||
</dl>
|
|
||||||
<dl class="py class">
|
|
||||||
<dt id="cpl.VersionInfo">
|
|
||||||
<em class="property"><span class="pre">class</span> </em><code class="sig-prename descclassname"><span class="pre">cpl.</span></code><code class="sig-name descname"><span class="pre">VersionInfo</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">major</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">minor</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">micro</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#cpl.VersionInfo" title="Permalink to this definition">¶</a></dt>
|
|
||||||
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">tuple</span></code></p>
|
|
||||||
<dl class="py attribute">
|
|
||||||
<dt id="cpl.VersionInfo.major">
|
|
||||||
<code class="sig-name descname"><span class="pre">major</span></code><a class="headerlink" href="#cpl.VersionInfo.major" title="Permalink to this definition">¶</a></dt>
|
|
||||||
<dd><p>Alias for field number 0</p>
|
|
||||||
</dd></dl>
|
|
||||||
|
|
||||||
<dl class="py attribute">
|
|
||||||
<dt id="cpl.VersionInfo.micro">
|
|
||||||
<code class="sig-name descname"><span class="pre">micro</span></code><a class="headerlink" href="#cpl.VersionInfo.micro" title="Permalink to this definition">¶</a></dt>
|
|
||||||
<dd><p>Alias for field number 2</p>
|
|
||||||
</dd></dl>
|
|
||||||
|
|
||||||
<dl class="py attribute">
|
|
||||||
<dt id="cpl.VersionInfo.minor">
|
|
||||||
<code class="sig-name descname"><span class="pre">minor</span></code><a class="headerlink" href="#cpl.VersionInfo.minor" title="Permalink to this definition">¶</a></dt>
|
|
||||||
<dd><p>Alias for field number 1</p>
|
|
||||||
</dd></dl>
|
|
||||||
|
|
||||||
</dd></dl>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
1
docs/build/html/cpl.logging.html
vendored
1
docs/build/html/cpl.logging.html
vendored
@ -103,7 +103,6 @@
|
|||||||
<li class="toctree-l2"><a class="reference internal" href="cpl.mailing.html">cpl.mailing</a></li>
|
<li class="toctree-l2"><a class="reference internal" href="cpl.mailing.html">cpl.mailing</a></li>
|
||||||
<li class="toctree-l2"><a class="reference internal" href="cpl.time.html">cpl.time</a></li>
|
<li class="toctree-l2"><a class="reference internal" href="cpl.time.html">cpl.time</a></li>
|
||||||
<li class="toctree-l2"><a class="reference internal" href="cpl.utils.html">cpl.utils</a></li>
|
<li class="toctree-l2"><a class="reference internal" href="cpl.utils.html">cpl.utils</a></li>
|
||||||
<li class="toctree-l2"><a class="reference internal" href="cpl.html#module-cpl">Module contents</a></li>
|
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
1
docs/build/html/cpl.mailing.html
vendored
1
docs/build/html/cpl.mailing.html
vendored
@ -103,7 +103,6 @@
|
|||||||
</li>
|
</li>
|
||||||
<li class="toctree-l2"><a class="reference internal" href="cpl.time.html">cpl.time</a></li>
|
<li class="toctree-l2"><a class="reference internal" href="cpl.time.html">cpl.time</a></li>
|
||||||
<li class="toctree-l2"><a class="reference internal" href="cpl.utils.html">cpl.utils</a></li>
|
<li class="toctree-l2"><a class="reference internal" href="cpl.utils.html">cpl.utils</a></li>
|
||||||
<li class="toctree-l2"><a class="reference internal" href="cpl.html#module-cpl">Module contents</a></li>
|
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
1
docs/build/html/cpl.time.html
vendored
1
docs/build/html/cpl.time.html
vendored
@ -100,7 +100,6 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li class="toctree-l2"><a class="reference internal" href="cpl.utils.html">cpl.utils</a></li>
|
<li class="toctree-l2"><a class="reference internal" href="cpl.utils.html">cpl.utils</a></li>
|
||||||
<li class="toctree-l2"><a class="reference internal" href="cpl.html#module-cpl">Module contents</a></li>
|
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
1
docs/build/html/cpl.utils.html
vendored
1
docs/build/html/cpl.utils.html
vendored
@ -100,7 +100,6 @@
|
|||||||
<li class="toctree-l3"><a class="reference internal" href="#module-cpl.utils.string">cpl.utils.string</a></li>
|
<li class="toctree-l3"><a class="reference internal" href="#module-cpl.utils.string">cpl.utils.string</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li class="toctree-l2"><a class="reference internal" href="cpl.html#module-cpl">Module contents</a></li>
|
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
19
docs/build/html/genindex.html
vendored
19
docs/build/html/genindex.html
vendored
@ -390,13 +390,6 @@
|
|||||||
<li><a href="cpl.utils.html#cpl.utils.string.String.convert_to_snake_case">convert_to_snake_case() (cpl.utils.string.String static method)</a>
|
<li><a href="cpl.utils.html#cpl.utils.string.String.convert_to_snake_case">convert_to_snake_case() (cpl.utils.string.String static method)</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
cpl
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><a href="cpl.html#module-cpl">module</a>
|
|
||||||
</li>
|
|
||||||
</ul></li>
|
|
||||||
<li>
|
|
||||||
cpl.application.application_abc
|
cpl.application.application_abc
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
@ -1050,19 +1043,11 @@
|
|||||||
</li>
|
</li>
|
||||||
</ul></li>
|
</ul></li>
|
||||||
<li><a href="cpl.application.html#cpl.application.application_abc.ApplicationABC.main">main() (cpl.application.application_abc.ApplicationABC method)</a>
|
<li><a href="cpl.application.html#cpl.application.application_abc.ApplicationABC.main">main() (cpl.application.application_abc.ApplicationABC method)</a>
|
||||||
</li>
|
|
||||||
<li><a href="cpl.html#cpl.VersionInfo.major">major (cpl.VersionInfo attribute)</a>
|
|
||||||
</li>
|
|
||||||
<li><a href="cpl.html#cpl.VersionInfo.micro">micro (cpl.VersionInfo attribute)</a>
|
|
||||||
</li>
|
|
||||||
<li><a href="cpl.html#cpl.VersionInfo.minor">minor (cpl.VersionInfo attribute)</a>
|
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
module
|
module
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="cpl.html#module-cpl">cpl</a>
|
|
||||||
</li>
|
|
||||||
<li><a href="cpl.application.html#module-cpl.application.application_abc">cpl.application.application_abc</a>
|
<li><a href="cpl.application.html#module-cpl.application.application_abc">cpl.application.application_abc</a>
|
||||||
</li>
|
</li>
|
||||||
<li><a href="cpl.application.html#module-cpl.application.application_builder">cpl.application.application_builder</a>
|
<li><a href="cpl.application.html#module-cpl.application.application_builder">cpl.application.application_builder</a>
|
||||||
@ -1389,10 +1374,6 @@
|
|||||||
<table style="width: 100%" class="indextable genindextable"><tr>
|
<table style="width: 100%" class="indextable genindextable"><tr>
|
||||||
<td style="width: 33%; vertical-align: top;"><ul>
|
<td style="width: 33%; vertical-align: top;"><ul>
|
||||||
<li><a href="cpl.configuration.html#cpl.configuration.console_argument.ConsoleArgument.value_token">value_token() (cpl.configuration.console_argument.ConsoleArgument property)</a>
|
<li><a href="cpl.configuration.html#cpl.configuration.console_argument.ConsoleArgument.value_token">value_token() (cpl.configuration.console_argument.ConsoleArgument property)</a>
|
||||||
</li>
|
|
||||||
</ul></td>
|
|
||||||
<td style="width: 33%; vertical-align: top;"><ul>
|
|
||||||
<li><a href="cpl.html#cpl.VersionInfo">VersionInfo (class in cpl)</a>
|
|
||||||
</li>
|
</li>
|
||||||
</ul></td>
|
</ul></td>
|
||||||
</tr></table>
|
</tr></table>
|
||||||
|
4
docs/build/html/modules.html
vendored
4
docs/build/html/modules.html
vendored
@ -238,10 +238,6 @@
|
|||||||
<li class="toctree-l3"><a class="reference internal" href="cpl.utils.html#module-cpl.utils.string">cpl.utils.string</a></li>
|
<li class="toctree-l3"><a class="reference internal" href="cpl.utils.html#module-cpl.utils.string">cpl.utils.string</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li class="toctree-l2"><a class="reference internal" href="cpl.html#module-cpl">Module contents</a><ul>
|
|
||||||
<li class="toctree-l3"><a class="reference internal" href="cpl.html#sh-cpl-sh-edraft-common-python-library">sh_cpl sh-edraft Common Python library</a></li>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
BIN
docs/build/html/objects.inv
vendored
BIN
docs/build/html/objects.inv
vendored
Binary file not shown.
2
docs/build/html/py-modindex.html
vendored
2
docs/build/html/py-modindex.html
vendored
@ -165,7 +165,7 @@
|
|||||||
<td><img src="_static/minus.png" class="toggler"
|
<td><img src="_static/minus.png" class="toggler"
|
||||||
id="toggle-1" style="display: none" alt="-" /></td>
|
id="toggle-1" style="display: none" alt="-" /></td>
|
||||||
<td>
|
<td>
|
||||||
<a href="cpl.html#module-cpl"><code class="xref">cpl</code></a></td><td>
|
<code class="xref">cpl</code></td><td>
|
||||||
<em></em></td></tr>
|
<em></em></td></tr>
|
||||||
<tr class="cg-1">
|
<tr class="cg-1">
|
||||||
<td></td>
|
<td></td>
|
||||||
|
2
docs/build/html/searchindex.js
vendored
2
docs/build/html/searchindex.js
vendored
File diff suppressed because one or more lines are too long
@ -15,10 +15,3 @@ CPL
|
|||||||
cpl.time
|
cpl.time
|
||||||
cpl.utils
|
cpl.utils
|
||||||
|
|
||||||
Module contents
|
|
||||||
---------------
|
|
||||||
|
|
||||||
.. automodule:: cpl
|
|
||||||
:members:
|
|
||||||
:undoc-members:
|
|
||||||
:show-inheritance:
|
|
||||||
|
@ -19,7 +19,7 @@ class ApplicationBuilderABC(ABC):
|
|||||||
Parameter
|
Parameter
|
||||||
---------
|
---------
|
||||||
startup: Type[:class:`cpl.application.startup_abc.StartupABC`]
|
startup: Type[:class:`cpl.application.startup_abc.StartupABC`]
|
||||||
Type of :class:`cpl.application.startup_abc.StartupABC`
|
Startup class to use
|
||||||
"""
|
"""
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
@ -18,9 +18,7 @@ from cpl.environment.environment_name_enum import EnvironmentNameEnum
|
|||||||
class Configuration(ConfigurationABC):
|
class Configuration(ConfigurationABC):
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
"""
|
r"""Representation of configuration"""
|
||||||
Representation of configuration
|
|
||||||
"""
|
|
||||||
ConfigurationABC.__init__(self)
|
ConfigurationABC.__init__(self)
|
||||||
|
|
||||||
self._application_environment = ApplicationEnvironment()
|
self._application_environment = ApplicationEnvironment()
|
||||||
@ -51,11 +49,12 @@ class Configuration(ConfigurationABC):
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def _print_info(name: str, message: str):
|
def _print_info(name: str, message: str):
|
||||||
"""
|
r"""Prints an info message
|
||||||
Prints an info message
|
|
||||||
:param name:
|
Parameter
|
||||||
:param message:
|
---------
|
||||||
:return:
|
name: :class:`str`
|
||||||
|
message: :class:`str`
|
||||||
"""
|
"""
|
||||||
Console.set_foreground_color(ForegroundColorEnum.green)
|
Console.set_foreground_color(ForegroundColorEnum.green)
|
||||||
Console.write_line(f'[{name}] {message}')
|
Console.write_line(f'[{name}] {message}')
|
||||||
@ -63,11 +62,12 @@ class Configuration(ConfigurationABC):
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def _print_warn(name: str, message: str):
|
def _print_warn(name: str, message: str):
|
||||||
"""
|
r"""Prints a warning
|
||||||
Prints a warning
|
|
||||||
:param name:
|
Parameter
|
||||||
:param message:
|
---------
|
||||||
:return:
|
name: :class:`str`
|
||||||
|
message: :class:`str`
|
||||||
"""
|
"""
|
||||||
Console.set_foreground_color(ForegroundColorEnum.yellow)
|
Console.set_foreground_color(ForegroundColorEnum.yellow)
|
||||||
Console.write_line(f'[{name}] {message}')
|
Console.write_line(f'[{name}] {message}')
|
||||||
@ -75,22 +75,24 @@ class Configuration(ConfigurationABC):
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def _print_error(name: str, message: str):
|
def _print_error(name: str, message: str):
|
||||||
"""
|
r"""Prints an error
|
||||||
Prints an error
|
|
||||||
:param name:
|
Parameter
|
||||||
:param message:
|
---------
|
||||||
:return:
|
name: :class:`str`
|
||||||
|
message: :class:`str`
|
||||||
"""
|
"""
|
||||||
Console.set_foreground_color(ForegroundColorEnum.red)
|
Console.set_foreground_color(ForegroundColorEnum.red)
|
||||||
Console.write_line(f'[{name}] {message}')
|
Console.write_line(f'[{name}] {message}')
|
||||||
Console.set_foreground_color(ForegroundColorEnum.default)
|
Console.set_foreground_color(ForegroundColorEnum.default)
|
||||||
|
|
||||||
def _set_variable(self, name: str, value: any):
|
def _set_variable(self, name: str, value: any):
|
||||||
"""
|
r"""Sets variable to given value
|
||||||
Sets variable to given value
|
|
||||||
:param name:
|
Parameter
|
||||||
:param value:
|
---------
|
||||||
:return:
|
name: :class:`str`
|
||||||
|
value: :class:`any`
|
||||||
"""
|
"""
|
||||||
if name == ConfigurationVariableNameEnum.environment.value:
|
if name == ConfigurationVariableNameEnum.environment.value:
|
||||||
self._application_environment.environment_name = EnvironmentNameEnum(value)
|
self._application_environment.environment_name = EnvironmentNameEnum(value)
|
||||||
@ -106,12 +108,21 @@ class Configuration(ConfigurationABC):
|
|||||||
|
|
||||||
def _validate_argument_by_argument_type(self, argument: str, argument_type: ConsoleArgument,
|
def _validate_argument_by_argument_type(self, argument: str, argument_type: ConsoleArgument,
|
||||||
next_arguments: list[str] = None) -> bool:
|
next_arguments: list[str] = None) -> bool:
|
||||||
"""
|
r"""Validate argument by argument type
|
||||||
Validate argument by argument type
|
|
||||||
:param argument:
|
Parameter
|
||||||
:param argument_type:
|
---------
|
||||||
:param next_arguments:
|
argument: :class:`str`
|
||||||
:return:
|
argument_type: :class:`cpl.configuration.console_argument.ConsoleArgument`
|
||||||
|
next_arguments: list[:class:`str`]
|
||||||
|
|
||||||
|
Returns
|
||||||
|
-------
|
||||||
|
Object of :class:`bool`
|
||||||
|
|
||||||
|
Raises
|
||||||
|
------
|
||||||
|
Exception: An error occurred getting an argument for a command
|
||||||
"""
|
"""
|
||||||
argument_name = ''
|
argument_name = ''
|
||||||
value = ''
|
value = ''
|
||||||
@ -240,6 +251,33 @@ class Configuration(ConfigurationABC):
|
|||||||
|
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
def _load_json_file(self, file: str, output: bool) -> dict:
|
||||||
|
r"""Reads the json file
|
||||||
|
|
||||||
|
Parameter
|
||||||
|
---------
|
||||||
|
file: :class:`str`
|
||||||
|
Name of the file
|
||||||
|
output: :class:`bool`
|
||||||
|
Specifies whether an output should take place
|
||||||
|
|
||||||
|
Returns
|
||||||
|
-------
|
||||||
|
Object of :class:`dict`
|
||||||
|
"""
|
||||||
|
try:
|
||||||
|
# open config file, create if not exists
|
||||||
|
with open(file, encoding='utf-8') as cfg:
|
||||||
|
# load json
|
||||||
|
json_cfg = json.load(cfg)
|
||||||
|
if output:
|
||||||
|
self._print_info(__name__, f'Loaded config file: {file}')
|
||||||
|
|
||||||
|
return json_cfg
|
||||||
|
except Exception as e:
|
||||||
|
self._print_error(__name__, f'Cannot load config file: {file}! -> {e}')
|
||||||
|
return {}
|
||||||
|
|
||||||
def add_environment_variables(self, prefix: str):
|
def add_environment_variables(self, prefix: str):
|
||||||
for variable in ConfigurationVariableNameEnum.to_list():
|
for variable in ConfigurationVariableNameEnum.to_list():
|
||||||
var_name = f'{prefix}{variable}'
|
var_name = f'{prefix}{variable}'
|
||||||
@ -325,31 +363,11 @@ class Configuration(ConfigurationABC):
|
|||||||
configuration.from_dict(value)
|
configuration.from_dict(value)
|
||||||
self.add_configuration(sub, configuration)
|
self.add_configuration(sub, configuration)
|
||||||
|
|
||||||
def _load_json_file(self, file: str, output: bool) -> dict:
|
|
||||||
"""
|
|
||||||
Reads the json file
|
|
||||||
:param file:
|
|
||||||
:param output:
|
|
||||||
:return:
|
|
||||||
"""
|
|
||||||
try:
|
|
||||||
# open config file, create if not exists
|
|
||||||
with open(file, encoding='utf-8') as cfg:
|
|
||||||
# load json
|
|
||||||
json_cfg = json.load(cfg)
|
|
||||||
if output:
|
|
||||||
self._print_info(__name__, f'Loaded config file: {file}')
|
|
||||||
|
|
||||||
return json_cfg
|
|
||||||
except Exception as e:
|
|
||||||
self._print_error(__name__, f'Cannot load config file: {file}! -> {e}')
|
|
||||||
return {}
|
|
||||||
|
|
||||||
def add_configuration(self, key_type: Union[str, type], value: ConfigurationModelABC):
|
def add_configuration(self, key_type: Union[str, type], value: ConfigurationModelABC):
|
||||||
self._config[key_type] = value
|
self._config[key_type] = value
|
||||||
|
|
||||||
def get_configuration(self, search_type: Union[str, Type[ConfigurationModelABC]]) -> Union[
|
def get_configuration(self, search_type: Union[str, Type[ConfigurationModelABC]]) -> \
|
||||||
str, Callable[ConfigurationModelABC]]:
|
Union[str, Callable[ConfigurationModelABC]]:
|
||||||
if type(search_type) is str:
|
if type(search_type) is str:
|
||||||
if search_type == ConfigurationVariableNameEnum.environment.value:
|
if search_type == ConfigurationVariableNameEnum.environment.value:
|
||||||
return self._application_environment.environment_name
|
return self._application_environment.environment_name
|
||||||
|
@ -11,9 +11,7 @@ class ConfigurationABC(ABC):
|
|||||||
|
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
"""
|
r"""ABC for the :class:`cpl.configuration.configuration.Configuration`"""
|
||||||
ABC of configuration
|
|
||||||
"""
|
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@ -34,58 +32,73 @@ class ConfigurationABC(ABC):
|
|||||||
|
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
def add_environment_variables(self, prefix: str):
|
def add_environment_variables(self, prefix: str):
|
||||||
"""
|
r"""Reads the environment variables
|
||||||
Reads the environment variables
|
|
||||||
:param prefix:
|
Parameter
|
||||||
:return:
|
---------
|
||||||
|
prefix: :class:`str`
|
||||||
"""
|
"""
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
def add_console_argument(self, argument: ConsoleArgument):
|
def add_console_argument(self, argument: ConsoleArgument):
|
||||||
"""
|
r"""Adds console argument to known console arguments
|
||||||
Adds console argument to known console arguments
|
|
||||||
:param argument:
|
Parameter
|
||||||
:return:
|
---------
|
||||||
|
argument: :class:`cpl.configuration.console_argument.ConsoleArgument`
|
||||||
"""
|
"""
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
def add_console_arguments(self, error: bool = None):
|
def add_console_arguments(self, error: bool = None):
|
||||||
"""
|
r"""Reads the console arguments
|
||||||
Reads the console arguments
|
|
||||||
:param error: defines is invalid argument error will be shown or not
|
Parameter
|
||||||
:return:
|
---------
|
||||||
|
error: :class:`bool`
|
||||||
|
Defines is invalid argument error will be shown or not
|
||||||
"""
|
"""
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
def add_json_file(self, name: str, optional: bool = None, output: bool = True, path: str = None):
|
def add_json_file(self, name: str, optional: bool = None, output: bool = True, path: str = None):
|
||||||
"""
|
r"""Reads and saves settings from given json file
|
||||||
Reads and saves settings from given json file
|
|
||||||
:param name:
|
Parameter
|
||||||
:param optional:
|
---------
|
||||||
:param output:
|
name: :class:`str`
|
||||||
:param path:
|
Name of the file
|
||||||
:return:
|
optional: :class:`str`
|
||||||
|
Specifies whether an error should occur if the file was not found
|
||||||
|
output: :class:`bool`
|
||||||
|
Specifies whether an output should take place
|
||||||
|
path: :class:`str`
|
||||||
|
Path in which the file should be stored
|
||||||
"""
|
"""
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
def add_configuration(self, key_type: Union[str, type], value: object):
|
def add_configuration(self, key_type: Union[str, type], value: ConfigurationModelABC):
|
||||||
"""
|
r"""Add configuration object
|
||||||
Add configuration object
|
|
||||||
:param key_type:
|
Parameter
|
||||||
:param value:
|
---------
|
||||||
:return:
|
key_type: Union[:class:`str`, :class:`type`]
|
||||||
|
value: :class:`cpl.configuration.configuration_model_abc.ConfigurationModelABC`
|
||||||
"""
|
"""
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
def get_configuration(self, search_type: Union[str, Type[ConfigurationModelABC]]) -> Union[str, Callable[ConfigurationModelABC]]:
|
def get_configuration(self, search_type: Union[str, Type[ConfigurationModelABC]]) -> Union[str, Callable[ConfigurationModelABC]]:
|
||||||
"""
|
r"""Returns value from configuration by given type
|
||||||
Returns value in configuration by given type
|
|
||||||
:param search_type:
|
Parameter
|
||||||
:return:
|
---------
|
||||||
|
search_type: Union[:class:`str`, Type[:class:`cpl.configuration.configuration_model_abc.ConfigurationModelABC`]]
|
||||||
|
|
||||||
|
Returns
|
||||||
|
-------
|
||||||
|
Object of Union[:class:`str`, Callable[:class:`cpl.configuration.configuration_model_abc.ConfigurationModelABC`]]
|
||||||
"""
|
"""
|
||||||
pass
|
pass
|
||||||
|
@ -5,16 +5,15 @@ class ConfigurationModelABC(ABC):
|
|||||||
|
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
"""
|
r"""ABC for settings representation"""
|
||||||
ABC for settings representation
|
|
||||||
"""
|
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
def from_dict(self, settings: dict):
|
def from_dict(self, settings: dict):
|
||||||
"""
|
r"""Converts attributes to dict
|
||||||
Converts attributes to dict
|
|
||||||
:param settings:
|
Parameter
|
||||||
:return:
|
---------
|
||||||
|
settings: :class:`dict`
|
||||||
"""
|
"""
|
||||||
pass
|
pass
|
||||||
|
@ -8,14 +8,16 @@ class ConsoleArgument:
|
|||||||
is_value_token_optional: bool = None,
|
is_value_token_optional: bool = None,
|
||||||
console_arguments: list['ConsoleArgument'] = None
|
console_arguments: list['ConsoleArgument'] = None
|
||||||
):
|
):
|
||||||
"""
|
r"""Representation of an console argument
|
||||||
Representation of an console argument
|
|
||||||
:param token:
|
Parameter
|
||||||
:param name:
|
---------
|
||||||
:param aliases:
|
token: :class:`str`
|
||||||
:param value_token:
|
name: :class:`str`
|
||||||
:param is_value_token_optional:
|
aliases: list[:class:`str`]
|
||||||
:param console_arguments:
|
value_token: :class:`str`
|
||||||
|
is_value_token_optional: :class:`bool`
|
||||||
|
console_arguments: List[:class:`cpl.configuration.console_argument.ConsoleArgument`]
|
||||||
"""
|
"""
|
||||||
self._token = token
|
self._token = token
|
||||||
self._name = name
|
self._name = name
|
||||||
|
Loading…
Reference in New Issue
Block a user