1
Fork 0
mirror of https://github.com/pds-nest/nest.git synced 2024-11-29 16:04:18 +00:00
pds-2021-g2-nest/code/backend/docs/_build/html/nest_backend.html
Lorenzo Balugani 6d512c3abe Add sphinx docs
2021-04-26 18:14:53 +02:00

242 lines
No EOL
16 KiB
HTML
Raw 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>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>nest_backend package &#8212; N.E.S.T. Backend documentation</title>
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/alabaster.css" type="text/css" />
<script id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/doctools.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="nest_backend.database package" href="nest_backend.database.html" />
<link rel="prev" title="backend" href="modules.html" />
<link rel="stylesheet" href="_static/custom.css" type="text/css" />
<meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />
</head><body>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="nest-backend-package">
<h1>nest_backend package<a class="headerlink" href="#nest-backend-package" title="Permalink to this headline"></a></h1>
<div class="section" id="subpackages">
<h2>Subpackages<a class="headerlink" href="#subpackages" title="Permalink to this headline"></a></h2>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="nest_backend.database.html">nest_backend.database package</a><ul>
<li class="toctree-l2"><a class="reference internal" href="nest_backend.database.html#subpackages">Subpackages</a><ul>
<li class="toctree-l3"><a class="reference internal" href="nest_backend.database.tables.html">nest_backend.database.tables package</a><ul>
<li class="toctree-l4"><a class="reference internal" href="nest_backend.database.tables.html#submodules">Submodules</a></li>
<li class="toctree-l4"><a class="reference internal" href="nest_backend.database.tables.html#module-nest_backend.database.tables.Alert">nest_backend.database.tables.Alert module</a></li>
<li class="toctree-l4"><a class="reference internal" href="nest_backend.database.tables.html#module-nest_backend.database.tables.Authorization">nest_backend.database.tables.Authorization module</a></li>
<li class="toctree-l4"><a class="reference internal" href="nest_backend.database.tables.html#module-nest_backend.database.tables.BoolOperation">nest_backend.database.tables.BoolOperation module</a></li>
<li class="toctree-l4"><a class="reference internal" href="nest_backend.database.tables.html#module-nest_backend.database.tables.Composed">nest_backend.database.tables.Composed module</a></li>
<li class="toctree-l4"><a class="reference internal" href="nest_backend.database.tables.html#module-nest_backend.database.tables.Condition">nest_backend.database.tables.Condition module</a></li>
<li class="toctree-l4"><a class="reference internal" href="nest_backend.database.tables.html#module-nest_backend.database.tables.Contains">nest_backend.database.tables.Contains module</a></li>
<li class="toctree-l4"><a class="reference internal" href="nest_backend.database.tables.html#module-nest_backend.database.tables.Enums">nest_backend.database.tables.Enums module</a></li>
<li class="toctree-l4"><a class="reference internal" href="nest_backend.database.tables.html#module-nest_backend.database.tables.Notification">nest_backend.database.tables.Notification module</a></li>
<li class="toctree-l4"><a class="reference internal" href="nest_backend.database.tables.html#module-nest_backend.database.tables.Repository">nest_backend.database.tables.Repository module</a></li>
<li class="toctree-l4"><a class="reference internal" href="nest_backend.database.tables.html#module-nest_backend.database.tables.Tweet">nest_backend.database.tables.Tweet module</a></li>
<li class="toctree-l4"><a class="reference internal" href="nest_backend.database.tables.html#module-nest_backend.database.tables.User">nest_backend.database.tables.User module</a></li>
<li class="toctree-l4"><a class="reference internal" href="nest_backend.database.tables.html#module-nest_backend.database.tables.Uses">nest_backend.database.tables.Uses module</a></li>
<li class="toctree-l4"><a class="reference internal" href="nest_backend.database.tables.html#module-nest_backend.database.tables">Module contents</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="nest_backend.database.html#submodules">Submodules</a></li>
<li class="toctree-l2"><a class="reference internal" href="nest_backend.database.html#module-nest_backend.database.base">nest_backend.database.base module</a></li>
<li class="toctree-l2"><a class="reference internal" href="nest_backend.database.html#module-nest_backend.database">Module contents</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="nest_backend.routes.html">nest_backend.routes package</a><ul>
<li class="toctree-l2"><a class="reference internal" href="nest_backend.routes.html#subpackages">Subpackages</a><ul>
<li class="toctree-l3"><a class="reference internal" href="nest_backend.routes.repository.html">nest_backend.routes.repository package</a><ul>
<li class="toctree-l4"><a class="reference internal" href="nest_backend.routes.repository.html#submodules">Submodules</a></li>
<li class="toctree-l4"><a class="reference internal" href="nest_backend.routes.repository.html#module-nest_backend.routes.repository.repository_add_condition">nest_backend.routes.repository.repository_add_condition module</a></li>
<li class="toctree-l4"><a class="reference internal" href="nest_backend.routes.repository.html#module-nest_backend.routes.repository.repository_create">nest_backend.routes.repository.repository_create module</a></li>
<li class="toctree-l4"><a class="reference internal" href="nest_backend.routes.repository.html#module-nest_backend.routes.repository.repository_edit">nest_backend.routes.repository.repository_edit module</a></li>
<li class="toctree-l4"><a class="reference internal" href="nest_backend.routes.repository.html#module-nest_backend.routes.repository.repository_list">nest_backend.routes.repository.repository_list module</a></li>
<li class="toctree-l4"><a class="reference internal" href="nest_backend.routes.repository.html#module-nest_backend.routes.repository">Module contents</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="nest_backend.routes.users.html">nest_backend.routes.users package</a><ul>
<li class="toctree-l4"><a class="reference internal" href="nest_backend.routes.users.html#submodules">Submodules</a></li>
<li class="toctree-l4"><a class="reference internal" href="nest_backend.routes.users.html#module-nest_backend.routes.users.login">nest_backend.routes.users.login module</a></li>
<li class="toctree-l4"><a class="reference internal" href="nest_backend.routes.users.html#module-nest_backend.routes.users.user_create">nest_backend.routes.users.user_create module</a></li>
<li class="toctree-l4"><a class="reference internal" href="nest_backend.routes.users.html#module-nest_backend.routes.users.user_delete">nest_backend.routes.users.user_delete module</a></li>
<li class="toctree-l4"><a class="reference internal" href="nest_backend.routes.users.html#module-nest_backend.routes.users">Module contents</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="nest_backend.routes.html#submodules">Submodules</a></li>
<li class="toctree-l2"><a class="reference internal" href="nest_backend.routes.html#module-nest_backend.routes.doa">nest_backend.routes.doa module</a></li>
<li class="toctree-l2"><a class="reference internal" href="nest_backend.routes.html#module-nest_backend.routes">Module contents</a></li>
</ul>
</li>
</ul>
</div>
</div>
<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-nest_backend.gestione">
<span id="nest-backend-gestione-module"></span><h2>nest_backend.gestione module<a class="headerlink" href="#module-nest_backend.gestione" title="Permalink to this headline"></a></h2>
<div class="section" id="a-utilities-python-module">
<h3>A utilities Python Module.<a class="headerlink" href="#a-utilities-python-module" title="Permalink to this headline"></a></h3>
<p>Gestione adds many fancy thingamajigs to the flask application, such as a login system and such.</p>
<dl class="py function">
<dt id="nest_backend.gestione.admin_or_403">
<code class="sig-prename descclassname"><span class="pre">nest_backend.gestione.</span></code><code class="sig-name descname"><span class="pre">admin_or_403</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">f</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#nest_backend.gestione.admin_or_403" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py function">
<dt id="nest_backend.gestione.authenticate">
<code class="sig-prename descclassname"><span class="pre">nest_backend.gestione.</span></code><code class="sig-name descname"><span class="pre">authenticate</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">username</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">password</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#nest_backend.gestione.authenticate" title="Permalink to this definition"></a></dt>
<dd><p>Authentication method. It checks if the combination of username+password is a valid match. If not, it returns None.
:param username: the users email
:param password: the users password
:return: if the credentials are correct, it returns the user. Else, it returns None.</p>
</dd></dl>
<dl class="py function">
<dt id="nest_backend.gestione.find_user">
<code class="sig-prename descclassname"><span class="pre">nest_backend.gestione.</span></code><code class="sig-name descname"><span class="pre">find_user</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">email</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#nest_backend.gestione.find_user" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py function">
<dt id="nest_backend.gestione.gen_password">
<code class="sig-prename descclassname"><span class="pre">nest_backend.gestione.</span></code><code class="sig-name descname"><span class="pre">gen_password</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">password</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#nest_backend.gestione.gen_password" title="Permalink to this definition"></a></dt>
<dd><p>It generates an hashed password.
:param password: the password that needs to be hashed.
:return: the passwords hash.</p>
</dd></dl>
<dl class="py function">
<dt id="nest_backend.gestione.identity">
<code class="sig-prename descclassname"><span class="pre">nest_backend.gestione.</span></code><code class="sig-name descname"><span class="pre">identity</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">payload</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#nest_backend.gestione.identity" title="Permalink to this definition"></a></dt>
<dd><p>Authentication verification method. It checks if the user is in fact registered on the server.
It is required by Flask-JWT, and shouldnt be used alone.
:param payload: the reqest payload.
:return: an User or None. It depends whether the user is actually registered on the platform.</p>
</dd></dl>
<dl class="py function">
<dt id="nest_backend.gestione.json_error">
<code class="sig-prename descclassname"><span class="pre">nest_backend.gestione.</span></code><code class="sig-name descname"><span class="pre">json_error</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">msg</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#nest_backend.gestione.json_error" title="Permalink to this definition"></a></dt>
<dd><p>Returns an error in json format
:param msg: the error message.
:return: a json formatted string.</p>
</dd></dl>
<dl class="py function">
<dt id="nest_backend.gestione.json_success">
<code class="sig-prename descclassname"><span class="pre">nest_backend.gestione.</span></code><code class="sig-name descname"><span class="pre">json_success</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">data</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#nest_backend.gestione.json_success" title="Permalink to this definition"></a></dt>
<dd><p>An happy little function. Its happy because the operation was successful.
:param data: the thing you want to be returned
:return: a json formatted string</p>
</dd></dl>
<dl class="py function">
<dt id="nest_backend.gestione.repository_auth">
<code class="sig-prename descclassname"><span class="pre">nest_backend.gestione.</span></code><code class="sig-name descname"><span class="pre">repository_auth</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">f</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#nest_backend.gestione.repository_auth" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</div>
</div>
<div class="section" id="module-nest_backend">
<span id="module-contents"></span><h2>Module contents<a class="headerlink" href="#module-nest_backend" title="Permalink to this headline"></a></h2>
</div>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<h1 class="logo"><a href="index.html">N.E.S.T. Backend</a></h1>
<h3>Navigation</h3>
<p class="caption"><span class="caption-text">Contents:</span></p>
<ul class="current">
<li class="toctree-l1 current"><a class="reference internal" href="modules.html">backend</a><ul class="current">
<li class="toctree-l2 current"><a class="current reference internal" href="#">nest_backend package</a></li>
</ul>
</li>
</ul>
<div class="relations">
<h3>Related Topics</h3>
<ul>
<li><a href="index.html">Documentation overview</a><ul>
<li><a href="modules.html">backend</a><ul>
<li>Previous: <a href="modules.html" title="previous chapter">backend</a></li>
<li>Next: <a href="nest_backend.database.html" title="next chapter">nest_backend.database package</a></li>
</ul></li>
</ul></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>$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer">
&copy;2021, Gruppo 2.
|
Powered by <a href="http://sphinx-doc.org/">Sphinx 3.5.4</a>
&amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.12</a>
|
<a href="_sources/nest_backend.rst.txt"
rel="nofollow">Page source</a>
</div>
</body>
</html>