Bottle (web framework)
Developer(s) | Marcel Hellkamp |
---|---|
Initial release | July 1, 2009 |
Stable release | 0.12.8 / December 28, 2014[1] |
Written in | Python |
Operating system | Cross-platform |
Type | Web framework |
License | MIT |
Website |
bottlepy |
Bottle is a WSGI micro web-framework for the Python programming language. It is designed to be fast, simple and lightweight, and is distributed as a single file module with no dependencies other than the Python Standard Library. The same module runs with Python 2.5+ and 3.x.[2]
It offers request dispatching (routes) with URL parameter support, templates, key-value database, a built-in web server and adapters for many third-party WSGI/HTTP-server and template engines.[3]
It is designed to be lightweight, and to allow development of web applications easily and quickly.[4]
Features
- Single file which runs with both Python 2.5+ and 3.x
- Can run as a standalone web server or be used behind ("mounted on") any web server which supports WSGI
- Built-in template engine called SimpleTemplate Engine
- Support for JSON client data (for ReST and JavaScript clients)
- Plugins for popular databases and key/value stores and other features[5]
Example
A simple "Hello World!"
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)
References
External links
- Official website
- bottle on GitHub
- Bottle on PyPi
- List of available Plugins
- Bottle mailing list
- Bottle Google+ page
- Creating web apps with Bottle in Azure
|
This article is issued from Wikipedia - version of the Saturday, February 13, 2016. The text is available under the Creative Commons Attribution/Share Alike but additional terms may apply for the media files.