后台小程序开发的全方位指南
992
2022-10-11
bottle.py 是用于开发python Web应用程序的快速,简单的微框架(bottlepy)
Bottle: Python Web Framework
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.
Routing: Requests to function-call mapping with support for clean and dynamic URLs.Templates: Fast and pythonic *built-in template engine* and support for mako, jinja2 and cheetah templates.Utilities: Convenient access to form data, file uploads, cookies, headers and other HTTP-related metadata.Server: Built-in HTTP development server and support for paste, fapws3, bjoern, Google App Engine, cherrypy or any other WSGI capable HTTP server.
Homepage and documentation: http://bottlepy.org
Example: "Hello World" in a bottle
from bottle import route, run, template@route('/hello/
Run this script or paste it into a Python console, then point your browser to http://localhost:8080/hello/world. That's it.
Download and Install
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.4+.
License
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.
版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。
发表评论
暂时没有评论,来抢沙发吧~