04 2019 档案

摘要:from cassandra.cluster import Cluster cluster = Cluster(contact_points=['127.0.0.1'], port=9042) session = cluster.connect() # select data from remote 阅读全文
posted @ 2019-04-18 17:37 不吃清汤火锅 阅读(975) 评论(0) 推荐(0)
摘要:由于k8s和docker使得能够虚拟化成千上万个容器,所以才能够风靡全球,而在开发中如何设计自己的应用与其对接。以JS为前端,Python为后端为例: 根据上图所示,Python API Server为docker中暴露的端口,当Python中的主方法启动起来,再用js调用Python服务中的其它方 阅读全文
posted @ 2019-04-17 20:25 不吃清汤火锅 阅读(315) 评论(0) 推荐(0)
摘要:from pymongo import MongoClient cf = configparser.ConfigParser() cf.read("conf.conf") class Mongo_Operation: def __init__(self): self.host = cf.get("m 阅读全文
posted @ 2019-04-13 11:43 不吃清汤火锅 阅读(137) 评论(0) 推荐(0)
摘要:import redis cf.read("conf.conf") cf = configparser.ConfigParser() class Redis_Operation: def __init__(self, host=cf.get("redis_address", "redis_host" 阅读全文
posted @ 2019-04-13 11:41 不吃清汤火锅 阅读(116) 评论(0) 推荐(0)