File tree 1 file changed +19
-2
lines changed 1 file changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -1076,15 +1076,32 @@ Home:[https://github.com/andymccurdy/redis-py]
1076
1076
1077
1077
操作 Redis 的第三方 Python 客户端。
1078
1078
1079
- 代码示例——简单的 set/get
1079
+ 代码示例——简单的存取操作
1080
1080
<source lang="python">
1081
1081
import redis
1082
1082
r = redis.StrictRedis(host="localhost", port=6379, db=0)
1083
1083
r.set("foo", "bar")
1084
1084
print(r.get("foo"))
1085
1085
</source>
1086
1086
1087
- === 6.2.8 Berkeley DB ===
1087
+ === 6.2.8 LevelDB ===
1088
+
1089
+ <h4>Plyvel</h4>
1090
+
1091
+ Home:[https://github.com/wbolster/plyvel]
1092
+
1093
+ 操作 LevelDB 的 Python 库,速度快,同时兼容 Python2 和 Python3。
1094
+
1095
+ 代码示例——简单的存取操作
1096
+ <source lang="python">
1097
+ import plyvel
1098
+ db = plyvel.DB("/tmp/testdb/", create_if_missing=True)
1099
+ db.put(b"key", b"value")
1100
+ print(db.get(b"key"))
1101
+ db.close()
1102
+ </source>
1103
+
1104
+ === 6.2.9 Berkeley DB ===
1088
1105
1089
1106
<h4>PyBSDDB</h4>
1090
1107
You can’t perform that action at this time.
0 commit comments