Using Redis in Python

Source: Internet
Author: User

  • Understand Strictredis Object ? Method

    Strictredis Object ? Method

  • create an object from init , specify the parameter host,Port with the specified server and end ? Connection, Host default is localhost , Port default is 6379 , DB default is 0

    sr = StrictRedis(host=‘localhost‘, port=6379, db=0)

    简写

    sr=StrictRedis()

  • different instances depending on the type ? method can be adjusted ? , with the former ? Learn the Redis command corresponds, ? Parameters required by the method and parameters of the command ? addressed

    String

  • Set
  • Setex
  • Mset
  • Append
  • Get
  • Mget
  • Key

    Keys

  • Exists
  • Type
  • Delete
  • Expire
  • GetRange
  • Ttl

    Hash

  • Hset
  • Hmset
  • Hkeys
  • Hget
  • Hmget
  • Hvals
  • Hdel

    List

  • Lpush
  • Rpush
  • Linsert
  • Lrange
  • LSet
  • Lrem

    Set

  • Sadd
  • Smembers
  • Srem

    Zset

  • Zadd
  • Zrange
  • Zrangebyscore
  • Zscore
  • Zrem
  • Zremrangebyscore


Using Redis in Python

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.