1
Fork 0
mirror of https://github.com/RYGhub/royalnet.git synced 2024-11-23 19:44:20 +00:00
royalnet/docs/html/web.html

245 lines
No EOL
8.2 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>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>royalnet.web &mdash; Royalnet documentation</title>
<script type="text/javascript" src="_static/js/modernizr.min.js"></script>
<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>
<script type="text/javascript" src="_static/js/theme.js"></script>
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="prev" title="royalnet.error" href="error.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="index.html" class="icon icon-home"> Royalnet
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="audio.html">royalnet.audio</a></li>
<li class="toctree-l1"><a class="reference internal" href="bots.html">royalnet.bots</a></li>
<li class="toctree-l1"><a class="reference internal" href="commands.html">royalnet.commands</a></li>
<li class="toctree-l1"><a class="reference internal" href="database.html">royalnet.database</a></li>
<li class="toctree-l1"><a class="reference internal" href="network.html">royalnet.network</a></li>
<li class="toctree-l1"><a class="reference internal" href="utils.html">royalnet.utils</a></li>
<li class="toctree-l1"><a class="reference internal" href="error.html">royalnet.error</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">royalnet.web</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#module-royalnet.web.royalprints">Royalprints</a></li>
</ul>
</li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="index.html">Royalnet</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html">Docs</a> &raquo;</li>
<li>royalnet.web</li>
<li class="wy-breadcrumbs-aside">
<a href="_sources/web.rst.txt" rel="nofollow"> View page source</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="royalnet-web">
<h1>royalnet.web<a class="headerlink" href="#royalnet-web" title="Permalink to this headline"></a></h1>
<div class="toctree-wrapper compound">
</div>
<span class="target" id="module-royalnet.web"></span><dl class="function">
<dt id="royalnet.web.create_app">
<code class="descclassname">royalnet.web.</code><code class="descname">create_app</code><span class="sig-paren">(</span><em>config_obj: Type[CT_co], blueprints: List[royalnet.web.royalprint.Royalprint]</em><span class="sig-paren">)</span><a class="headerlink" href="#royalnet.web.create_app" title="Permalink to this definition"></a></dt>
<dd><p>Create a <code class="xref py py-class docutils literal notranslate"><span class="pre">flask.Flask</span></code> application object.</p>
<p>Gets the <code class="docutils literal notranslate"><span class="pre">app.secret_key</span></code> from the <code class="docutils literal notranslate"><span class="pre">SECRET_KEY</span></code> envvar.</p>
<p>Also requires a <code class="docutils literal notranslate"><span class="pre">DB_PATH</span></code> key in <code class="docutils literal notranslate"><span class="pre">config_obj</span></code> to initialize the database connection.</p>
<div class="admonition warning">
<p class="admonition-title">Warning</p>
<p>The code for this class was written at 1 AM, and I have no clue of how and why it works or even if it really does work.
Use with caution?</p>
</div>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>config_obj</strong> The object to be passed to <code class="xref py py-meth docutils literal notranslate"><span class="pre">flask.Flask.config.from_object()</span></code>.</p></li>
<li><p><strong>blueprints</strong> A list of blueprints to be registered to the application.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>The created <code class="xref py py-class docutils literal notranslate"><span class="pre">flask.Flask</span></code>.</p>
</dd>
</dl>
</dd></dl>
<dl class="class">
<dt id="royalnet.web.Royalprint">
<em class="property">class </em><code class="descclassname">royalnet.web.</code><code class="descname">Royalprint</code><span class="sig-paren">(</span><em>name</em>, <em>import_name</em>, <em>static_folder=None</em>, <em>static_url_path=None</em>, <em>template_folder=None</em>, <em>url_prefix=None</em>, <em>subdomain=None</em>, <em>url_defaults=None</em>, <em>root_path=None</em>, <em>required_tables: Optional[set] = None</em><span class="sig-paren">)</span><a class="headerlink" href="#royalnet.web.Royalprint" title="Permalink to this definition"></a></dt>
<dd><p>An edited <code class="xref py py-class docutils literal notranslate"><span class="pre">flask.Blueprint</span></code> containing an additional <code class="docutils literal notranslate"><span class="pre">required_tables</span></code> parameter.</p>
</dd></dl>
<div class="section" id="module-royalnet.web.royalprints">
<span id="royalprints"></span><h2>Royalprints<a class="headerlink" href="#module-royalnet.web.royalprints" title="Permalink to this headline"></a></h2>
<p>Some Royalprints that can be used with the Royalnet Flask server.</p>
</div>
</div>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="error.html" class="btn btn-neutral float-left" title="royalnet.error" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
</div>
<hr/>
<div role="contentinfo">
<p>
&copy; Copyright 2019, Stefano Pigozzi
</p>
</div>
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>