db_ingest.py 文件源码

python
阅读 21 收藏 0 点赞 0 评论 0

项目:IntroPython2016 作者: UWPCE-PythonCert 项目源码 文件源码
def import2db (json_list):
    """
    take a list of json data and import it into our database
    Work in progress
    """

    host = "localhost"
    port = "8086"
    user = ""
    password = ""
    dbname = "db"

    client = InfluxDBClient(host, port, user, password, dbname)

    for json in json_list:
        pass
        #print (json)
        # work in progress
        #client.write_points(json_used)
        #client.write_points(json_allocated)
        #client.write_points(json_capacity)
        #client.write_points(json_used_pct)
        #client.write_points(json_allocated_pct)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号