mongodict.py 文件源码

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

项目:plugin.video.jen 作者: midraal 项目源码 文件源码
def __init__(self, db_name,
                 collection_name='mongo_dict_data', connection=None):
        """
        :param db_name: database name (be careful with production databases)
        :param collection_name: collection name (default: mongo_dict_data)
        :param connection: ``pymongo.Connection`` instance. If it's ``None``
                           (default) new connection with default options will
                           be created
        """
        if connection is not None:
            self.connection = connection
        else:
            self.connection = Connection()
        self.db = self.connection[db_name]
        self.collection = self.db[collection_name]
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号