MongoDB for Developers with Python Transcripts
Chapter: Mapping classes to MongoDB with the ODM MongoEngine
Lecture: Welcome to mongoengine

Login or purchase this course to watch this video and the rest of the course contents.
0:01 So here we are at mongoengine.org
0:03 and MongoEngine is the document object mapper, right
0:06 they say think ORM but for document databasis, right just like we said,
0:09 and MongoEngine is a great ODM, which they maybe call it DOM,
0:15 given their naming, I think ODM is slightly more popular;
0:17 anyway, it's really great and flexible ODM,
0:20 it has a very clear way of describing your classes,
0:24 if you use something like SQLAlchemy and you like the way it works,
0:26 you really like this, if you like Django ORM it's very similar to that,
0:30 actually it uses the active record style, not the unit of work style
0:34 which Django uses active record, so does Ruby On Rails,
0:37 if you look as opposed to say SQLAlchemy which uses unit of work.
0:41 It works well in Python 3, it also works in Python 2.
0:44 So if you go here you'll see there's actually additional things you can get,
0:48 you can get a Flask plug in on top of this,
0:50 you can get a Django plug in on top of this,
0:52 and some extras as well, there's a couple of cool additions that you get,
0:56 but we're just going to work with plain MongoEngine,
0:59 that means we can use it in any application whether it's a web app or not
1:02 and we can use it however we want in our web application.
1:06 Like pretty much everything in this course MongoEngine is open source
1:08 so you can go here to githug mongoengine/mongoengine,
1:12 you can see it's almost two thousand stars, almost a thousand forks,
1:15 it was updated fourteen days ago, it's very active and living project,
1:18 it's one of the things I look for when I depend on
1:22 some core part of my application is
1:24 is this thing being updated, is it alive, things like that,
1:28 you don't want to take on something as critical as your object document mapper
1:32 if no one is out there maintaining it,
1:34 you probably don't want to be writing an ODM,
1:37 you probably want to be using ODM and building whatever it is you're trying to build,
1:40 like a website or app, or a service api, whatever,
1:43 it's probably not an ODM you want to be building.
1:46 So you see, MongoEngine is quite active,
1:48 and you can go fork it and keep a copy of it for yourself,
1:50 but for this course, we're just going to pip install it.