数据 API 操作和服务框架 Hydro
- 授权协议: MIT
- 开发语言: Python
- 操作系统: 跨平台
- 软件首页: https://pypi.python.org/pypi/Hydro
- 软件文档: https://pypi.python.org/pypi/Hydro
软件介绍
Hydro 是一个 Python 的开源数据 API 操作和服务框架。主要帮助 Web 服务和其他数据消费者从不同的数据流中抽取数据,并在线处理。
示例代码:
#creating a plan object
plan = PlanObject(params, source_id, conf)
# defining data source and type
plan.data_source = 'vertica-dash'
plan.source_type = Configurator.VERTICA
# time diff based on input params
time_diff = (plan.TO_DATE - plan.FROM_DATE).total_seconds()
# if time range is bigger than 125 days and application type is dashboard, abort!
# since data need to be fetched quickly
if time_diff > Configurator.SECONDS_IN_DAY*125 and params['APP_TYPE'].to_string() == 'Dashboard':
raise HydroException('Time range is too big')
# else, if average records per day is bigger than 1000 or client is convertro then run sample logic
elif plan.AVG_RECORDS_PER_DAY > 1000 or params['CLIENT_ID'].to_string() == 'convertro':
plan.template_file = 'device_grid_widget_sampling.sql'
plan.sampling = True
self.logger.debug('Sampling for the query has been turn on')
# else run other logic
else:
plan.template_file = 'device_grid_widget.sql'
#return plan object to the query engine
return plan
Python Data Structures and Algorithms
Benjamin Baka / Packt Publishing / 2017-5-30 / USD 44.99
Key Features A step by step guide, which will provide you with a thorough discussion on the analysis and design of fundamental Python data structures.Get a better understanding of advanced Python c......一起来看看 《Python Data Structures and Algorithms》 这本书的介绍吧!
CSS 压缩/解压工具
在线压缩/解压 CSS 代码
随机密码生成器
多种字符组合密码
