Python: Redis as session backend to Beaker
Asked Answered
F

1

9

Anyone had success with using Redis as Beaker backend? Can you tell me link or library how to do it? I am looking for any library which does this but could not get anything out of google search.

Felicity answered 7/7, 2010 at 7:24 Comment(0)
F
11

I have posted to pylons user group and this information resolve my question..

http://groups.google.com/group/pylons-discuss/msg/a1144aa1ca8e0417

Here are the steps that worked for me:

  1. easy_install redis
  2. easy_install pip
  3. pip install git+git://github.com/bbangert/beaker_extensions.git
  4. Edit Pylons' development.ini

    [app:main]
    full_stack = true
    static_files = true
    
    cache_dir = %(here)s/data
    beaker.session.type = redis
    beaker.session.url:127.0.0.1:6379
    beaker.session.key = appname
    
  5. (Optional) Edit this file and change the serialization method to JSON. Even though JSON is not as efficient byte for byte I like how it is easily readable and relatively well supported across the technologies I've chosen:

https://github.com/bbangert/beaker_extensions/blob/master/beaker_extensions/redis_.py

Posted by Jeff Tchang

Felicity answered 8/7, 2010 at 2:38 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.