Bitbucket is a code hosting site with unlimited public and private repositories. We're also free for small teams!

Close

Bottle Web Framework

Bottle Logo

Bottle is a fast and simple micro-framework for small web applications. It offers request dispatching (URL routing) with URL parameter support, templates, a built-in HTTP Server and adapters for many third party WSGI/HTTP-server and template engines - all in a single file and with no dependencies other than the Python Standard Library.

Homepage and documentation: http://bottlepy.org/ License: MIT (see LICENSE)

Installation and Dependencies

Install bottle with pip install bottle or just download bottle.py and place it in your project directory. There are no (hard) dependencies other than the Python Standard Library.

Example

from bottle import route, run

@route('/hello/:name')
def hello(name):
    return '<h1>Hello %s!</h1>' % name.title()

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

Recent activity

defnull

Commits by defnull were pushed to defnull/bottle

0f193b0 - fix #438: "Some cookies are lost when using mount()" Added support for multiple headers with the same name (e.g. Set-Cookie) for mounted apps.
defnull

Commits by defnull were pushed to defnull/bottle

92dcb51 - fix #438: "Some cookies are lost when using mount()" Added support for multiple headers with the same name (e.g. Set-Cookie) for mounted apps.
defnull

Commits by defnull were pushed to defnull/bottle

db8b801 - The gevent server adapter now accepts additional parameters (e.g. SSL cert path).
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.