Bottle (Web Framework)

From Handwiki

Bottle
File:Bottle-logo.svg
Developer(s)Marcel Hellkamp
Initial releaseJuly 1, 2009; 14 years ago (2009-07-01)
RepositoryBottle Repository
Written inPython
Operating systemCross-platform
TypeWeb framework
LicenseMIT
Website{{{1}}}

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.7 and 3.x.[1]

It offers request dispatching (routes) with URL parameter support, templates, a built-in web server and adapters for many third-party WSGI/HTTP-server and template engines.[2]

It is designed to be lightweight, and to allow development of web applications easily and quickly.[3]

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[4]

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)

See also

  • Flask (web framework)

References

  1. Bottle website
  2. Web Frameworks for Python
  3. Digital Ocean Bottle tutorial
  4. List of available Plugins

External links




Retrieved from "https://handwiki.org/wiki/index.php?title=Software:Bottle_(web_framework)&oldid=3472425"

Categories: [Free software programmed in Python]


Download as ZWI file | Last modified: 03/10/2024 12:26:39 | 7 views
☰ Source: https://handwiki.org/wiki/Software:Bottle_(web_framework) | License: CC BY-SA 3.0

ZWI is not signed. [what is this?]