| <!-- HTML header for doxygen 1.9.8--> |
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| <html xmlns="http://www.w3.org/1999/xhtml" lang="en-US"> |
| <head> |
| <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> |
| <meta http-equiv="X-UA-Compatible" content="IE=11"/> |
| <meta name="generator" content="Doxygen 1.9.8"/> |
| <meta name="viewport" content="width=device-width, initial-scale=1"/> |
| <title>ResilientDB SDK: ResilientDB SDK</title> |
| <link href="tabs.css" rel="stylesheet" type="text/css"/> |
| <script type="text/javascript" src="jquery.js"></script> |
| <script type="text/javascript" src="dynsections.js"></script> |
| <link href="navtree.css" rel="stylesheet" type="text/css"/> |
| <script type="text/javascript" src="resize.js"></script> |
| <script type="text/javascript" src="navtreedata.js"></script> |
| <script type="text/javascript" src="navtree.js"></script> |
| <link href="search/search.css" rel="stylesheet" type="text/css"/> |
| <script type="text/javascript" src="search/searchdata.js"></script> |
| <script type="text/javascript" src="search/search.js"></script> |
| <link href="doxygen.css" rel="stylesheet" type="text/css" /> |
| <link href="doxygen_html_style.css" rel="stylesheet" type="text/css"/> |
| </head> |
| <body> |
| <div id="top"><!-- do not remove this div, it is closed by doxygen! --> |
| <div id="titlearea"> |
| <table cellspacing="0" cellpadding="0"> |
| <tbody> |
| <tr id="projectrow"> |
| <td id="projectlogo"><img alt="Logo" src="logo.png"/></td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| <!-- end header part --> |
| <!-- Generated by Doxygen 1.9.8 --> |
| <script type="text/javascript"> |
| /* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */ |
| var searchBox = new SearchBox("searchBox", "search/",'.html'); |
| /* @license-end */ |
| </script> |
| <script type="text/javascript" src="menudata.js"></script> |
| <script type="text/javascript" src="menu.js"></script> |
| <script type="text/javascript"> |
| /* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */ |
| $(function() { |
| initMenu('',true,false,'search.php','Search'); |
| $(document).ready(function() { init_search(); }); |
| }); |
| /* @license-end */ |
| </script> |
| <div id="main-nav"></div> |
| </div><!-- top --> |
| <div id="side-nav" class="ui-resizable side-nav-resizable"> |
| <div id="nav-tree"> |
| <div id="nav-tree-contents"> |
| <div id="nav-sync" class="sync"></div> |
| </div> |
| </div> |
| <div id="splitbar" style="-moz-user-select:none;" |
| class="ui-resizable-handle"> |
| </div> |
| </div> |
| <script type="text/javascript"> |
| /* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */ |
| $(document).ready(function(){initNavTree('md__2github_2workspace_2README.html',''); initResizable(); }); |
| /* @license-end */ |
| </script> |
| <div id="doc-content"> |
| <!-- window showing the filter options --> |
| <div id="MSearchSelectWindow" |
| onmouseover="return searchBox.OnSearchSelectShow()" |
| onmouseout="return searchBox.OnSearchSelectHide()" |
| onkeydown="return searchBox.OnSearchSelectKey(event)"> |
| </div> |
| |
| <!-- iframe showing the search results (closed by default) --> |
| <div id="MSearchResultsWindow"> |
| <div id="MSearchResults"> |
| <div class="SRPage"> |
| <div id="SRIndex"> |
| <div id="SRResults"></div> |
| <div class="SRStatus" id="Loading">Loading...</div> |
| <div class="SRStatus" id="Searching">Searching...</div> |
| <div class="SRStatus" id="NoMatches">No Matches</div> |
| </div> |
| </div> |
| </div> |
| </div> |
| |
| <div><div class="header"> |
| <div class="headertitle"><div class="title">ResilientDB SDK</div></div> |
| </div><!--header--> |
| <div class="contents"> |
| <div class="textblock"><p><a class="anchor" id="autotoc_md17"></a> </p> |
| <h1><a class="anchor" id="autotoc_md18"></a> |
| Check Python is up-to-date (3.9+)</h1> |
| <p><code>$ python3 --version</code></p> |
| <p>If your Python version number is too low you may encounter type hinting issues when attempting to run the code. You can use a Python virtual environment, as shown below.</p> |
| <h1><a class="anchor" id="autotoc_md19"></a> |
| First-time set up</h1> |
| <p><code>$ sh INSTALL.sh</code></p> |
| <p><code>$ python3.10 -m venv venv</code></p> |
| <p><code>$ source venv/bin/activate</code></p> |
| <p><code>$ pip install -r requirements.txt</code></p> |
| <p>The correct Python configuration is needed for transaction validation.</p> |
| <h1><a class="anchor" id="autotoc_md20"></a> |
| Running KV service</h1> |
| <p>If your virtual environment is not already active:</p> |
| <p><code>$ source venv/bin/activate</code></p> |
| <p>Run the script to start 4 local nodes</p> |
| <p><code>$ sh service/tools/start_kv_service_sdk.sh</code></p> |
| <h1><a class="anchor" id="autotoc_md21"></a> |
| Running Crow service (HTTP endpoints)</h1> |
| <p><code>$ bazel build service/http_server/crow_service_main</code></p> |
| <p><code>$ bazel-bin/service/http_server/crow_service_main service/tools/config/interface/client.config service/http_server/server_config.config</code></p> |
| <p>For a list of endpoints visit <a class="el" href="md__2github_2workspace_2service_2http__server_2README.html">here</a></p> |
| <h1><a class="anchor" id="autotoc_md22"></a> |
| Testing</h1> |
| <p><code>$ bazel-bin/service/kv_service/kv_service_tools service/tools/config/interface/service.config set test 1234</code></p> |
| <h1><a class="anchor" id="autotoc_md23"></a> |
| Running the driver</h1> |
| <p>Examples of using the driver can be seen in <a href="/test_driver.py">test_driver</a></p> |
| <p>Replace the db_root_url with the address of the ResilientDB HTTP endpoints e.g. <code>127.0.0.1:18000</code></p> |
| <h1><a class="anchor" id="autotoc_md24"></a> |
| TODO</h1> |
| <ul> |
| <li>Setting up linting (using <a href="https://github.com/psf/black">black</a>) through github hooks</li> |
| <li>convert the sdk into a package (for pip install)</li> |
| <li>Potentially have a docker setup which fetched the Resdb image and runs it locally </li> |
| </ul> |
| </div></div><!-- contents --> |
| </div><!-- PageDoc --> |
| </div><!-- doc-content --> |
| <!-- start footer part --> |
| <div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> |
| <ul> |
| <li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.8 </li> |
| </ul> |
| </div> |
| </body> |
| </html> |