This article was originally published on MongoDB. Thank you for supporting the partners who make SitePoint possible.
In this article, we’ll introduce developers to programming MongoDB using the Python programming language. PyMongo is the name of the client library (in MongoDB speak we refer to it as a “driver”) we use to interact with the MongoDB Server.
To get started we need to install the toolchain used by a typical MongoDB Python developer.
First up is m. Hard to find online unless your search for “MongoDB m”, m is a tool to manage and use multiple installations of the MongoDB Server in parallel. It is an invaluable tool if you want to try out the latest and greatest beta version but still continue mainline development on our current stable release.
The easiest way to install m is with npm the Node.js package manager (which it turns out is not just for Node.js).
$ sudo npm install -g m Password:****** /usr/local/bin/m -> /usr/local/lib/node_modules/m/bin/m + email@example.com updated 1 package in 2.361s $
For today we will use m to install the current stable production version (4.0.2 at the time of writing).
We run the stable command to achieve this.