.. image:: https://travis-ci.org/bottlepy/bottle.svg?branch=master :target: https://travis-ci.org/bottlepy/bottle :alt: Bottle Build
.. _mako: http://www.makotemplates.org/ .. _cheetah: http://www.cheetahtemplate.org/ .. _jinja2: http://jinja.pocoo.org/ .. _paste: http://pythonpaste.org/ .. _fapws3: https://github.com/william-os4y/fapws3 .. _bjoern: https://github.com/jonashaag/bjoern .. _cherrypy: http://www.cherrypy.org/ .. _WSGI: http://www.wsgi.org/ .. _Python: http://python.org/
============================ 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 <http://docs.python.org/library/>_.
- Routing: Requests to function-call mapping with support for clean and dynamic URLs.
- Templates: Fast and pythonic
*built-in template engine* <http://bottlepy.org/docs/dev/tutorial.html#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 <https://cloud.google.com/appengine/>, cherrypy or any other WSGI capable HTTP server.
Homepage and documentation: http://bottlepy.org
Example: "Hello World" in a bottle
.. code-block:: python
from bottle import route, run, template
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,
easy_install -U 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.5+ and 3.x.
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.