logo
  • 教程列表
  • SO官方文档
  • 使用 Python 连接到 redis
    • 添加元素到列表
    • 将字段添加到哈希
    • 设置与 Redis 的连接
    • 创建交易
    • 直接执行命令
  1. StackOverflow 文档
  2. redis 教程
  3. 使用 Python 连接到 redis
  4. 添加元素到列表

添加元素到列表

Created: November-22, 2018

import redis

r = redis.StrictRedis(host='localhost', port=6379, db=0)

r.lpush('myqueue','myelement')
  • 将字段添加到哈希
  • 使用 Python 连接到 redis

Copyright © 2018. All right reserved

tastones.com 备案号:鲁ICP备18045372号-1

  • 关于我们
  • 免责声明