随笔分类 - Python和db
摘要:# -*- coding: UTF-8 -*- from pymongo import MongoClient # 数据库连接 class MongoDB(object): def __init__(self, host='localhost', port=27017, database='xunfeng', username='', password=''): ...
阅读全文
摘要:import pymongo import sys import os sys.path.append(os.path.split(os.path.realpath(__file__))[0]+"/../../") from Config import ProductionConfig db_conn = pymongo.MongoClient(ProductionConfig.DB, Pr...
阅读全文

浙公网安备 33010602011771号