python怎么修改列表数据_python修改redis list数据

需求:

我需要使用python获取redis的list类型的数据;在原有数据的基础上添加一列附加数据上去; 请问如何实现呢?

例如:

原来的list数据:

{"@version":"1","@timestamp":"2018-01-09T05:40:57.119Z","path":"/home/logs/nginx/access.log","host":"web01","type":"system","remote_addr":"183.16.14.2","datetime":"2018-01-09T13:40:56+08:00","http_host":"tc.test.com","upstream_addr":"10.1.1.30:80","request_uri":"POST /is/rf/checkIn/confirm HTTP/1.1","status":"200","request_time":"1.163","body_bytes_send":"227","http_referer":"-","user_agent":"okhttp/3.4.1","http_forwarded":"-","http_cookie":"-"}

变成下面的[最后添加了一列内容 “123456”

{"@version":"1","@timestamp":"2018-01-09T05:40:57.119Z","path":"/home/logs/nginx/access.log","host":"web01","type":"system","remote_addr":"183.16.14.2","datetime":"2018-01-09T13:40:56+08:00","http_host":"tc.test.com","upstream_addr":"10.1.1.30:80","request_uri":"POST /is/rf/checkIn/confirm HTTP/1.1","status":"200","request_time":"1.163","body_bytes_send":"227","http_referer":"-","user_agent":"okhttp/3.4.1","http_forwarded":"-","http_cookie":"-","123456"}

请问怎么实现呢?

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值