Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
ws-rst
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
qlintonger xeno
ws-rst
Commits
7d671bed
Commit
7d671bed
authored
Feb 14, 2025
by
qlintonger xeno
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Delete redis-op.py
parent
5924414a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
15 deletions
+0
-15
test/redis-op.py
+0
-15
No files found.
test/redis-op.py
deleted
100644 → 0
View file @
5924414a
import
redis
# 连接到 Redis 服务器
r
=
redis
.
Redis
(
host
=
'localhost'
,
port
=
6379
,
db
=
0
)
# 哈希表的键名
hash_key
=
'onlineUsers'
# 使用 hgetall 方法获取哈希表的所有字段和值
result
=
r
.
hgetall
(
hash_key
)
# 遍历结果
for
field
,
value
in
result
.
items
():
print
(
f
"Field: {field.decode('utf-8')}, Value: {value.decode('utf-8')}"
)
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment