Python MongoDB Getting started

Python MongoDB Tutorial

related suggestion

MongoDB

MongoDB document will be similar json format, which makes data storage extremely flexible and scalable database.

To try the code examples in this tutorial, you need to be able to access MongoDB database.

About MongoDB, you can refer to our tutorial: MongoDB tutorial .

By https://www.mongodb.com download MongoDB database.

PyMongo

Python requires a driver to access MongoDB MongoDB database.

In this tutorial, we will use MongoDB drivers "PyMongo".

We recommend that you use the PIP install "PyMongo".

PIP probably already installed in your Python environment.

Execute the following command:

Download and install the "PyMongo":

Kevin@QIKEGU C:\Users\Kevin> python -m pip install pymongo

copy

Now that you have downloaded and installed the mongoDB driver.

Test PyMongo

To test PyMongo installation, create a Python file that contains the following:

demo_mongodb_test.py:

import pymongo

copy

If the code is executed without error, show "pymongo" successful installation.


Doc navigation

Python MongoDB to create a database →

Guess you like

Origin blog.csdn.net/matthewwu/article/details/93475906