python-eve使用实战
来源:互联网 发布:php金融网站源码 编辑:程序博客网 时间:2024/04/30 11:27
mongo document
{ "eth0_pps_in_metric": { "top_5_avg": 9841.6 }, "memory_metric": { "top_5_avg": 2 }, "BusinessDay": 17037, "eth2_loss_rate_out_metric": { "top_5_avg": 0 }, "eth2_pps_in_metric": { "top_5_avg": 461200.6 }, "cpu_metric": { "top_5_avg": 2.6 }, "load_one_metric": { "top_5_avg": 0 }, "eth0_pps_out_metric": { "top_5_avg": 2 }, "eth0_loss_rate_out_metric": { "top_5_avg": 0 }, "host": { "SecUsage": "pnat", "eip_count": 2, "IP": "172.23.44.78", "trash_id": 3, "SN": "2102310QPD10E9002196", "AssetNo": "UCSV01201409020032", "_cls": "Hosts", "Usage": "unet", "nat_mode": 1, "_id": "578dde6f9746ef2cda0f9f0b", "az_id": 5001, "Location": "yg" }, "conntrack_rate_metric": { "top_5_avg": -1 }, "eth2_loss_rate_in_metric": { "top_5_avg": 0 }, "eth2_bps_out_metric": { "top_5_avg": 19.8 }, "eth2_pps_out_metric": { "top_5_avg": 461941.2 }, "eth0_bps_out_metric": { "top_5_avg": 0 }, "eth0_bps_in_metric": { "top_5_avg": 0 }}
mongo shell[a and (b or d)]
db.getCollection('aggregate_day_host_metric2').find({ 'BusinessDay':17037, $or:[{'cpu_metric.top_5_avg':2.6}, {'cpu_metric.top_5_avg':57.2}]})
url
http://IP:PORT/module_name_which_define_in_eve_setting?where={ "BusinessDay": 17037, "$or":[{"cpu_metric.top_5_avg":2.6}, {"cpu_metric.top_5_avg":57.2}]}
讲道理的话,
EVE源码这里的operators set里的都支持
被证明有bug,原来是and关系,上面url里面如果两个OR,那么python的字典里就有了相同的key,这是不合理的,所以,mongo2.0之后变了一下写法,如下:
http://IP:PORT/module_name_which_define_in_eve_setting?where={ "$and":[ {"BusinessDay": 17037}, {"$or":[ {"cpu_metric.top_5_avg":2.6}, {"cpu_metric.top_5_avg":57.2}] } ]}
1 0
- python-eve使用实战
- python-eve配置实战
- python eve restful 规则
- python Eve RESTFul 尝试笔记
- python RESTful API框架:Eve 快速入门
- EVE 居然是用 python 写的!!太不可思议了
- python eve设置多数据库问题记录
- Christmas Eve
- 12.23 Eve
- Eve Backstory
- web eve
- EVE登录
- eve模拟器
- Python yield语法 使用实战详解
- python实战-字典使用 [happymark系列]
- Python实战项目(一)使用API
- [Python 实战]
- [Python 实战]
- Machine Learning (2) SVM
- 利用Selenium模拟登陆百度demo
- 木雨音乐 项目开发(十一)网络推荐——搜索歌曲
- python unittest
- ImageView.ScaleType设置图解
- python-eve使用实战
- 生活太犯贱了
- Mac系统隐藏显示文件
- Android 命名规范
- zookeeper curator 对节点变化监控
- thrift学习 --- 安装(一)
- 敏捷测试的要领
- 配置Nginx Web服务器及虚拟主机主机
- Centos6.5下python2.6.6版本下安装pycurl模块