Files
2026-01-23 17:03:45 +08:00

450 lines
29 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title>libs_pkg package &#8212; PySecondo-API 1.0 documentation</title>
<link rel="stylesheet" href="_static/classic.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="_static/language_data.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">PySecondo-API 1.0 documentation</a> &#187;</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="libs-pkg-package">
<h1>libs_pkg package<a class="headerlink" href="#libs-pkg-package" title="Permalink to this headline"></a></h1>
<div class="section" id="submodules">
<h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this headline"></a></h2>
</div>
<div class="section" id="module-libs_pkg.command_execution">
<span id="libs-pkg-command-execution-module"></span><h2>libs_pkg.command_execution module<a class="headerlink" href="#module-libs_pkg.command_execution" title="Permalink to this headline"></a></h2>
<p>The module command_execution contains three functions to execute three categories of commands and
return the results by calling other functions in other modules that read and parse the results to
proper data structures in python.</p>
<dl class="function">
<dt id="libs_pkg.command_execution.general_command">
<em class="property">async </em><code class="sig-prename descclassname">libs_pkg.command_execution.</code><code class="sig-name descname">general_command</code><span class="sig-paren">(</span><em class="sig-param">reader</em>, <em class="sig-param">writer</em>, <em class="sig-param">bin_list</em>, <em class="sig-param">command</em>, <em class="sig-param">stream_source=None</em><span class="sig-paren">)</span><a class="headerlink" href="#libs_pkg.command_execution.general_command" title="Permalink to this definition"></a></dt>
<dd><p>This function executes the query-commands and returns the result message.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>reader</strong> The stream reader of the Secondo object.</p></li>
<li><p><strong>writer</strong> The stream writer of the Secondo object.</p></li>
<li><p><strong>bin_list</strong> A boolean value for result format of the result list returned from Secondo server.</p></li>
<li><p><strong>command</strong> The command to be executed.</p></li>
<li><p><strong>stream_source</strong> This is an optional parameter given as a list containning the tuples</p></li>
</ul>
</dd>
</dl>
<p>to be sent to Secondo as a stream when the query contains the operator pyreceive[].
:return: The result received from Secondo by calling the function receive_secondo_response().</p>
</dd></dl>
<dl class="function">
<dt id="libs_pkg.command_execution.restore_command">
<em class="property">async </em><code class="sig-prename descclassname">libs_pkg.command_execution.</code><code class="sig-name descname">restore_command</code><span class="sig-paren">(</span><em class="sig-param">reader</em>, <em class="sig-param">writer</em>, <em class="sig-param">bin_list</em>, <em class="sig-param">command</em><span class="sig-paren">)</span><a class="headerlink" href="#libs_pkg.command_execution.restore_command" title="Permalink to this definition"></a></dt>
<dd><p>This function executes the commands containing restore keyword and returns the result message.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>reader</strong> The stream reader of the Secondo object.</p></li>
<li><p><strong>writer</strong> The stream writer of the Secondo object.</p></li>
<li><p><strong>bin_list</strong> A boolean value for result format of the result list returned from Secondo server.</p></li>
<li><p><strong>command</strong> The command to be executed.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>The result received from Secondo by calling the function receive_secondo_response().</p>
</dd>
</dl>
</dd></dl>
<dl class="function">
<dt id="libs_pkg.command_execution.save_command">
<em class="property">async </em><code class="sig-prename descclassname">libs_pkg.command_execution.</code><code class="sig-name descname">save_command</code><span class="sig-paren">(</span><em class="sig-param">reader</em>, <em class="sig-param">writer</em>, <em class="sig-param">bin_list</em>, <em class="sig-param">command</em><span class="sig-paren">)</span><a class="headerlink" href="#libs_pkg.command_execution.save_command" title="Permalink to this definition"></a></dt>
<dd><p>This function executes the commands containing save keyword and returns the result message.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>reader</strong> The stream reader of the Secondo object.</p></li>
<li><p><strong>writer</strong> The stream writer of the Secondo object.</p></li>
<li><p><strong>bin_list</strong> A boolean value for result format of the result list returned from Secondo server.</p></li>
<li><p><strong>command</strong> The command to be executed.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>The result received from Secondo by calling the function receive_secondo_response().</p>
</dd>
</dl>
</dd></dl>
</div>
<div class="section" id="module-libs_pkg.exception_handler">
<span id="libs-pkg-exception-handler-module"></span><h2>libs_pkg.exception_handler module<a class="headerlink" href="#module-libs_pkg.exception_handler" title="Permalink to this headline"></a></h2>
<p>This dictionary contains all error codes and descriptions of errors for Secondo server.</p>
<dl class="exception">
<dt id="libs_pkg.exception_handler.GeneralError">
<em class="property">exception </em><code class="sig-prename descclassname">libs_pkg.exception_handler.</code><code class="sig-name descname">GeneralError</code><span class="sig-paren">(</span><em class="sig-param">error</em>, <em class="sig-param">*args</em><span class="sig-paren">)</span><a class="headerlink" href="#libs_pkg.exception_handler.GeneralError" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">Exception</span></code></p>
<p>This exception class is the base class of all other error exceptions,
used to catch all errors with one single except statement.</p>
<dl class="method">
<dt id="libs_pkg.exception_handler.GeneralError.__init__">
<code class="sig-name descname">__init__</code><span class="sig-paren">(</span><em class="sig-param">error</em>, <em class="sig-param">*args</em><span class="sig-paren">)</span><a class="headerlink" href="#libs_pkg.exception_handler.GeneralError.__init__" title="Permalink to this definition"></a></dt>
<dd><p>Initialize self. See help(type(self)) for accurate signature.</p>
</dd></dl>
</dd></dl>
<dl class="exception">
<dt id="libs_pkg.exception_handler.SecondoAPI_Error">
<em class="property">exception </em><code class="sig-prename descclassname">libs_pkg.exception_handler.</code><code class="sig-name descname">SecondoAPI_Error</code><span class="sig-paren">(</span><em class="sig-param">error</em>, <em class="sig-param">*args</em><span class="sig-paren">)</span><a class="headerlink" href="#libs_pkg.exception_handler.SecondoAPI_Error" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#libs_pkg.exception_handler.GeneralError" title="libs_pkg.exception_handler.GeneralError"><code class="xref py py-class docutils literal notranslate"><span class="pre">libs_pkg.exception_handler.GeneralError</span></code></a></p>
<p>The class that is responsible for raising Exception for errors that are related
to the PySecondo interface rather than the database itself.</p>
<dl class="method">
<dt id="libs_pkg.exception_handler.SecondoAPI_Error.__init__">
<code class="sig-name descname">__init__</code><span class="sig-paren">(</span><em class="sig-param">error</em>, <em class="sig-param">*args</em><span class="sig-paren">)</span><a class="headerlink" href="#libs_pkg.exception_handler.SecondoAPI_Error.__init__" title="Permalink to this definition"></a></dt>
<dd><p>Initialize self. See help(type(self)) for accurate signature.</p>
</dd></dl>
</dd></dl>
<dl class="exception">
<dt id="libs_pkg.exception_handler.SecondoError">
<em class="property">exception </em><code class="sig-prename descclassname">libs_pkg.exception_handler.</code><code class="sig-name descname">SecondoError</code><span class="sig-paren">(</span><em class="sig-param">error</em>, <em class="sig-param">*args</em><span class="sig-paren">)</span><a class="headerlink" href="#libs_pkg.exception_handler.SecondoError" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#libs_pkg.exception_handler.GeneralError" title="libs_pkg.exception_handler.GeneralError"><code class="xref py py-class docutils literal notranslate"><span class="pre">libs_pkg.exception_handler.GeneralError</span></code></a></p>
<p>The class that is responsible for raising Exception for errors that are related to the database.</p>
<dl class="method">
<dt id="libs_pkg.exception_handler.SecondoError.__init__">
<code class="sig-name descname">__init__</code><span class="sig-paren">(</span><em class="sig-param">error</em>, <em class="sig-param">*args</em><span class="sig-paren">)</span><a class="headerlink" href="#libs_pkg.exception_handler.SecondoError.__init__" title="Permalink to this definition"></a></dt>
<dd><p>Initialize self. See help(type(self)) for accurate signature.</p>
</dd></dl>
</dd></dl>
<dl class="exception">
<dt id="libs_pkg.exception_handler.UnexpectedSystemError">
<em class="property">exception </em><code class="sig-prename descclassname">libs_pkg.exception_handler.</code><code class="sig-name descname">UnexpectedSystemError</code><span class="sig-paren">(</span><em class="sig-param">error</em>, <em class="sig-param">*args</em><span class="sig-paren">)</span><a class="headerlink" href="#libs_pkg.exception_handler.UnexpectedSystemError" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#libs_pkg.exception_handler.SecondoError" title="libs_pkg.exception_handler.SecondoError"><code class="xref py py-class docutils literal notranslate"><span class="pre">libs_pkg.exception_handler.SecondoError</span></code></a></p>
<p>The class that is responsible for raising Exception for errors that are related to the databases operation
e.g. an unexpected disconnect, the data source name not found,
a transaction could not be processed, a memory allocation error, etc.</p>
<dl class="method">
<dt id="libs_pkg.exception_handler.UnexpectedSystemError.__init__">
<code class="sig-name descname">__init__</code><span class="sig-paren">(</span><em class="sig-param">error</em>, <em class="sig-param">*args</em><span class="sig-paren">)</span><a class="headerlink" href="#libs_pkg.exception_handler.UnexpectedSystemError.__init__" title="Permalink to this definition"></a></dt>
<dd><p>Initialize self. See help(type(self)) for accurate signature.</p>
</dd></dl>
</dd></dl>
</div>
<div class="section" id="module-libs_pkg.nested_list">
<span id="libs-pkg-nested-list-module"></span><h2>libs_pkg.nested_list module<a class="headerlink" href="#module-libs_pkg.nested_list" title="Permalink to this headline"></a></h2>
<dl class="function">
<dt id="libs_pkg.nested_list.change_nl_item_type">
<code class="sig-prename descclassname">libs_pkg.nested_list.</code><code class="sig-name descname">change_nl_item_type</code><span class="sig-paren">(</span><em class="sig-param">seq</em><span class="sig-paren">)</span><a class="headerlink" href="#libs_pkg.nested_list.change_nl_item_type" title="Permalink to this definition"></a></dt>
<dd><p>The function change_nl_item_type() modifies the type of string items in a nested list to proper types in python according to their values.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>seq</strong> An iterable data structure like nested list.</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>The modified iterable.</p>
</dd>
</dl>
</dd></dl>
<dl class="function">
<dt id="libs_pkg.nested_list.change_nl_item_val">
<code class="sig-prename descclassname">libs_pkg.nested_list.</code><code class="sig-name descname">change_nl_item_val</code><span class="sig-paren">(</span><em class="sig-param">seq</em>, <em class="sig-param">what</em>, <em class="sig-param">make</em><span class="sig-paren">)</span><a class="headerlink" href="#libs_pkg.nested_list.change_nl_item_val" title="Permalink to this definition"></a></dt>
<dd><p>The function change_nl_item_val updates the value of a specific item in a nested list with
unknown depth and structure to another given value.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>seq</strong> An iterable data structure like nested list.</p></li>
<li><p><strong>what</strong> The value that should be modified.</p></li>
<li><p><strong>make</strong> The vlue that should replace the original value.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>The modified iterable.</p>
</dd>
</dl>
</dd></dl>
<dl class="function">
<dt id="libs_pkg.nested_list.change_nl_text_form">
<code class="sig-prename descclassname">libs_pkg.nested_list.</code><code class="sig-name descname">change_nl_text_form</code><span class="sig-paren">(</span><em class="sig-param">seq</em><span class="sig-paren">)</span><a class="headerlink" href="#libs_pkg.nested_list.change_nl_text_form" title="Permalink to this definition"></a></dt>
<dd><p>The function change_nl_text_form() modifies the value of items of type text in a nested list with form <a href="#id1"><span class="problematic" id="id2">**</span></a><a href="#id3"><span class="problematic" id="id4">**</span></a> to &lt;text&gt;****&lt;/text—&gt; form.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>seq</strong> An iterable data structure like nested list.</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>The modified iterable.</p>
</dd>
</dl>
</dd></dl>
<dl class="class">
<dt id="libs_pkg.nested_list.dbl_quot">
<em class="property">class </em><code class="sig-prename descclassname">libs_pkg.nested_list.</code><code class="sig-name descname">dbl_quot</code><a class="headerlink" href="#libs_pkg.nested_list.dbl_quot" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></p>
</dd></dl>
<dl class="function">
<dt id="libs_pkg.nested_list.item_type">
<code class="sig-prename descclassname">libs_pkg.nested_list.</code><code class="sig-name descname">item_type</code><span class="sig-paren">(</span><em class="sig-param">item</em><span class="sig-paren">)</span><a class="headerlink" href="#libs_pkg.nested_list.item_type" title="Permalink to this definition"></a></dt>
<dd><p>The function item_type() detect the type of an item in a pythonic list and maps it to a secondo data type.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>item</strong> An elemt in an iterable like a nested list.</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>The relevant data type in Secondo nested lists as a string.</p>
</dd>
</dl>
</dd></dl>
<dl class="function">
<dt id="libs_pkg.nested_list.nl_parse">
<code class="sig-prename descclassname">libs_pkg.nested_list.</code><code class="sig-name descname">nl_parse</code><span class="sig-paren">(</span><em class="sig-param">content</em>, <em class="sig-param">ftype</em><span class="sig-paren">)</span><a class="headerlink" href="#libs_pkg.nested_list.nl_parse" title="Permalink to this definition"></a></dt>
<dd><p>The function nl_parse() parses a Secondo NestedList to a Python Nestedlist.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>content</strong> The nested list to be parsed.</p></li>
<li><p><strong>ftype</strong> A boolean value which tells if the first parameter is a string containing the nested list(False) or a file name(True).</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>The python nested list.</p>
</dd>
</dl>
</dd></dl>
<dl class="function">
<dt id="libs_pkg.nested_list.nl_to_String">
<code class="sig-prename descclassname">libs_pkg.nested_list.</code><code class="sig-name descname">nl_to_String</code><span class="sig-paren">(</span><em class="sig-param">NL</em><span class="sig-paren">)</span><a class="headerlink" href="#libs_pkg.nested_list.nl_to_String" title="Permalink to this definition"></a></dt>
<dd><p>The function nl_to_String() converts a pythonic nested list to a textual nestedlist with nested parenthesis that matches the nested list format in Secondo.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>NL</strong> The nested list to be changed.</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>The Secondo nested list.</p>
</dd>
</dl>
</dd></dl>
</div>
<div class="section" id="module-libs_pkg.read_binary_format">
<span id="libs-pkg-read-binary-format-module"></span><h2>libs_pkg.read_binary_format module<a class="headerlink" href="#module-libs_pkg.read_binary_format" title="Permalink to this headline"></a></h2>
<p>The module read_binary_format defines the function that reads
the stream of data from Secondo server which contains the result
of commands/ queries in binary format and decodes them to textual format.</p>
<dl class="function">
<dt id="libs_pkg.read_binary_format.binary_decode">
<em class="property">async </em><code class="sig-prename descclassname">libs_pkg.read_binary_format.</code><code class="sig-name descname">binary_decode</code><span class="sig-paren">(</span><em class="sig-param">reader</em><span class="sig-paren">)</span><a class="headerlink" href="#libs_pkg.read_binary_format.binary_decode" title="Permalink to this definition"></a></dt>
<dd><p>This function binary_decode() reads a binary byte from stream of data from Secondo server
which contains the result of commands/ queries in binary format. The read byte represents
the type of next element in the stream. The function then decodes the element to textual format according
to read type.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>reader</strong> The stream reader of the Secondo object that receives the result from Secondo Server.</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>The decoded element in the result list.</p>
</dd>
</dl>
</dd></dl>
</div>
<div class="section" id="module-libs_pkg.secondo_results">
<span id="libs-pkg-secondo-results-module"></span><h2>libs_pkg.secondo_results module<a class="headerlink" href="#module-libs_pkg.secondo_results" title="Permalink to this headline"></a></h2>
<p>The module secondo_results contains two functions for receiving the results from Secondo
and decoding the result to textual format if the default seocndo result format is binary.</p>
<dl class="function">
<dt id="libs_pkg.secondo_results.receive_query_result_list">
<em class="property">async </em><code class="sig-prename descclassname">libs_pkg.secondo_results.</code><code class="sig-name descname">receive_query_result_list</code><span class="sig-paren">(</span><em class="sig-param">reader</em>, <em class="sig-param">final_token</em>, <em class="sig-param">bin_list</em><span class="sig-paren">)</span><a class="headerlink" href="#libs_pkg.secondo_results.receive_query_result_list" title="Permalink to this definition"></a></dt>
<dd><p>The function receive_query_result_list() reads the result list after execution of
commands/ queries from stream reader of the Secondo object until reaching the
final token then stops reading. If the the default seocndo result format is
binary it calls another function for decoding the result to textual format.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>reader</strong> The stream reader of the Secondo object.</p></li>
<li><p><strong>final_token</strong> Stops reading by receiving this element from the stream.</p></li>
<li><p><strong>bin_list</strong> A binary value that defines the default seocndo result format, True when binary and False when textual nested list.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>The result list in textual/ binary format.</p>
</dd>
</dl>
</dd></dl>
<dl class="function">
<dt id="libs_pkg.secondo_results.receive_secondo_response">
<em class="property">async </em><code class="sig-prename descclassname">libs_pkg.secondo_results.</code><code class="sig-name descname">receive_secondo_response</code><span class="sig-paren">(</span><em class="sig-param">reader</em>, <em class="sig-param">bin_list</em><span class="sig-paren">)</span><a class="headerlink" href="#libs_pkg.secondo_results.receive_secondo_response" title="Permalink to this definition"></a></dt>
<dd><p>This function receive_secondo_response() reads the response of the Secondo server after execution of
commands/ queries from stream reader of the Secondo object until reaching specific tags.
It calls the function receive_query_result_list() when receiving the &lt;SecondoResponse&gt; tag to get the actual result list.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>reader</strong> The stream reader of the Secondo object.</p></li>
<li><p><strong>bin_list</strong> A binary value that defines the default seocndo result format, True when binary and False when textual nested list.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>The result list in textual/ binary format.</p>
</dd>
</dl>
</dd></dl>
</div>
<div class="section" id="module-libs_pkg.write_binary_format">
<span id="libs-pkg-write-binary-format-module"></span><h2>libs_pkg.write_binary_format module<a class="headerlink" href="#module-libs_pkg.write_binary_format" title="Permalink to this headline"></a></h2>
<dl class="function">
<dt id="libs_pkg.write_binary_format.binary_encode">
<em class="property">async </em><code class="sig-prename descclassname">libs_pkg.write_binary_format.</code><code class="sig-name descname">binary_encode</code><span class="sig-paren">(</span><em class="sig-param">writer</em>, <em class="sig-param">NL</em><span class="sig-paren">)</span><a class="headerlink" href="#libs_pkg.write_binary_format.binary_encode" title="Permalink to this definition"></a></dt>
<dd><p>The function binary_encode() converts each element of the nested list
to binary format and writes them to the stream writer of Secondo object
which is connected to Secondo server.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>writer</strong> Stream writer of the Secondo object.</p></li>
<li><p><strong>NL</strong> The nested list to be converted.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>True if the conversion is succesful and Flase when not.</p>
</dd>
</dl>
</dd></dl>
<dl class="function">
<dt id="libs_pkg.write_binary_format.binary_type">
<code class="sig-prename descclassname">libs_pkg.write_binary_format.</code><code class="sig-name descname">binary_type</code><span class="sig-paren">(</span><em class="sig-param">item</em><span class="sig-paren">)</span><a class="headerlink" href="#libs_pkg.write_binary_format.binary_type" title="Permalink to this definition"></a></dt>
<dd><p>The function binary_type() returns the aquivalent binary type of the item in a
nested list according to the data types of the nested lists in Secondo.
:param item: An element in nested list.
:return: The binary data type.</p>
</dd></dl>
<dl class="function">
<dt id="libs_pkg.write_binary_format.write_binary_header">
<em class="property">async </em><code class="sig-prename descclassname">libs_pkg.write_binary_format.</code><code class="sig-name descname">write_binary_header</code><span class="sig-paren">(</span><em class="sig-param">writer</em>, <em class="sig-param">NL</em><span class="sig-paren">)</span><a class="headerlink" href="#libs_pkg.write_binary_format.write_binary_header" title="Permalink to this definition"></a></dt>
<dd><p>The function write_binary_header() writes the binary header which contains
signature and version to the stream writer of Secondo object which is
connected to Secondo server and converts each element of the nested list
to binary format by calling the function binary_encode().</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>writer</strong> Stream writer of the Secondo object.</p></li>
<li><p><strong>NL</strong> The nested list to be converted.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>True if the conversion is succesful Flase when not.</p>
</dd>
</dl>
</dd></dl>
</div>
<div class="section" id="module-libs_pkg">
<span id="module-contents"></span><h2>Module contents<a class="headerlink" href="#module-libs_pkg" title="Permalink to this headline"></a></h2>
</div>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<h3><a href="index.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">libs_pkg package</a><ul>
<li><a class="reference internal" href="#submodules">Submodules</a></li>
<li><a class="reference internal" href="#module-libs_pkg.command_execution">libs_pkg.command_execution module</a></li>
<li><a class="reference internal" href="#module-libs_pkg.exception_handler">libs_pkg.exception_handler module</a></li>
<li><a class="reference internal" href="#module-libs_pkg.nested_list">libs_pkg.nested_list module</a></li>
<li><a class="reference internal" href="#module-libs_pkg.read_binary_format">libs_pkg.read_binary_format module</a></li>
<li><a class="reference internal" href="#module-libs_pkg.secondo_results">libs_pkg.secondo_results module</a></li>
<li><a class="reference internal" href="#module-libs_pkg.write_binary_format">libs_pkg.write_binary_format module</a></li>
<li><a class="reference internal" href="#module-libs_pkg">Module contents</a></li>
</ul>
</li>
</ul>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/libs_pkg.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" />
<input type="submit" value="Go" />
</form>
</div>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">PySecondo-API 1.0 documentation</a> &#187;</li>
</ul>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright 2020, Mahsa Davari.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 2.2.0.
</div>
</body>
</html>