I am using SQLAlchemy+SQLSoup to query a table, now I need to store the query result as a List in Redis. Any help on how-to would be great.
Thanks.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
First, install redis-py then do:
If you have a complex structure (like an object or a tuple/list) I think your best bet is to serialize the data into some format you prefer (like json or, in case of python, pickle) and simply store it as a string:
Note that in Redis you can’t query data by value, only by key. Details depend on your data, so if you need more precise answer please ask more precise question. 🙂 A sample code would really be best.