Answers for "redis json python"

0

redis json python

import redis
from redis.commands.json.path import Path

client = redis.Redis(host='localhost', port=6379, db=0)

some_json = {
     'one': "yes1", 
     'two': 2
   }

client.json().set('somejson:1', Path.rootPath(), some_json)

result = client.json().get('somejson:1')
print(result)
Posted by: Guest on March-07-2022

Python Answers by Framework

Browse Popular Code Answers by Language