Bottle (web framework)

Bottle
Developer(s) Marcel Hellkamp
Initial release July 1, 2009 (2009-07-01)
Stable release 0.12.9 / October 24, 2015 (2015-10-24)[1]
Written in Python
Operating system Cross-platform
Type Web framework
License MIT
Website bottlepy.org

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

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

This article is issued from Wikipedia - version of the Wednesday, March 23, 2016. The text is available under the Creative Commons Attribution/Share Alike but additional terms may apply for the media files.