安装
pip3 install mongoengine
连接MongoDB
方法一:简写
connect('students)
方法二:指定端口和地址
connect('students',host='192.168.1.35',port=27017)
方法三:使用URI
connect('students',host='mongodb://localhost/students')
python连接
安装
pip3 install mongoengine
连接MongoDB
方法一:简写
connect('students)
方法二:指定端口和地址
connect('students',host='192.168.1.35',port=27017)
方法三:使用URI
connect('students',host='mongodb://localhost/students')
python连接