Skip to content

Latest commit

 

History

History
109 lines (73 loc) · 3.24 KB

index.rst

File metadata and controls

109 lines (73 loc) · 3.24 KB

python

bottle

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 <tutorial-templates> 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.

Example: "Hello World" in a bottle

from bottle import route, run

@route('/:name')
def index(name='World'):
    return '<b>Hello %s!</b>' % name

run(host='localhost', port=8080)

Download and Install

Install the latest stable release via PyPi (easy_install -U bottle) or download bottle.py (unstable) into your project directory. There are no hard1 dependencies other than the Python standard library. Bottle runs with Python 2.5+ and 3.x (using 2to3)

User's Guide

Start here if you want to learn how to use the bottle framework for web development. If you have any questions not answered here, feel free to ask the mailing list.

tutorial stpl api plugins/index

Knowledge Base

A collection of articles, guides and HOWTOs.

tutorial_app async recipes faq

Development and Contribution

These chapters are intended for developers interested in the bottle development and release workflow.

changelog development plugindev

plugins/index

License

Code and documentation are available according to the MIT 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.

Footnotes


  1. Usage of the template or server adapter classes of course requires the corresponding template or server modules.