15 lines
332 B
Python
Executable File
15 lines
332 B
Python
Executable File
import redis
|
|
import json
|
|
|
|
r = redis.Redis()
|
|
|
|
rules = [
|
|
{"id": "22", "value": {"t": 0, "v": ".edu", "c": 1234567}},
|
|
{"id": "27", "value": {"t": 2, "v": ".int", "c": 1234567}},
|
|
{"id": "232", "value": {"t": 0, "v": ".sy", "c": 1234567}}
|
|
]
|
|
|
|
for rule in rules:
|
|
r.rpush("toadd", json.dumps(rule))
|
|
|
|
r.rpush("todel", "22") |