1.  首页
  2.  博客
  3. How to connect mongoengine ReplicaSet

How to connect mongoengine ReplicaSet


After mongoengine 0.6 release, it has support RelicaSet connection For exapmle:

from mongoengine import connect
connect(db='DBNAME', username='mongo_user', password='123456',
            host='mongodb://10.0.1.200:27017,10.0.1.200:27018,10.0.1.200:27019/DBNAME',
            )

评论 0