=====================
Bottle-Redis
=====================
.. image:: https://travis-ci.org/bottlepy/bottle-redis.svg?branch=master
:target: https://travis-ci.org/bottlepy/bottle-redis
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.
Installation
===============
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://github.com/bottlepy/bottle-extras.git
$ cd bottle-extras/redis
$ python setup.py install
Usage
===============
Once installed to an application, the plugin passes an open
:class:`redis.Redis` instance to all routes that require a ``rdb`` keyword
argument::
import bottle
app = bottle.Bottle()
plugin = bottle.ext.redis.RedisPlugin(host='localhost')
app.install(plugin)
@app.route('/show/:item')
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.
Configuration
=============
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').
Bottle-Redis
=====================
.. image:: https://travis-ci.org/bottlepy/bottle-redis.svg?branch=master
:target: https://travis-ci.org/bottlepy/bottle-redis
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.
Installation
===============
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://github.com/bottlepy/bottle-extras.git
$ cd bottle-extras/redis
$ python setup.py install
Usage
===============
Once installed to an application, the plugin passes an open
:class:`redis.Redis` instance to all routes that require a ``rdb`` keyword
argument::
import bottle
app = bottle.Bottle()
plugin = bottle.ext.redis.RedisPlugin(host='localhost')
app.install(plugin)
@app.route('/show/:item')
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.
Configuration
=============
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').
Metadata
Release files for bottle-redis 0.2.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| bottle-redis-0.2.3.tar.gz | 2.6 kB | Without provenance | Details |
Release files / bottle-redis-0.2.3.tar.gz
| Download URL | bottle-redis-0.2.3.tar.gz |
|---|---|
| Size | 2.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2843af0f98107469857f9681e4dd330ce589de4da8b606e7a69db503d3821cce
|
|
BLAKE2b-256 checksum How to use checksums |
fd9fcbae6c4aa9b433d913f7188119e2d65cb9776a0970f789308b4f9c4b3ee3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for bottle-redis 0.2.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.