MongoDB for Developers with Python Transcripts
Chapter: Setting up your computer to follow along
Lecture: MongoDB and the tools we will use
0:01 In order for you to get the most out of this course you're going to need to fallow along.
0:06 We were talking about the Mongo shell you should open it up and play around. When we work with PyMongo, you should pip install it
0:11 and write some code to talk to your local MongoDB server. When we're doing MongoEngine or working with indexes,
0:16 again, you should follow along and do these things. In order to do that, you're going to need some software,
0:21 you're going to need some starter code to get going and you're going to need basically to have MongoDB set up and configured correctly.
0:27 So in this part of the course, let's talk about getting your machine set up so you can follow along. This is a course about MongoDB, so it shouldn't be
0:34 terribly surprising that it's going to require MongoDB. Now if you look across the bottom here you can see
0:38 there is a version for Windows, Linux and MacOS. So regardless of what operating system you are using
0:44 you should be able to use MongoDB installed locally and work with it there. There are hosted services, places like ObjectRocket and Mlab
0:53 and if for some reason you can't install MongoDB and configure it, unlikely, but possible, you could actually connect to one of those services.
1:00 But we're going to assume that you can set it up locally and I will walk you through step by step
1:04 how to do that for each and every operating system below, with the exclusion of Solaris of course. Now, this is MongoDB for Python Developers
1:12 so it shouldn't surprise you that hey we're going to need Python, and we're focusing on Python 3, so most new projects are created in Python 3,
1:18 it's the future of Python, so we're definitely focusing on Python 3, that said, the things we're doing are not super specific to Python 3,
1:25 it should pretty much work across all the versions in case you happen to be using a legacy Python. So do you need to install Python 3?
1:32 Well that depends if you're working on Ubuntu, you probably already have at least Python 3.5 on your system.
1:38 If you're on MacOS, by default you have Python, but only legacy Python, only Python 2, not Python 3, so you'll need to install that.
1:45 And if you are on Windows, unless you've done something special there is no version of Python, so make sure
1:51 you get Python 3 from Python.org, download and install it. Now we're going to write a lot of code in here, that's good,
1:57 I think that's the way coding course should be, and we're going to use the editor from Jetbrains called PyCharm.
2:04 In my opinion, this is the best tool for working with Python code and you'll even have plugins for MongoDB if you go and search
2:11 their tool repository, so we're going to use PyCharm. Now, PyCharm is available in two flavors,
2:17 there is a community free open source edition, and there's the pro edition. If you have the pro edition, feel free to use that,
2:24 but if you don't, you can grab the community edition, it will do everything we need for this course.
2:30 If you want to use some other editor, that's totally fine, you can use whatever you like, but if you want to follow along exactly,
2:36 I recommend you give PyCharm a shot. There is a couple of ways we can work with MongoDB once we have it installed,
2:41 we can use the cli the command line interface to it that comes with MongoDb itself, or we can use something called RoboMongo.
2:50 So RoboMongo in my opinion is the best way to work with MongoDB the idea is you can see a little dark gray area, that's basically the shell
2:59 and you can type as if that was a command line interface. However, it operates inside this gui so you could write a little bit of cli stuff
3:06 and then go interact with the stuff visually, and this is a really, really nice balance
3:10 of giving you the full power of MongoDB, but also a lot of visual support. I think it's super productive and is great.
3:17 You can see there's screenshots for all the three major operating systems, so whatever operating system you use, RoboMongo is going to work great,
3:24 it's also free and it's also open source, how about that. Finally, when we write that code with PyCharm,
3:29 you're going to want to be able to take it with you. Sometimes you might want to grab the finish code that you saw me create in the video and run it,
3:36 other times, we might have started not from a blank empty file but from some sort of starter code
3:42 that got us further along in the demo from the beginning. We also have a couple of large databases
3:47 that you want to get access to for the performance section of the course, all those and more are contained in this github repository here,
3:54 so github.com/mikeyckennedy/mongodb-for-Python-developers so be sure right now to pause this video, go over here
4:03 and star and maybe even fork this repository so you're sure to have it with you. And also download or clone it to your local drive,
4:11 because you're going to want to have this to work from, as you go through the course. So there you have it, that's the software source code
4:17 and tools that were going to use. What we're going to do next, I'm going to walk you through each operating system, Windows, MacOS, and Linux
4:22 and show you how to set up the tools and how to configure MongoDB and get everything working just right.
4:29 If you're a Linux person, there is no reason to watch the say Windows version, so pick the video that matches your operating system, skip the others.