Bottle

Bottle is a fast, simple and lightweight WSGI micro web-framework for Python

Overview

Bottle is distributed as a single file module and has no dependencies except the Python Standard Library

Key Features

Single File

Bottle is a single file that can be dropped into any project

from bottle import route, run

@route('/hello')
def hello():
    return "Hello World!"

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

Built-in Server

Includes a development server

from bottle import run
run(host='localhost', port=8080, debug=True)

Template Engine

Simple template engine

from bottle import route, template

@route('/hello/<name>')
def hello(name):
    return template('Hello !', name=name)

Installation

pip install bottle

Or just download bottle.py and include it in your project

Common Use Cases

Advantages

Disadvantages

Official Documentation

Bottle Documentation

Version Information