<div><h3id="thread">Thread</h3><pre><codeclass="python language-python hljs"><Thread> = Thread(target=<function>) <spanclass="hljs-comment"># Use `args=<collection>` to set the arguments.</span>
<div><h3id="thread">Thread</h3><pre><codeclass="python language-python hljs"><Thread> = Thread(target=<function>) <spanclass="hljs-comment"># Use `args=<collection>` to set the arguments.</span>
<Thread>.start() <spanclass="hljs-comment"># Starts the thread. Also <Thread>.is_alive().</span>
<Thread>.start() <spanclass="hljs-comment"># Starts the thread. Also <Thread>.is_alive().</span>
<Thread>.join() <spanclass="hljs-comment"># Waits for the thread to finish.</span>
<Thread>.join() <spanclass="hljs-comment"># Waits for the thread to finish executing.</span>
<li><strong><codeclass="python hljs"><spanclass="hljs-string">'fl.render_template(filename, <kwargs>)'</span></code> renders a file located in 'templates' dir.</strong></li>
<li><strong><codeclass="python hljs"><spanclass="hljs-string">'fl.render_template(filename, <kwargs>)'</span></code> renders a file located in 'templates' dir.</strong></li>
<li><strong><codeclass="python hljs"><spanclass="hljs-string">'fl.abort(<int>)'</span></code> returns error code and <codeclass="python hljs"><spanclass="hljs-string">'return fl.redirect(<url>)'</span></code> redirects.</strong></li>
<li><strong><codeclass="python hljs"><spanclass="hljs-string">'fl.abort(<int>)'</span></code> returns error code and <codeclass="python hljs"><spanclass="hljs-string">'return fl.redirect(<url>)'</span></code> redirects.</strong></li>
<li><strong><codeclass="python hljs"><spanclass="hljs-string">'fl.request.args[<str>]'</span></code> returns parameter from the query string (URL right of '?').</strong></li>
<li><strong><codeclass="python hljs"><spanclass="hljs-string">'fl.request.args[<str>]'</span></code> returns parameter from query string (URL part right of '?').</strong></li>
<li><strong><codeclass="python hljs"><spanclass="hljs-string">'fl.session[<str>] = <obj>'</span></code> stores session data. It requires secret key to be set at the startup with <codeclass="python hljs"><spanclass="hljs-string">'app.secret_key = <str>'</span></code>.</strong></li>
<li><strong><codeclass="python hljs"><spanclass="hljs-string">'fl.session[<str>] = <obj>'</span></code> stores session data. It requires secret key to be set at the startup with <codeclass="python hljs"><spanclass="hljs-string">'app.secret_key = <str>'</span></code>.</strong></li>