What is the relationship between flask, mongokit, pymongo, flask-pymongo?

允我心安 提交于 2019-12-05 21:30:56
styvane

From MongoKit documentation:

MongoKit is based on pymongo. As such, all of the pymongo API is exposed through MongoKit. If you don't find what you want in the MongoKit API, please take a look at pymongo's documenation. All the pymongo API is exposed via connection, database and collection so Connection, Database and Collection are wrappers around pymongo objects.

MongoKit is an Object Document Mapper (ODM)

And as specify here

MongoKit is a python module that brings a structured schema and validation layer on top of the great pymongo driver.

As mentioned in Flask-PyMongo documentation

Flask-PyMongo bridges Flask and PyMongo, so that you can use Flask’s normal mechanisms to configure and connect to MongoDB.

Now:

Do I need to install all of them?

The answer is NO you can use either MongoKit or Flask-PyMongo

Can I use SQLalchemy with Mongodb?

The answer is NO Why? read this

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!