Bottle is a fast, simple and lightweight WSGI micro web-framework for Python. It is distributed as a single file module and has no dependencies other than the Python Standard Library.
Homepage and documentation: http://bottlepy.org
from bottle import route, run, template
@route('/hello/<name>')
def index(name):
return template('<b>Hello {{name}}</b>!', name=name)
run(host='localhost', port=8080)
Run this script or paste it into a Python console, then point your browser to http://localhost:8080/hello/world. That's it.
Install the latest stable release with pip install bottle
or download bottle.py (unstable) into your project directory. There are no hard dependencies other than the Python standard library. Bottle runs with Python 2.7 and 3.6+.
Code and documentation are available according to the MIT License (see LICENSE).
The Bottle logo however is NOT covered by that license. It is allowed to use the logo as a link to the bottle homepage or in direct context with the unmodified library. In all other cases, please ask first.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。