flask、mongokit、pymongo、flask-pymongo是什么关系?
What is the relationship between flask, mongokit, pymongo, flask-pymongo?
我是 Flask 和 MongoDB 的新手。我阅读了关于 MongoDB 的 Flask 文档,结果我感到很困惑,不知道我需要安装哪个。
在Flask文档中说如果你想运行MongoDB,你应该安装 Mongokit,是的,我做了,我像文档说的那样构建了用户结构,并保存了它,但是它没有用,我查看了 MongoDB shell,那里没有存储任何东西。
所以,我一直在搜索我需要 Pymongo,另一个文档说
Flask-PyMongo 是 MongoDB 和 Pymongo 之间的桥梁。
我需要安装所有这些吗?
他们是什么关系,我需要有人帮我理清头绪
顺便说一句,我可以将 SQLalchemy 与 MongoDB 一起使用吗?或者我只是使用 Mongokit 以上任何内容。
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 是一个对象文档映射器 (ODM)
并指定 here
MongoKit is a python module that brings a structured schema and validation layer on top of the great pymongo driver.
所述
Flask-PyMongo bridges Flask and PyMongo, so that you can use Flask’s normal mechanisms to configure and connect to MongoDB.
现在:
Do I need to install all of them?
答案是否您可以使用 MongoKit 或 Flask-PyMongo
Can I use SQLalchemy with Mongodb?
答案是否为什么? read this
我是 Flask 和 MongoDB 的新手。我阅读了关于 MongoDB 的 Flask 文档,结果我感到很困惑,不知道我需要安装哪个。
在Flask文档中说如果你想运行MongoDB,你应该安装 Mongokit,是的,我做了,我像文档说的那样构建了用户结构,并保存了它,但是它没有用,我查看了 MongoDB shell,那里没有存储任何东西。 所以,我一直在搜索我需要 Pymongo,另一个文档说 Flask-PyMongo 是 MongoDB 和 Pymongo 之间的桥梁。
我需要安装所有这些吗? 他们是什么关系,我需要有人帮我理清头绪 顺便说一句,我可以将 SQLalchemy 与 MongoDB 一起使用吗?或者我只是使用 Mongokit 以上任何内容。
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 是一个对象文档映射器 (ODM)
并指定 here
所述MongoKit is a python module that brings a structured schema and validation layer on top of the great pymongo driver.
Flask-PyMongo bridges Flask and PyMongo, so that you can use Flask’s normal mechanisms to configure and connect to MongoDB.
现在:
Do I need to install all of them?
答案是否您可以使用 MongoKit 或 Flask-PyMongo
Can I use SQLalchemy with Mongodb?
答案是否为什么? read this