Skip to content

Commit 6b7b614

Browse files
committed
增加 Redis 客户端
1 parent 6f6375f commit 6b7b614

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

libs/python.wiki

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -862,7 +862,23 @@ conn.commit()
862862
conn.close()
863863
</source>
864864

865-
=== 6.2.7 Berkeley DB ===
865+
=== 6.2.7 Redis ===
866+
867+
<h4>redis-py</h4>
868+
869+
Home:[https://github.com/andymccurdy/redis-py]
870+
871+
操作 Redis 的第三方 Python 客户端。
872+
873+
代码示例——简单的 set/get
874+
<source lang="python">
875+
import redis
876+
r = redis.StrictRedis(host="localhost", port=6379, db=0)
877+
r.set("foo", "bar")
878+
print(r.get("foo"))
879+
</source>
880+
881+
=== 6.2.8 Berkeley DB ===
866882

867883
<h4>PyBSDDB</h4>
868884

0 commit comments

Comments
 (0)