Welcome, guest | Sign In | My Account | Store | Cart

Notice! PyPM is being replaced with the ActiveState Platform, which enhances PyPM’s build and deploy capabilities. Create your free Platform account to download ActivePython or customize Python with the packages you require and get automatic updates.

Download
ActivePython
INSTALL>
pypm install repoze.what.plugins.redis

How to install repoze.what.plugins.redis

  1. Download and install ActivePython
  2. Open Command Prompt
  3. Type pypm install repoze.what.plugins.redis
 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
1.0rc1 Available View build log
Windows (64-bit)
1.0rc1 Available View build log
Mac OS X (10.5+)
1.0rc1 Available View build log
Linux (32-bit)
1.0rc1 Available View build log
Linux (64-bit)
1.0rc1 Available View build log
 
Author
License
Apache License, Version 2.0
Dependencies
Lastest release
version 1.0rc1 on Jan 5th, 2011

This is an adapters plugin for repoze.what

The Redis plugin makes repoze.what support sources defined in Redis key-value databases by providing one group adapter and one permission adapter.

Redis

Redis is a key-value database. It is similar to memcached but the dataset is not volatile, and values can be strings, exactly like in memcached, but also lists and sets with atomic operations to push/pop elements.

In order to be very fast but at the same time persistent the whole dataset is taken in memory and from time to time and/or when a number of changes to the dataset are performed it is written asynchronously on disk.

The database name is numeric; the default database is 0.

repoze.what.plugin.redis uses database 1 for the group adapter and database 2 for the permission adapter.

The database 0 could be used for any table related to users as the sessions.

Building

To compile the trunk version:

$ git clone git://github.com/antirez/redis.git
$ cd redis
$ make

To update:

$ git pull && make clean && make

To run the server:

$ ./redis-server

The Python library is in ./client-libraries/python/

Note: The client-libraries directory inside the Redis distribution is only a temp thing.

Little issues
  • If the client is disconnected after of some time of inactivity --it's

System Message: WARNING/2 (<string>, line 55)

Bullet list ends without a blank line; unexpected unindent.

configured to 300 seconds by default--, and it's called any command then it raises a ConnectionError. It should be rather managed from the Python driver:

http://groups.google.com/group/redis-db/browse_thread/thread/2581396a6722d3f9

  • The data are synchronously saved. It could be modified the _save function

System Message: WARNING/2 (<string>, line 61)

Bullet list ends without a blank line; unexpected unindent.

(in the Redis adapter) for that it been asynchronously saved, or for that it been saved only when a number of changes to the dataset are performed.

Use

Typical usage:

>>> import redis
>>> from repoze.what.plugins.redis import adapters
>>> group = adapters.RedisGroupAdapter(redis.Redis())
>>> permission = adapters.RedisPermissionAdapter(redis.Redis())

Subscribe to package updates

Last updated Jan 5th, 2011

Download Stats

Last month:1

What does the lock icon mean?

Builds marked with a lock icon are only available via PyPM to users with a current ActivePython Business Edition subscription.

Need custom builds or support?

ActivePython Enterprise Edition guarantees priority access to technical support, indemnification, expert consulting and quality-assured language builds.

Plan on re-distributing ActivePython?

Get re-distribution rights and eliminate legal risks with ActivePython OEM Edition.