2021.4.4 #30
BIN
docs/build/doctrees/cpl.database.connection.doctree
vendored
BIN
docs/build/doctrees/cpl.database.connection.doctree
vendored
Binary file not shown.
BIN
docs/build/doctrees/cpl.database.context.doctree
vendored
BIN
docs/build/doctrees/cpl.database.context.doctree
vendored
Binary file not shown.
BIN
docs/build/doctrees/cpl.database.doctree
vendored
BIN
docs/build/doctrees/cpl.database.doctree
vendored
Binary file not shown.
BIN
docs/build/doctrees/cpl.dependency_injection.doctree
vendored
BIN
docs/build/doctrees/cpl.dependency_injection.doctree
vendored
Binary file not shown.
BIN
docs/build/doctrees/environment.pickle
vendored
BIN
docs/build/doctrees/environment.pickle
vendored
Binary file not shown.
5
docs/build/html/cpl.database.connection.html
vendored
5
docs/build/html/cpl.database.connection.html
vendored
@ -189,6 +189,10 @@
|
||||
<dt id="cpl.database.connection.database_connection.DatabaseConnection">
|
||||
<em class="property"><span class="pre">class</span> </em><code class="sig-prename descclassname"><span class="pre">cpl.database.connection.database_connection.</span></code><code class="sig-name descname"><span class="pre">DatabaseConnection</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">database_settings</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><a class="reference internal" href="cpl.database.html#cpl.database.database_settings.DatabaseSettings" title="cpl.database.database_settings.DatabaseSettings"><span class="pre">cpl.database.database_settings.DatabaseSettings</span></a></span></em><span class="sig-paren">)</span><a class="headerlink" href="#cpl.database.connection.database_connection.DatabaseConnection" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Bases: <a class="reference internal" href="#cpl.database.connection.database_connection_abc.DatabaseConnectionABC" title="cpl.database.connection.database_connection_abc.DatabaseConnectionABC"><code class="xref py py-class docutils literal notranslate"><span class="pre">cpl.database.connection.database_connection_abc.DatabaseConnectionABC</span></code></a></p>
|
||||
<p>Representation of the database connection</p>
|
||||
<blockquote>
|
||||
<div><p>database_settings: <a class="reference internal" href="cpl.database.html#cpl.database.database_settings.DatabaseSettings" title="cpl.database.database_settings.DatabaseSettings"><code class="xref py py-class docutils literal notranslate"><span class="pre">cpl.database.database_settings.DatabaseSettings</span></code></a></p>
|
||||
</div></blockquote>
|
||||
<dl class="py method">
|
||||
<dt id="cpl.database.connection.database_connection.DatabaseConnection.connect">
|
||||
<code class="sig-name descname"><span class="pre">connect</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">connection_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.database.connection.database_connection.DatabaseConnection.connect" title="Permalink to this definition">¶</a></dt>
|
||||
@ -220,6 +224,7 @@
|
||||
<dt id="cpl.database.connection.database_connection_abc.DatabaseConnectionABC">
|
||||
<em class="property"><span class="pre">class</span> </em><code class="sig-prename descclassname"><span class="pre">cpl.database.connection.database_connection_abc.</span></code><code class="sig-name descname"><span class="pre">DatabaseConnectionABC</span></code><a class="headerlink" href="#cpl.database.connection.database_connection_abc.DatabaseConnectionABC" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">abc.ABC</span></code></p>
|
||||
<p>ABC for the <a class="reference internal" href="#cpl.database.connection.database_connection.DatabaseConnection" title="cpl.database.connection.database_connection.DatabaseConnection"><code class="xref py py-class docutils literal notranslate"><span class="pre">cpl.database.connection.database_connection.DatabaseConnection</span></code></a></p>
|
||||
<dl class="py method">
|
||||
<dt id="cpl.database.connection.database_connection_abc.DatabaseConnectionABC.connect">
|
||||
<em class="property"><span class="pre">abstract</span> </em><code class="sig-name descname"><span class="pre">connect</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">connection_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.database.connection.database_connection_abc.DatabaseConnectionABC.connect" title="Permalink to this definition">¶</a></dt>
|
||||
|
5
docs/build/html/cpl.database.context.html
vendored
5
docs/build/html/cpl.database.context.html
vendored
@ -189,6 +189,10 @@
|
||||
<dt id="cpl.database.context.database_context.DatabaseContext">
|
||||
<em class="property"><span class="pre">class</span> </em><code class="sig-prename descclassname"><span class="pre">cpl.database.context.database_context.</span></code><code class="sig-name descname"><span class="pre">DatabaseContext</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">database_settings</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><a class="reference internal" href="cpl.database.html#cpl.database.database_settings.DatabaseSettings" title="cpl.database.database_settings.DatabaseSettings"><span class="pre">cpl.database.database_settings.DatabaseSettings</span></a></span></em><span class="sig-paren">)</span><a class="headerlink" href="#cpl.database.context.database_context.DatabaseContext" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Bases: <a class="reference internal" href="#cpl.database.context.database_context_abc.DatabaseContextABC" title="cpl.database.context.database_context_abc.DatabaseContextABC"><code class="xref py py-class docutils literal notranslate"><span class="pre">cpl.database.context.database_context_abc.DatabaseContextABC</span></code></a></p>
|
||||
<p>Representation of the database context</p>
|
||||
<blockquote>
|
||||
<div><p>database_settings: <a class="reference internal" href="cpl.database.html#cpl.database.database_settings.DatabaseSettings" title="cpl.database.database_settings.DatabaseSettings"><code class="xref py py-class docutils literal notranslate"><span class="pre">cpl.database.database_settings.DatabaseSettings</span></code></a></p>
|
||||
</div></blockquote>
|
||||
<dl class="py method">
|
||||
<dt id="cpl.database.context.database_context.DatabaseContext.connect">
|
||||
<code class="sig-name descname"><span class="pre">connect</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">connection_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.database.context.database_context.DatabaseContext.connect" title="Permalink to this definition">¶</a></dt>
|
||||
@ -226,6 +230,7 @@
|
||||
<dt id="cpl.database.context.database_context_abc.DatabaseContextABC">
|
||||
<em class="property"><span class="pre">class</span> </em><code class="sig-prename descclassname"><span class="pre">cpl.database.context.database_context_abc.</span></code><code class="sig-name descname"><span class="pre">DatabaseContextABC</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.database.context.database_context_abc.DatabaseContextABC" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">abc.ABC</span></code></p>
|
||||
<p>ABC for the <a class="reference internal" href="#cpl.database.context.database_context.DatabaseContext" title="cpl.database.context.database_context.DatabaseContext"><code class="xref py py-class docutils literal notranslate"><span class="pre">cpl.database.context.database_context.DatabaseContext</span></code></a></p>
|
||||
<dl class="py method">
|
||||
<dt id="cpl.database.context.database_context_abc.DatabaseContextABC.connect">
|
||||
<em class="property"><span class="pre">abstract</span> </em><code class="sig-name descname"><span class="pre">connect</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">connection_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.database.context.database_context_abc.DatabaseContextABC.connect" title="Permalink to this definition">¶</a></dt>
|
||||
|
1
docs/build/html/cpl.database.html
vendored
1
docs/build/html/cpl.database.html
vendored
@ -203,6 +203,7 @@
|
||||
<dt id="cpl.database.database_settings.DatabaseSettings">
|
||||
<em class="property"><span class="pre">class</span> </em><code class="sig-prename descclassname"><span class="pre">cpl.database.database_settings.</span></code><code class="sig-name descname"><span class="pre">DatabaseSettings</span></code><a class="headerlink" href="#cpl.database.database_settings.DatabaseSettings" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Bases: <a class="reference internal" href="cpl.configuration.html#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>
|
||||
<p>Represents settings for the database connection</p>
|
||||
<dl class="py method">
|
||||
<dt id="cpl.database.database_settings.DatabaseSettings.auth_plugin">
|
||||
<em class="property"><span class="pre">property</span> </em><code class="sig-name descname"><span class="pre">auth_plugin</span></code><a class="headerlink" href="#cpl.database.database_settings.DatabaseSettings.auth_plugin" title="Permalink to this definition">¶</a></dt>
|
||||
|
146
docs/build/html/cpl.dependency_injection.html
vendored
146
docs/build/html/cpl.dependency_injection.html
vendored
@ -183,13 +183,15 @@
|
||||
<dt id="cpl.dependency_injection.service_collection.ServiceCollection">
|
||||
<em class="property"><span class="pre">class</span> </em><code class="sig-prename descclassname"><span class="pre">cpl.dependency_injection.service_collection.</span></code><code class="sig-name descname"><span class="pre">ServiceCollection</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">config</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><a class="reference internal" href="cpl.configuration.html#cpl.configuration.configuration_abc.ConfigurationABC" title="cpl.configuration.configuration_abc.ConfigurationABC"><span class="pre">cpl.configuration.configuration_abc.ConfigurationABC</span></a></span></em><span class="sig-paren">)</span><a class="headerlink" href="#cpl.dependency_injection.service_collection.ServiceCollection" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Bases: <a class="reference internal" href="#cpl.dependency_injection.service_collection_abc.ServiceCollectionABC" title="cpl.dependency_injection.service_collection_abc.ServiceCollectionABC"><code class="xref py py-class docutils literal notranslate"><span class="pre">cpl.dependency_injection.service_collection_abc.ServiceCollectionABC</span></code></a></p>
|
||||
<p>Representation of the collection of services</p>
|
||||
<dl class="py method">
|
||||
<dt id="cpl.dependency_injection.service_collection.ServiceCollection.add_db_context">
|
||||
<code class="sig-name descname"><span class="pre">add_db_context</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">db_context_type</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">Type</span><span class="p"><span class="pre">[</span></span><a class="reference internal" href="cpl.database.context.html#cpl.database.context.database_context_abc.DatabaseContextABC" title="cpl.database.context.database_context_abc.DatabaseContextABC"><span class="pre">cpl.database.context.database_context_abc.DatabaseContextABC</span></a><span class="p"><span class="pre">]</span></span></span></em>, <em class="sig-param"><span class="n"><span class="pre">db_settings</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><a class="reference internal" href="cpl.database.html#cpl.database.database_settings.DatabaseSettings" title="cpl.database.database_settings.DatabaseSettings"><span class="pre">cpl.database.database_settings.DatabaseSettings</span></a></span></em><span class="sig-paren">)</span><a class="headerlink" href="#cpl.dependency_injection.service_collection.ServiceCollection.add_db_context" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Adds database context
|
||||
:param db_context:
|
||||
:param db_settings:
|
||||
:return:</p>
|
||||
<dd><p>Adds database context</p>
|
||||
<blockquote>
|
||||
<div><p>db_context: Type[<a class="reference internal" href="cpl.database.context.html#cpl.database.context.database_context_abc.DatabaseContextABC" title="cpl.database.context.database_context_abc.DatabaseContextABC"><code class="xref py py-class docutils literal notranslate"><span class="pre">cpl.database.context.database_context_abc.DatabaseContextABC</span></code></a>]
|
||||
db_settings: <a class="reference internal" href="cpl.database.html#cpl.database.database_settings.DatabaseSettings" title="cpl.database.database_settings.DatabaseSettings"><code class="xref py py-class docutils literal notranslate"><span class="pre">cpl.database.database_settings.DatabaseSettings</span></code></a></p>
|
||||
</div></blockquote>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
@ -201,34 +203,40 @@
|
||||
<dl class="py method">
|
||||
<dt id="cpl.dependency_injection.service_collection.ServiceCollection.add_scoped">
|
||||
<code class="sig-name descname"><span class="pre">add_scoped</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">service_type</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">Type</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">service</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">Callable</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.dependency_injection.service_collection.ServiceCollection.add_scoped" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Adds a service with scoped lifetime
|
||||
:param service_type:
|
||||
:param service:
|
||||
:return:</p>
|
||||
<dd><p>Adds a service with scoped lifetime</p>
|
||||
<blockquote>
|
||||
<div><p>service_type: <code class="xref py py-class docutils literal notranslate"><span class="pre">Type</span></code>
|
||||
service: <code class="xref py py-class docutils literal notranslate"><span class="pre">Callable</span></code></p>
|
||||
</div></blockquote>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="cpl.dependency_injection.service_collection.ServiceCollection.add_singleton">
|
||||
<code class="sig-name descname"><span class="pre">add_singleton</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">service_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">type</span><span class="p"><span class="pre">,</span> </span><span class="pre">object</span><span class="p"><span class="pre">]</span></span></span></em>, <em class="sig-param"><span class="n"><span class="pre">service</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">type</span><span class="p"><span class="pre">,</span> </span><span class="pre">object</span><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><span class="sig-paren">)</span><a class="headerlink" href="#cpl.dependency_injection.service_collection.ServiceCollection.add_singleton" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Adds a service with singleton lifetime
|
||||
:param service_type:
|
||||
:param service:
|
||||
:return:</p>
|
||||
<dd><p>Adds a service with singleton lifetime</p>
|
||||
<blockquote>
|
||||
<div><p>service_type: <code class="xref py py-class docutils literal notranslate"><span class="pre">Type</span></code>
|
||||
service: <code class="xref py py-class docutils literal notranslate"><span class="pre">Callable</span></code></p>
|
||||
</div></blockquote>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="cpl.dependency_injection.service_collection.ServiceCollection.add_transient">
|
||||
<code class="sig-name descname"><span class="pre">add_transient</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">service_type</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">type</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">service</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">type</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.dependency_injection.service_collection.ServiceCollection.add_transient" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Adds a service with transient lifetime
|
||||
:param service_type:
|
||||
:param service:
|
||||
:return:</p>
|
||||
<dd><p>Adds a service with transient lifetime</p>
|
||||
<blockquote>
|
||||
<div><p>service_type: <code class="xref py py-class docutils literal notranslate"><span class="pre">Type</span></code>
|
||||
service: <code class="xref py py-class docutils literal notranslate"><span class="pre">Callable</span></code></p>
|
||||
</div></blockquote>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="cpl.dependency_injection.service_collection.ServiceCollection.build_service_provider">
|
||||
<code class="sig-name descname"><span class="pre">build_service_provider</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span> → <a class="reference internal" href="#cpl.dependency_injection.service_provider_abc.ServiceProviderABC" title="cpl.dependency_injection.service_provider_abc.ServiceProviderABC"><span class="pre">cpl.dependency_injection.service_provider_abc.ServiceProviderABC</span></a><a class="headerlink" href="#cpl.dependency_injection.service_collection.ServiceCollection.build_service_provider" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Creates instance of the service provider</p>
|
||||
<blockquote>
|
||||
<div><p>Object of type <a class="reference internal" href="#cpl.dependency_injection.service_provider_abc.ServiceProviderABC" title="cpl.dependency_injection.service_provider_abc.ServiceProviderABC"><code class="xref py py-class docutils literal notranslate"><span class="pre">cpl.dependency_injection.service_provider_abc.ServiceProviderABC</span></code></a></p>
|
||||
</div></blockquote>
|
||||
</dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
@ -240,13 +248,15 @@
|
||||
<dt id="cpl.dependency_injection.service_collection_abc.ServiceCollectionABC">
|
||||
<em class="property"><span class="pre">class</span> </em><code class="sig-prename descclassname"><span class="pre">cpl.dependency_injection.service_collection_abc.</span></code><code class="sig-name descname"><span class="pre">ServiceCollectionABC</span></code><a class="headerlink" href="#cpl.dependency_injection.service_collection_abc.ServiceCollectionABC" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">abc.ABC</span></code></p>
|
||||
<p>ABC for the class <a class="reference internal" href="#cpl.dependency_injection.service_collection.ServiceCollection" title="cpl.dependency_injection.service_collection.ServiceCollection"><code class="xref py py-class docutils literal notranslate"><span class="pre">cpl.dependency_injection.service_collection.ServiceCollection</span></code></a></p>
|
||||
<dl class="py method">
|
||||
<dt id="cpl.dependency_injection.service_collection_abc.ServiceCollectionABC.add_db_context">
|
||||
<em class="property"><span class="pre">abstract</span> </em><code class="sig-name descname"><span class="pre">add_db_context</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">db_context</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">Type</span><span class="p"><span class="pre">[</span></span><a class="reference internal" href="cpl.database.context.html#cpl.database.context.database_context_abc.DatabaseContextABC" title="cpl.database.context.database_context_abc.DatabaseContextABC"><span class="pre">cpl.database.context.database_context_abc.DatabaseContextABC</span></a><span class="p"><span class="pre">]</span></span></span></em>, <em class="sig-param"><span class="n"><span class="pre">db_settings</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><a class="reference internal" href="cpl.database.html#cpl.database.database_settings.DatabaseSettings" title="cpl.database.database_settings.DatabaseSettings"><span class="pre">cpl.database.database_settings.DatabaseSettings</span></a></span></em><span class="sig-paren">)</span><a class="headerlink" href="#cpl.dependency_injection.service_collection_abc.ServiceCollectionABC.add_db_context" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Adds database context
|
||||
:param db_context:
|
||||
:param db_settings:
|
||||
:return:</p>
|
||||
<dd><p>Adds database context</p>
|
||||
<blockquote>
|
||||
<div><p>db_context: Type[<a class="reference internal" href="cpl.database.context.html#cpl.database.context.database_context_abc.DatabaseContextABC" title="cpl.database.context.database_context_abc.DatabaseContextABC"><code class="xref py py-class docutils literal notranslate"><span class="pre">cpl.database.context.database_context_abc.DatabaseContextABC</span></code></a>]
|
||||
db_settings: <a class="reference internal" href="cpl.database.html#cpl.database.database_settings.DatabaseSettings" title="cpl.database.database_settings.DatabaseSettings"><code class="xref py py-class docutils literal notranslate"><span class="pre">cpl.database.database_settings.DatabaseSettings</span></code></a></p>
|
||||
</div></blockquote>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
@ -258,34 +268,40 @@
|
||||
<dl class="py method">
|
||||
<dt id="cpl.dependency_injection.service_collection_abc.ServiceCollectionABC.add_scoped">
|
||||
<em class="property"><span class="pre">abstract</span> </em><code class="sig-name descname"><span class="pre">add_scoped</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">service_type</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">Type</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">service</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">collections.abc.Callable</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.dependency_injection.service_collection_abc.ServiceCollectionABC.add_scoped" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Adds a service with scoped lifetime
|
||||
:param service_type:
|
||||
:param service:
|
||||
:return:</p>
|
||||
<dd><p>Adds a service with scoped lifetime</p>
|
||||
<blockquote>
|
||||
<div><p>service_type: <code class="xref py py-class docutils literal notranslate"><span class="pre">Type</span></code>
|
||||
service: <code class="xref py py-class docutils literal notranslate"><span class="pre">Callable</span></code></p>
|
||||
</div></blockquote>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="cpl.dependency_injection.service_collection_abc.ServiceCollectionABC.add_singleton">
|
||||
<em class="property"><span class="pre">abstract</span> </em><code class="sig-name descname"><span class="pre">add_singleton</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">service_type</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">Type</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">service</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">collections.abc.Callable</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.dependency_injection.service_collection_abc.ServiceCollectionABC.add_singleton" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Adds a service with singleton lifetime
|
||||
:param service_type:
|
||||
:param service:
|
||||
:return:</p>
|
||||
<dd><p>Adds a service with singleton lifetime</p>
|
||||
<blockquote>
|
||||
<div><p>service_type: <code class="xref py py-class docutils literal notranslate"><span class="pre">Type</span></code>
|
||||
service: <code class="xref py py-class docutils literal notranslate"><span class="pre">Callable</span></code></p>
|
||||
</div></blockquote>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="cpl.dependency_injection.service_collection_abc.ServiceCollectionABC.add_transient">
|
||||
<em class="property"><span class="pre">abstract</span> </em><code class="sig-name descname"><span class="pre">add_transient</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">service_type</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">Type</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">service</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">collections.abc.Callable</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.dependency_injection.service_collection_abc.ServiceCollectionABC.add_transient" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Adds a service with transient lifetime
|
||||
:param service_type:
|
||||
:param service:
|
||||
:return:</p>
|
||||
<dd><p>Adds a service with transient lifetime</p>
|
||||
<blockquote>
|
||||
<div><p>service_type: <code class="xref py py-class docutils literal notranslate"><span class="pre">Type</span></code>
|
||||
service: <code class="xref py py-class docutils literal notranslate"><span class="pre">Callable</span></code></p>
|
||||
</div></blockquote>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="cpl.dependency_injection.service_collection_abc.ServiceCollectionABC.build_service_provider">
|
||||
<em class="property"><span class="pre">abstract</span> </em><code class="sig-name descname"><span class="pre">build_service_provider</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span> → <a class="reference internal" href="#cpl.dependency_injection.service_provider_abc.ServiceProviderABC" title="cpl.dependency_injection.service_provider_abc.ServiceProviderABC"><span class="pre">cpl.dependency_injection.service_provider_abc.ServiceProviderABC</span></a><a class="headerlink" href="#cpl.dependency_injection.service_collection_abc.ServiceCollectionABC.build_service_provider" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Creates instance of the service provider</p>
|
||||
<blockquote>
|
||||
<div><p>Object of type <a class="reference internal" href="#cpl.dependency_injection.service_provider_abc.ServiceProviderABC" title="cpl.dependency_injection.service_provider_abc.ServiceProviderABC"><code class="xref py py-class docutils literal notranslate"><span class="pre">cpl.dependency_injection.service_provider_abc.ServiceProviderABC</span></code></a></p>
|
||||
</div></blockquote>
|
||||
</dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
@ -297,6 +313,11 @@
|
||||
<dt id="cpl.dependency_injection.service_descriptor.ServiceDescriptor">
|
||||
<em class="property"><span class="pre">class</span> </em><code class="sig-prename descclassname"><span class="pre">cpl.dependency_injection.service_descriptor.</span></code><code class="sig-name descname"><span class="pre">ServiceDescriptor</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">implementation</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">type</span><span class="p"><span class="pre">,</span> </span><span class="pre">object</span><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">]</span></span></span></em>, <em class="sig-param"><span class="n"><span class="pre">lifetime</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><a class="reference internal" href="#cpl.dependency_injection.service_lifetime_enum.ServiceLifetimeEnum" title="cpl.dependency_injection.service_lifetime_enum.ServiceLifetimeEnum"><span class="pre">cpl.dependency_injection.service_lifetime_enum.ServiceLifetimeEnum</span></a></span></em><span class="sig-paren">)</span><a class="headerlink" href="#cpl.dependency_injection.service_descriptor.ServiceDescriptor" 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>
|
||||
<p>Descriptor of a service</p>
|
||||
<blockquote>
|
||||
<div><p>implementation: Union[<code class="xref py py-class docutils literal notranslate"><span class="pre">type</span></code>, Optional[<code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code>]]
|
||||
lifetime: <a class="reference internal" href="#cpl.dependency_injection.service_lifetime_enum.ServiceLifetimeEnum" title="cpl.dependency_injection.service_lifetime_enum.ServiceLifetimeEnum"><code class="xref py py-class docutils literal notranslate"><span class="pre">cpl.dependency_injection.service_lifetime_enum.ServiceLifetimeEnum</span></code></a></p>
|
||||
</div></blockquote>
|
||||
<dl class="py method">
|
||||
<dt id="cpl.dependency_injection.service_descriptor.ServiceDescriptor.implementation">
|
||||
<em class="property"><span class="pre">property</span> </em><code class="sig-name descname"><span class="pre">implementation</span></code><a class="headerlink" href="#cpl.dependency_injection.service_descriptor.ServiceDescriptor.implementation" title="Permalink to this definition">¶</a></dt>
|
||||
@ -346,20 +367,40 @@
|
||||
<dt id="cpl.dependency_injection.service_provider.ServiceProvider">
|
||||
<em class="property"><span class="pre">class</span> </em><code class="sig-prename descclassname"><span class="pre">cpl.dependency_injection.service_provider.</span></code><code class="sig-name descname"><span class="pre">ServiceProvider</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">service_descriptors</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">config</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><a class="reference internal" href="cpl.configuration.html#cpl.configuration.configuration_abc.ConfigurationABC" title="cpl.configuration.configuration_abc.ConfigurationABC"><span class="pre">cpl.configuration.configuration_abc.ConfigurationABC</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">db_context</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><a class="reference internal" href="cpl.database.context.html#cpl.database.context.database_context_abc.DatabaseContextABC" title="cpl.database.context.database_context_abc.DatabaseContextABC"><span class="pre">cpl.database.context.database_context_abc.DatabaseContextABC</span></a><span class="p"><span class="pre">]</span></span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#cpl.dependency_injection.service_provider.ServiceProvider" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Bases: <a class="reference internal" href="#cpl.dependency_injection.service_provider_abc.ServiceProviderABC" title="cpl.dependency_injection.service_provider_abc.ServiceProviderABC"><code class="xref py py-class docutils literal notranslate"><span class="pre">cpl.dependency_injection.service_provider_abc.ServiceProviderABC</span></code></a></p>
|
||||
<p>Provider for the services</p>
|
||||
<blockquote>
|
||||
<div><p>service_descriptors: list[<a class="reference internal" href="#cpl.dependency_injection.service_descriptor.ServiceDescriptor" title="cpl.dependency_injection.service_descriptor.ServiceDescriptor"><code class="xref py py-class docutils literal notranslate"><span class="pre">cpl.dependency_injection.service_descriptor.ServiceDescriptor</span></code></a>]
|
||||
config: <a class="reference internal" href="cpl.configuration.html#cpl.configuration.configuration_abc.ConfigurationABC" title="cpl.configuration.configuration_abc.ConfigurationABC"><code class="xref py py-class docutils literal notranslate"><span class="pre">cpl.configuration.configuration_abc.ConfigurationABC</span></code></a>
|
||||
db_context: Optional[<a class="reference internal" href="cpl.database.context.html#cpl.database.context.database_context_abc.DatabaseContextABC" title="cpl.database.context.database_context_abc.DatabaseContextABC"><code class="xref py py-class docutils literal notranslate"><span class="pre">cpl.database.context.database_context_abc.DatabaseContextABC</span></code></a>]</p>
|
||||
</div></blockquote>
|
||||
<dl class="py method">
|
||||
<dt id="cpl.dependency_injection.service_provider.ServiceProvider.build_service">
|
||||
<code class="sig-name descname"><span class="pre">build_service</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">service_type</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">type</span></span></em><span class="sig-paren">)</span> → <span class="pre">object</span><a class="headerlink" href="#cpl.dependency_injection.service_provider.ServiceProvider.build_service" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Creates instance of given type
|
||||
:param service_type:
|
||||
:return:</p>
|
||||
<dd><p>Creates instance of given type</p>
|
||||
<blockquote>
|
||||
<div><dl class="simple">
|
||||
<dt>instance_type: <code class="xref py py-class docutils literal notranslate"><span class="pre">Type</span></code></dt><dd><p>The type of the searched instance</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div></blockquote>
|
||||
<blockquote>
|
||||
<div><p>Object of the given type</p>
|
||||
</div></blockquote>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="cpl.dependency_injection.service_provider.ServiceProvider.get_service">
|
||||
<code class="sig-name descname"><span class="pre">get_service</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">service_type</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">type</span></span></em><span class="sig-paren">)</span> → <span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">collections.abc.Callable</span><span class="p"><span class="pre">[</span></span><span class="pre">object</span><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">]</span></span><a class="headerlink" href="#cpl.dependency_injection.service_provider.ServiceProvider.get_service" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Returns instance of given type
|
||||
:param instance_type:
|
||||
:return:</p>
|
||||
<dd><p>Returns instance of given type</p>
|
||||
<blockquote>
|
||||
<div><dl class="simple">
|
||||
<dt>instance_type: <code class="xref py py-class docutils literal notranslate"><span class="pre">Type</span></code></dt><dd><p>The type of the searched instance</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div></blockquote>
|
||||
<blockquote>
|
||||
<div><p>Object of type Optional[Callable[<code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code>]]</p>
|
||||
</div></blockquote>
|
||||
</dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
@ -371,20 +412,35 @@
|
||||
<dt id="cpl.dependency_injection.service_provider_abc.ServiceProviderABC">
|
||||
<em class="property"><span class="pre">class</span> </em><code class="sig-prename descclassname"><span class="pre">cpl.dependency_injection.service_provider_abc.</span></code><code class="sig-name descname"><span class="pre">ServiceProviderABC</span></code><a class="headerlink" href="#cpl.dependency_injection.service_provider_abc.ServiceProviderABC" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">abc.ABC</span></code></p>
|
||||
<p>ABC for the class <a class="reference internal" href="#cpl.dependency_injection.service_provider.ServiceProvider" title="cpl.dependency_injection.service_provider.ServiceProvider"><code class="xref py py-class docutils literal notranslate"><span class="pre">cpl.dependency_injection.service_provider.ServiceProvider</span></code></a></p>
|
||||
<dl class="py method">
|
||||
<dt id="cpl.dependency_injection.service_provider_abc.ServiceProviderABC.build_service">
|
||||
<em class="property"><span class="pre">abstract</span> </em><code class="sig-name descname"><span class="pre">build_service</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">service_type</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">type</span></span></em><span class="sig-paren">)</span> → <span class="pre">object</span><a class="headerlink" href="#cpl.dependency_injection.service_provider_abc.ServiceProviderABC.build_service" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Creates instance of given type
|
||||
:param service_type:
|
||||
:return:</p>
|
||||
<em class="property"><span class="pre">abstract</span> </em><code class="sig-name descname"><span class="pre">build_service</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">service_type</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">Type</span></span></em><span class="sig-paren">)</span> → <span class="pre">object</span><a class="headerlink" href="#cpl.dependency_injection.service_provider_abc.ServiceProviderABC.build_service" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Creates instance of given type</p>
|
||||
<blockquote>
|
||||
<div><dl class="simple">
|
||||
<dt>instance_type: <code class="xref py py-class docutils literal notranslate"><span class="pre">Type</span></code></dt><dd><p>The type of the searched instance</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div></blockquote>
|
||||
<blockquote>
|
||||
<div><p>Object of the given type</p>
|
||||
</div></blockquote>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="cpl.dependency_injection.service_provider_abc.ServiceProviderABC.get_service">
|
||||
<em class="property"><span class="pre">abstract</span> </em><code class="sig-name descname"><span class="pre">get_service</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">instance_type</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">Type</span></span></em><span class="sig-paren">)</span> → <span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">collections.abc.Callable</span><span class="p"><span class="pre">[</span></span><span class="pre">object</span><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">]</span></span><a class="headerlink" href="#cpl.dependency_injection.service_provider_abc.ServiceProviderABC.get_service" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Returns instance of given type
|
||||
:param instance_type:
|
||||
:return:</p>
|
||||
<dd><p>Returns instance of given type</p>
|
||||
<blockquote>
|
||||
<div><dl class="simple">
|
||||
<dt>instance_type: <code class="xref py py-class docutils literal notranslate"><span class="pre">Type</span></code></dt><dd><p>The type of the searched instance</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div></blockquote>
|
||||
<blockquote>
|
||||
<div><p>Object of type Optional[Callable[<code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code>]]</p>
|
||||
</div></blockquote>
|
||||
</dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
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
@ -14,6 +14,7 @@ from cpl.utils.credential_manager import CredentialManager
|
||||
|
||||
|
||||
class ServiceCollection(ServiceCollectionABC):
|
||||
r"""Representation of the collection of services"""
|
||||
|
||||
def __init__(self, config: ConfigurationABC):
|
||||
ServiceCollectionABC.__init__(self)
|
||||
|
@ -8,64 +8,67 @@ from cpl.dependency_injection.service_provider_abc import ServiceProviderABC
|
||||
|
||||
|
||||
class ServiceCollectionABC(ABC):
|
||||
r"""ABC for the class :class:`cpl.dependency_injection.service_collection.ServiceCollection`"""
|
||||
|
||||
@abstractmethod
|
||||
def __init__(self):
|
||||
"""
|
||||
ABC for service providing
|
||||
"""
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
def add_db_context(self, db_context: Type[DatabaseContextABC], db_settings: DatabaseSettings):
|
||||
"""
|
||||
Adds database context
|
||||
:param db_context:
|
||||
:param db_settings:
|
||||
:return:
|
||||
r"""Adds database context
|
||||
|
||||
Parameter
|
||||
---------
|
||||
db_context: Type[:class:`cpl.database.context.database_context_abc.DatabaseContextABC`]
|
||||
db_settings: :class:`cpl.database.database_settings.DatabaseSettings`
|
||||
"""
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
def add_logging(self):
|
||||
"""
|
||||
Adds the CPL internal logger
|
||||
"""
|
||||
r"""Adds the CPL internal logger"""
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
def add_transient(self, service_type: Type, service: Callable = None):
|
||||
"""
|
||||
Adds a service with transient lifetime
|
||||
:param service_type:
|
||||
:param service:
|
||||
:return:
|
||||
r"""Adds a service with transient lifetime
|
||||
|
||||
Parameter
|
||||
---------
|
||||
service_type: :class:`Type`
|
||||
service: :class:`Callable`
|
||||
"""
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
def add_scoped(self, service_type: Type, service: Callable = None):
|
||||
"""
|
||||
Adds a service with scoped lifetime
|
||||
:param service_type:
|
||||
:param service:
|
||||
:return:
|
||||
r"""Adds a service with scoped lifetime
|
||||
|
||||
Parameter
|
||||
---------
|
||||
service_type: :class:`Type`
|
||||
service: :class:`Callable`
|
||||
"""
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
def add_singleton(self, service_type: Type, service: Callable = None):
|
||||
"""
|
||||
Adds a service with singleton lifetime
|
||||
:param service_type:
|
||||
:param service:
|
||||
:return:
|
||||
r"""Adds a service with singleton lifetime
|
||||
|
||||
Parameter
|
||||
---------
|
||||
service_type: :class:`Type`
|
||||
service: :class:`Callable`
|
||||
"""
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
def build_service_provider(self) -> ServiceProviderABC:
|
||||
"""
|
||||
Creates instance of the service provider
|
||||
r"""Creates instance of the service provider
|
||||
|
||||
Returns
|
||||
-------
|
||||
Object of type :class:`cpl.dependency_injection.service_provider_abc.ServiceProviderABC`
|
||||
"""
|
||||
pass
|
||||
|
@ -4,6 +4,13 @@ from cpl.dependency_injection.service_lifetime_enum import ServiceLifetimeEnum
|
||||
|
||||
|
||||
class ServiceDescriptor:
|
||||
r"""Descriptor of a service
|
||||
|
||||
Parameter
|
||||
---------
|
||||
implementation: Union[:class:`type`, Optional[:class:`object`]]
|
||||
lifetime: :class:`cpl.dependency_injection.service_lifetime_enum.ServiceLifetimeEnum`
|
||||
"""
|
||||
|
||||
def __init__(self, implementation: Union[type, Optional[object]], lifetime: ServiceLifetimeEnum):
|
||||
|
||||
|
@ -12,6 +12,14 @@ from cpl.environment.application_environment_abc import ApplicationEnvironmentAB
|
||||
|
||||
|
||||
class ServiceProvider(ServiceProviderABC):
|
||||
r"""Provider for the services
|
||||
|
||||
Parameter
|
||||
---------
|
||||
service_descriptors: list[:class:`cpl.dependency_injection.service_descriptor.ServiceDescriptor`]
|
||||
config: :class:`cpl.configuration.configuration_abc.ConfigurationABC`
|
||||
db_context: Optional[:class:`cpl.database.context.database_context_abc.DatabaseContextABC`]
|
||||
"""
|
||||
|
||||
def __init__(self, service_descriptors: list[ServiceDescriptor], config: ConfigurationABC, db_context: Optional[DatabaseContextABC]):
|
||||
ServiceProviderABC.__init__(self)
|
||||
|
@ -4,28 +4,38 @@ from typing import Type, Optional
|
||||
|
||||
|
||||
class ServiceProviderABC(ABC):
|
||||
r"""ABC for the class :class:`cpl.dependency_injection.service_provider.ServiceProvider`"""
|
||||
|
||||
@abstractmethod
|
||||
def __init__(self):
|
||||
"""
|
||||
ABC for service providing
|
||||
"""
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
def build_service(self, service_type: type) -> object:
|
||||
"""
|
||||
Creates instance of given type
|
||||
:param service_type:
|
||||
:return:
|
||||
def build_service(self, service_type: Type) -> object:
|
||||
r"""Creates instance of given type
|
||||
|
||||
Parameter
|
||||
---------
|
||||
instance_type: :class:`Type`
|
||||
The type of the searched instance
|
||||
|
||||
Returns
|
||||
-------
|
||||
Object of the given type
|
||||
"""
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
def get_service(self, instance_type: Type) -> Optional[Callable[object]]:
|
||||
"""
|
||||
Returns instance of given type
|
||||
:param instance_type:
|
||||
:return:
|
||||
r"""Returns instance of given type
|
||||
|
||||
Parameter
|
||||
---------
|
||||
instance_type: :class:`Type`
|
||||
The type of the searched instance
|
||||
|
||||
Returns
|
||||
-------
|
||||
Object of type Optional[Callable[:class:`object`]]
|
||||
"""
|
||||
pass
|
||||
|
Loading…
Reference in New Issue
Block a user