• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
立文
博客园 首页 新随笔 联系 订阅 订阅 管理
上一页 1 2 3 4 5 6 7 8 9 10 ··· 30 下一页

2019年12月6日

rabbitMQ 的简单模式
摘要: 生产者: # !/usr/bin/env python # -*- coding: utf-8 -*- import pika # 创建连接对象 connection = pika.BlockingConnection(pika.ConnectionParameters(host='localhos 阅读全文
posted @ 2019-12-06 23:25 立文 阅读(214) 评论(0) 推荐(0)
 
redis 的发布订阅
摘要: Redis 订阅者 #-*- coding: utf8 -*- import redis r = redis.Redis() # 获取订阅对象 pub = r.pubsub() pub.subscribe("104.5fm") # pub.parse_response() while True: m 阅读全文
posted @ 2019-12-06 21:45 立文 阅读(93) 评论(0) 推荐(0)
 
redis 的管道操作
摘要: #-*- coding: utf8 -*- import redis pool = redis.ConnectionPool() r = redis.Redis(connection_pool=pool) # 支持事务 pipe = r.pipeline(transaction=True) pipe 阅读全文
posted @ 2019-12-06 20:41 立文 阅读(574) 评论(0) 推荐(0)
 
redis 的其他常用操作
摘要: #-*- coding: utf8 -*- import redis pool = redis.ConnectionPool() r = redis.Redis(connection_pool=pool) # 删除操作 print(r.keys()) r.delete(*["xxx"]) # 要加星 阅读全文
posted @ 2019-12-06 20:29 立文 阅读(73) 评论(0) 推荐(0)
 
redis 的链表操作
摘要: #-*- coding: utf8 -*- import redis pool = redis.ConnectionPool() r = redis.Redis(connection_pool=pool) # 增加操作 r.lpush("stu","zhangsan","lisi","wangwu" 阅读全文
posted @ 2019-12-06 20:15 立文 阅读(269) 评论(0) 推荐(0)
 
redis 的哈希操作
摘要: #-*- coding: utf8 -*- import redis pool = redis.ConnectionPool() r = redis.Redis(connection_pool=pool) # 设置获取 r.hset("info", "name", "alex") print(r.h 阅读全文
posted @ 2019-12-06 20:05 立文 阅读(133) 评论(0) 推荐(0)
 
redis 的字符串操作
摘要: import redis pool = redis.ConnectionPool() r = redis.Redis(connection_pool=pool) # 设置有效时间 r.set("gender","male",20) # 当name 不存在时,执行设置操作 r.setnx("salar 阅读全文
posted @ 2019-12-06 18:10 立文 阅读(217) 评论(0) 推荐(0)
 
redis 的数据类型
摘要: key:value 字符串 链表 Hash 集合 有序集合 阅读全文
posted @ 2019-12-06 17:30 立文 阅读(99) 评论(0) 推荐(0)
 
Redis的基本操作
摘要: import redis # 简单连接 r = redis.Redis() print(r.get("name"))r.set("age",9000) # 基于连接池 pool = redis.ConnectionPool() r = redis.Redis(connection_pool=pool 阅读全文
posted @ 2019-12-06 17:22 立文 阅读(82) 评论(0) 推荐(0)
 
 

2019年11月27日

day27 的笔记和day 25 的保持一致
摘要: day27 的笔记和day 25 的保持一致 阅读全文
posted @ 2019-11-27 14:54 立文 阅读(70) 评论(0) 推荐(0)
 
 
上一页 1 2 3 4 5 6 7 8 9 10 ··· 30 下一页

公告


博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3