Skip to content

Commit 3e4dca5

Browse files
committed
Update Readme
1 parent 72aa594 commit 3e4dca5

File tree

2 files changed

+14
-12
lines changed

2 files changed

+14
-12
lines changed

README.md

+8-6
Original file line numberDiff line numberDiff line change
@@ -37,17 +37,19 @@ rpc.listen()
3737
```python
3838
import os
3939
from redisrpc import RedisRPC
40-
# Add REDIS_URI application enviroment variable
40+
41+
# Add REDIS_URI application enviroment
4142

4243
os.environ.setdefault("REDIS_URI", "redis://localhost:6379/0")
4344

44-
pub = RedisRPC("channel_name") # channel name must be same as server
45-
square = pub.send("square", 5) # send data to spesific event
46-
cube = pub.send("cube", 3)
45+
rpc = RedisRPC("channel_name") # channel name must be same as server
46+
square = rpc.send("square", 5) # send data to spesific event
47+
cube = rpc.send("cube", 3)
4748

4849
# response from server handlers
49-
print(square) # 25
50-
print(cube) # 27
50+
print(square) # 25
51+
print(cube) # 27
52+
5153
```
5254

5355
# Contributing

examples/client.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
import os
22
from redisrpc import RedisRPC
3+
34
# Add REDIS_URI application enviroment
45

56
os.environ.setdefault("REDIS_URI", "redis://localhost:6379/0")
67

7-
pub = RedisRPC("channel_name") # channel name must be same as listener
8-
square = pub.send("square", 5) # send data to spesific event
9-
cube = pub.send("cube", 3)
8+
rpc = RedisRPC("channel_name") # channel name must be same as server
9+
square = rpc.send("square", 5) # send data to spesific event
10+
cube = rpc.send("cube", 3)
1011

1112
# response from server handlers
12-
print(square) # 25
13-
print(cube) # 27
14-
13+
print(square) # 25
14+
print(cube) # 27

0 commit comments

Comments
 (0)