Skip to content

Commit 2256897

Browse files
author
Jens Kürten
committed
Deployed 52e97bb with MkDocs version: 1.5.3
1 parent ed5cad6 commit 2256897

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed

getting_started/index.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -675,7 +675,7 @@ <h3 id="file-structure">File structure</h3>
675675
<p>A minimal Function implementation consists of three files:</p>
676676
<ul>
677677
<li><code>environment.yaml</code> describes the environment and the Functions contained in it</li>
678-
<li><code>requirements.txt</code> contains the dependencies of you Functions (usually only contactsoftware-functions)</li>
678+
<li><code>requirements.txt</code> contains the dependencies of your Functions (usually only contactsoftware-functions)</li>
679679
<li><code>mymodule.py</code> a Python file containing the code of your Functions (feel free to pick a different name)</li>
680680
</ul>
681681
<p>Here is the complete structure:</p>
@@ -693,7 +693,7 @@ <h3 id="function-code">Function Code</h3>
693693
<a id="__codelineno-2-5" name="__codelineno-2-5" href="#__codelineno-2-5"></a> <span class="o">...</span>
694694
</code></pre></div>
695695
<p>While you don't have to use type annotations, it is highly recommended because it enables autocomplete in your IDE and helps you spot mistakes faster.
696-
For our example we only need the DocumentReleaseEvent. It contains a list of documents that were released. Typically this will only be a single document, however it is best practices to iterate over all of the documents.</p>
696+
For our example we only need the <a href="../reference/events/#documentreleaseevent">DocumentReleaseEvent</a>. It contains a list of documents that were released. Typically this will only be a single document, however it is best practices to iterate over all of the documents.</p>
697697
<div class="highlight"><span class="filename">mymodule.py</span><pre><span></span><code><a id="__codelineno-3-1" name="__codelineno-3-1" href="#__codelineno-3-1"></a><span class="kn">import</span> <span class="nn">requests</span>
698698
<a id="__codelineno-3-2" name="__codelineno-3-2" href="#__codelineno-3-2"></a><span class="kn">import</span> <span class="nn">json</span>
699699
<a id="__codelineno-3-3" name="__codelineno-3-3" href="#__codelineno-3-3"></a>
@@ -713,6 +713,8 @@ <h3 id="function-code">Function Code</h3>
713713
<a id="__codelineno-3-17" name="__codelineno-3-17" href="#__codelineno-3-17"></a> <span class="k">if</span> <span class="n">res</span><span class="o">.</span><span class="n">status_code</span> <span class="o">!=</span> <span class="mi">200</span><span class="p">:</span>
714714
<a id="__codelineno-3-18" name="__codelineno-3-18" href="#__codelineno-3-18"></a> <span class="k">return</span> <span class="ne">ValueError</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;Failed to upload document to ERP. Got response code </span><span class="si">{</span><span class="n">res</span><span class="o">.</span><span class="n">status_code</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">)</span>
715715
</code></pre></div>
716+
<p>Here we send a payload, containing a few attributes from the released document, to <a href="https://example.com">example.com</a>. This is just for illustration purposes!
717+
Please refer to the documentation of your ERP system on how the request needs to be formatted and which endpoint and credentials to use.</p>
716718
<h3 id="register-the-function">Register the Function</h3>
717719
<p>The Function needs to be registered in the <code>environment.yaml</code>:</p>
718720
<div class="highlight"><span class="filename">environment.yaml</span><pre><span></span><code><a id="__codelineno-4-1" name="__codelineno-4-1" href="#__codelineno-4-1"></a><span class="nt">runtime</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">python3.10</span>

reference/runtime/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -565,7 +565,7 @@
565565
<h1>Python runtime</h1>
566566

567567
<p>This section is aimed at developers that want to build their own Functions-SDK.
568-
If are building Functions with <strong>csfunctions</strong> you can skip this part.</p>
568+
If you are building Functions with <strong>csfunctions</strong> you can skip this part.</p>
569569
<h2 id="architecture">Architecture</h2>
570570
<p>Function environment are docker containers that run in AWS-lambda. The Python runtime utilizes awslambdaric to handle the requests. The Python runtime is part of the CIM Database Cloud Functions infrastructure and currently cannot be customized.</p>
571571
<h2 id="lambda-execute-function-request">Lambda "execute" Function request</h2>
@@ -592,7 +592,7 @@ <h2 id="lambda-execute-function-request">Lambda "execute" Function request</h2>
592592
</code></pre></div></p>
593593
<p>The return value of the execute method is the json encoded response payload.</p>
594594
<h2 id="payloads">Payloads</h2>
595-
<p>The Request and response payloads are described in the CIM Database Cloud documentation. The functions-sdk-python GitHub repository also contains the complete JSON-schema files.</p>
595+
<p>The Request and response payloads are described in the CIM Database Cloud documentation. The <a href="https://github.com/cslab/functions-sdk-python">functions-sdk-python</a> GitHub repository also contains the complete <a href="https://github.com/cslab/functions-sdk-python/tree/main/json_schemas">JSON-schema files</a>.</p>
596596

597597

598598

0 commit comments

Comments
 (0)