home » zplus/dokk.org.git
ID: b4fd2ae1a7a5ffdd785bfc94e279bd81330bd340
56 lines — 2K — View raw


{% set title = "Bottle" %}
{% extends "templates/article.tpl" %}

{% block article %}

<div id="preamble">
<div class="sectionbody">
<div class="paragraph">
<p><strong>Bottle</strong> is a micro web-framework for Python released under the <a href="license/MIT">MIT</a>
license. It is distributed as a single-file module compatible with Python 2.7
and Python 3, and it has no dependencies other then the Python Standard
Library<sup><a href="#cit1">[cit1]</a></sup>. The core functionalities of the framework can be extended by
third-party plugins<sup><a href="#cit2">[cit2]</a></sup>. Bottle has support for both WSGI and CGI
interfaces<sup><a href="#cit3">[cit3]</a></sup>. It was started in 2009 by Marcel Hellkamp<sup><a href="#cit4">[cit4]</a></sup>.</p>
</div>
</div>
</div>
<div class="sect1">
<h2 id="_hello_world">"Hello World"</h2>
<div class="sectionbody">
<div class="listingblock">
<div class="content">
<pre class="highlight"><code class="language-python" data-lang="python">from bottle import get, run, template

@get ('/hello/&lt;name&gt;')
def index (name):
    return template ('&lt;b&gt;Hello {{name}}&lt;/b&gt;!', name=name)

run (host='localhost', port=8080)</code></pre>
</div>
</div>
</div>
</div>
<div class="sect1">
<h2 id="_references">References</h2>
<div class="sectionbody">
<div class="ulist bibliography">
<ul class="bibliography">
<li>
<p><a id="cit1"></a>[cit1] <a href="https://bottlepy.org/docs/dev/" class="bare">https://bottlepy.org/docs/dev/</a></p>
</li>
<li>
<p><a id="cit2"></a>[cit2] <a href="https://bottlepy.org/docs/dev/plugins/index.html" class="bare">https://bottlepy.org/docs/dev/plugins/index.html</a></p>
</li>
<li>
<p><a id="cit3"></a>[cit3] <a href="https://bottlepy.org/docs/dev/deployment.html" class="bare">https://bottlepy.org/docs/dev/deployment.html</a></p>
</li>
<li>
<p><a id="cit4"></a>[cit4] <a href="https://github.com/bottlepy/bottle/commit/c78437f04bd9631a9d9fc37f59a05b3448c7dacb" class="bare">https://github.com/bottlepy/bottle/commit/c78437f04bd9631a9d9fc37f59a05b3448c7dacb</a></p>
</li>
</ul>
</div>
</div>
</div>

{% endblock %}