Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Example of setting a hmset using the python api
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Josiah Carlson  
View profile  
 More options Nov 3 2012, 2:06 pm
From: Josiah Carlson <josiah.carl...@gmail.com>
Date: Sat, 3 Nov 2012 11:06:02 -0700
Local: Sat, Nov 3 2012 2:06 pm
Subject: Re: Example of setting a hmset using the python api
If you just want to fetch all of the key names:
r.hkeys('blogtable_userDetails_John')
if you want all of the keys and values:
r.hgetall('blogtable_userDetails_John')

These are all standard Redis commands, which you can read about at:
http://redis.io/commands

Regards,
 - Josiah

On Sat, Nov 3, 2012 at 7:32 AM, Sivaranjini D <drou...@gmail.com> wrote:
> Hi,

> In hmget command, how do I have print all fields for a key?

> import redis
> r = redis.Redis(host="localhost",db=1)
> r.hmset('blogtable_userDetails_John', {'password':'abcd',
> 'lastlogindate':'2012-20-9'})
> redirect = r.hmget(blogtable_userDetails_John','password')
> print(redirect)

> In the above eg, the values are printed for the field names that are passed.
> How is that I have to print all fields?

> Thanks,
> Ranjini

> On Friday, 10 February 2012 22:58:57 UTC-8, Josiah Carlson wrote:

>> r.hmset(name, {'field1':'Hello', 'field2':'World'})

>> Regards,
>>  - Josiah

>> On Fri, Feb 10, 2012 at 7:16 PM, David Montgomery
>> <davidmo...@gmail.com> wrote:
>> > Hi,

>> > Given this HMSET myhash field1 "Hello" field2 "World"  how do I use
>> > tye python api to do the same thing?  r.hmset(?,?)

>> > Thanks

>> > --
>> > You received this message because you are subscribed to the Google
>> > Groups "Redis DB" group.
>> > To post to this group, send email to redi...@googlegroups.com.
>> > To unsubscribe from this group, send email to
>> > redis-db+u...@googlegroups.com.

>> > For more options, visit this group at
>> > http://groups.google.com/group/redis-db?hl=en.

> --
> You received this message because you are subscribed to the Google Groups
> "Redis DB" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/redis-db/-/RjobYZl5qtUJ.

> To post to this group, send email to redis-db@googlegroups.com.
> To unsubscribe from this group, send email to
> redis-db+unsubscribe@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/redis-db?hl=en.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.