Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Redis integration for Bottle.

Project Description


.. image::

Redis is an open source, advanced key-value store. It is often referred
to as a data structure server since keys can contain strings, hashes,
lists, sets and sorted sets.

This plugin simplifies the use of redis databases in your Bottle applications.
Once installed, all you have to do is to add a ``rdb`` keyword argument
(configurable) to route callbacks that need a database connection.


Install with one of the following commands::

$ pip install bottle-redis
$ easy_install bottle-redis

or download the latest version from github::

$ git clone git://
$ cd bottle-extras/redis
$ python install


Once installed to an application, the plugin passes an open
:class:`redis.Redis` instance to all routes that require a ``rdb`` keyword

import bottle

app = bottle.Bottle()
plugin = bottle.ext.redis.RedisPlugin(host='localhost')

def show(item, rdb):
row = rdb.get(item)
if row:
return template('showitem', item=item)
return HTTPError(404, "Page not found")

Routes that do not expect a ``rdb`` keyword argument are not affected.


The following configuration options exist for the plugin class:

* **host**: Host on which the Redis server is located (default: localhost ).
* **port**: Port on which the Redis server is listening (default: 6379)
* **database** : Select the database to use (default: 0)
* **keyword**: The keyword argument name that triggers the plugin (default: 'rdb').

Release History

This version
History Node


History Node


History Node


History Node


Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Hash SHA256 Hash Help Version File Type Upload Date
(2.6 kB) Copy SHA256 Hash SHA256
Source Jun 3, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting