create account

Learn Python Series (#20) - PyMongo Part 3 by scipio

View this thread on: hive.blogpeakd.comecency.com
· @scipio · (edited)
$101.38
Learn Python Series (#20) - PyMongo Part 3
# Learn Python Series (#20) - PyMongo Part 3

![python_logo.png](https://cdn.utopian.io/posts/a553988d3a1bb9778db2bd768480e9e4c2f0python_logo.png)

#### What Will I Learn?
- You will learn about how to use the Logical Operators `$and`, `$or`, `$nor` and `$not`;
- about some other operators including `$text` and `$search`;
- how to address nested fields;
- how to create and use an index for textual search;
- how to use the `$size` operator;
- and how to use the flexible `$where` operator, which will be of special interest to JavaScript-loving aspiring Pythonistas!

#### Requirements
- A working modern computer running macOS, Windows or Ubuntu;
- An installed Python 3(.6) distribution, such as (for example) the Anaconda Distribution;
- The ambition to learn Python programming;
- A running MongoDB installation on your computer system, as explained in the previous two episodes .

#### Difficulty
Intermediate

#### Curriculum (of the `Learn Python Series`):
- [Learn Python Series - Intro](https://utopian.io/utopian-io/@scipio/learn-python-series-intro)
- [Learn Python Series (#2) - Handling Strings Part 1](https://utopian.io/utopian-io/@scipio/learn-python-series-2-handling-strings-part-1)
- [Learn Python Series (#3) - Handling Strings Part 2](https://utopian.io/utopian-io/@scipio/learn-python-series-3-handling-strings-part-2)
- [Learn Python Series (#4) - Round-Up #1](https://utopian.io/utopian-io/@scipio/learn-python-series-4-round-up-1)
- [Learn Python Series (#5) - Handling Lists Part 1](https://utopian.io/utopian-io/@scipio/learn-python-series-5-handling-lists-part-1)
- [Learn Python Series (#6) - Handling Lists Part 2](https://utopian.io/utopian-io/@scipio/learn-python-series-6-handling-lists-part-2)
- [Learn Python Series (#7) - Handling Dictionaries](https://utopian.io/utopian-io/@scipio/learn-python-series-7-handling-dictionaries)
- [Learn Python Series (#8) - Handling Tuples](https://utopian.io/utopian-io/@scipio/learn-python-series-8-handling-tuples)
- [Learn Python Series (#9) - Using Import](https://utopian.io/utopian-io/@scipio/learn-python-series-9-using-import)
- [Learn Python Series (#10) - Matplotlib Part 1](https://utopian.io/utopian-io/@scipio/learn-python-series-10-matplotlib-part-1)
- [Learn Python Series (#11) - NumPy Part 1](https://utopian.io/utopian-io/@scipio/learn-python-series-11-numpy-part-1)
- [Learn Python Series (#12) - Handling Files](https://utopian.io/utopian-io/@scipio/learn-python-series-12-handling-files)
- [Learn Python Series (#13) - Mini Project - Developing a Web Crawler Part 1](https://utopian.io/utopian-io/@scipio/learn-python-series-13-mini-project-developing-a-web-crawler-part-1)
- [Learn Python Series (#14) - Mini Project - Developing a Web Crawler Part 2](https://utopian.io/utopian-io/@scipio/learn-python-series-14-mini-project-developing-a-web-crawler-part-2)
- [Learn Python Series (#15) - Handling JSON](https://utopian.io/utopian-io/@scipio/learn-python-series-15-handling-json)
- [Learn Python Series (#16) - Mini Project - Developing a Web Crawler Part 3](https://utopian.io/utopian-io/@scipio/learn-python-series-16-mini-project-developing-a-web-crawler-part-3)
- [Learn Python Series (#17) - Roundup #2 - Combining and analyzing any-to-any multi-currency historical data](https://utopian.io/utopian-io/@scipio/learn-python-series-17-roundup-2-combining-and-analyzing-any-to-any-multi-currency-historical-data)
- [Learn Python Series (#18) - PyMongo Part 1](https://utopian.io/utopian-io/@scipio/learn-python-series-18-pymongo-part-1)
- [Learn Python Series (#19) - PyMongo Part 2](https://utopian.io/utopian-io/@scipio/learn-python-series-19-pymongo-part-2)    

# Learn Python Series (#20) - PyMongo Part 3

In the previous `Learn Python Series` episodes about `PyMongo Part 1` and `PyMongo Part 2`, we learned what MongoDB & PyMongo are about, how to do "CRUD" (Create, Read, Update, Delete) operations - and how to use Query Operations for more advanced querying.

In this episode, we'll expand our knowledge regarding PyMongo with a number of techniques: we are going to discuss so-called **Logical Operators**.  Let's get started!

# Adding some (dummy) data to the `test_mongo` dataset
Up until now, we've kept the dataset of the `test_mongo` test database pretty simple. We didn't need more or more complex data to explain what was discussed in the PyMongo Parts 1 & 2 tutorial episodes anyway. But since we're going to discuss creating more complex data queries via using so-called **Logical Operators** regarding PyMongo, let's first add some more data to the `test_mongo` dataset.


```python
import pymongo
from bson.objectid import ObjectId
from pprint import pprint

client = pymongo.MongoClient('mongodb://localhost:27017')
db = client.test_mongo
coll = db.accounts

scipio_posts = [
        {
            "title": "Learn Python Series (#19) - PyMongo Part 2",
             "url": "https://steemit.com/utopian-io/@scipio/learn-python-series-19-pymongo-part-2"
        },
        {
            "title": "Learn Python Series (#18) - PyMongo Part 1",
             "url": "https://steemit.com/utopian-io/@scipio/learn-python-series-18-pymongo-part-1"
        },
        {
            "title": "Learn Python Series (#17) - Roundup #2 - Combining and analyzing any-to-any multi-currency historical data",
             "url": "https://steemit.com/utopian-io/@scipio/learn-python-series-17-roundup-2-combining-and-analyzing-any-to-any-multi-currency-historical-data"
        }
]

result = coll.update_one({"account": "scipio"}, {"$set": {"posts": scipio_posts}})
```


```python
jedigeiss_posts = [
        {
            "title": "Das Tagebuch der (Steem)Leiden",
             "url": "https://steemit.com/deutsch/@jedigeiss/das-tagebuch-der-steem-leiden"
        },        
        {
            "title": "D-A-CH Support -- Discord / Steem Bridge -- added Autovoter",
             "url": "https://steemit.com/utopian-io/@jedigeiss/d-a-ch-support-discord-steem-bridge-added-autovoter"
        }
]

result = coll.update_one({"account": "jedigeiss"}, {"$set": {"posts": jedigeiss_posts}})
```

Okay, now as a result, 2 of the 4 documents in the `accounts` collection have a `"posts"` field, of which one holds 3 and the other 2 post items, each containing 2 fields (`"title"` and `"url"`); that will do for now.

![1.png](https://cdn.utopian.io/posts/f6991e3066151f9791917ad9c376ece2e6331.png)

# Using Logical Operators for more complex data queries
PyMongo gives us support for logical query operators `$and`, `$or`, `$nor` and `$not`, with which we're able to construct more complex data queries. Let's go over them one by one to see how they work and what kind of queries we can come up with.

### Using the `$and` operator

The `$and` operator can be used to perform logical `AND` operations (where all expressions involved need to be `True`) on a list (array) of 2 or more expressions. As a result, only the documents that satisfy all expressions will be selected.


```python
result = list(coll.find(
    {"$and": [
        {"posts": {"$exists": True}},
        {"account_id": {"$exists": True}}
    ]}
))
pprint(result)
```

    [{'_id': ObjectId('5ae46285dd58330cd666056f'),
      'account': 'scipio',
      'account_id': 422033,
      'active': True,
      'posts': [{'title': 'Learn Python Series (#19) - PyMongo Part 2',
                 'url': 'https://steemit.com/utopian-io/@scipio/learn-python-series-19-pymongo-part-2'},
                {'title': 'Learn Python Series (#18) - PyMongo Part 1',
                 'url': 'https://steemit.com/utopian-io/@scipio/learn-python-series-18-pymongo-part-1'},
                {'title': 'Learn Python Series (#17) - Roundup #2 - Combining and '
                          'analyzing any-to-any multi-currency historical data',
                 'url': 'https://steemit.com/utopian-io/@scipio/learn-python-series-17-roundup-2-combining-and-analyzing-any-to-any-multi-currency-historical-data'}],
      'slogan': "Does it matter who's right, or who's left?"}]


**Nota bene:** As we can see, only 1 account (`scipio`) is returned, being the only account that has both a `"posts"` field as well as an `"account_id"`. The account `jedigeiss` has a `"posts"` field as well but not an `"account_id"`, where the account `fabiyamada` has an `"account_id"` field but not a `"posts"` field.

### Using the `$or` operator

The `$or` operator can be used to perform logical `OR` operations (where only one of all expressions involved needsto be `True`) on a list (array) of 2 or more expressions. As a result, the documents that satisfy one or more of all expressions involved will be selected.


```python
result = list(coll.find(
    {"$or": [
        {"posts": {"$exists": True}},
        {"account_id": {"$exists": True}}
    ]}
))
pprint(result)
```

    [{'_id': ObjectId('5ae46285dd58330cd666056f'),
      'account': 'scipio',
      'account_id': 422033,
      'active': True,
      'posts': [{'title': 'Learn Python Series (#19) - PyMongo Part 2',
                 'url': 'https://steemit.com/utopian-io/@scipio/learn-python-series-19-pymongo-part-2'},
                {'title': 'Learn Python Series (#18) - PyMongo Part 1',
                 'url': 'https://steemit.com/utopian-io/@scipio/learn-python-series-18-pymongo-part-1'},
                {'title': 'Learn Python Series (#17) - Roundup #2 - Combining and '
                          'analyzing any-to-any multi-currency historical data',
                 'url': 'https://steemit.com/utopian-io/@scipio/learn-python-series-17-roundup-2-combining-and-analyzing-any-to-any-multi-currency-historical-data'}],
      'slogan': "Does it matter who's right, or who's left?"},
     {'_id': ObjectId('5ae46693dd58330cd6660571'),
      'account': 'fabiyamada',
      'account_id': 261379,
      'active': True},
     {'_id': ObjectId('5ae4bc73dd58332709589486'),
      'account': 'jedigeiss',
      'active': True,
      'posts': [{'title': 'Das Tagebuch der (Steem)Leiden',
                 'url': 'https://steemit.com/deutsch/@jedigeiss/das-tagebuch-der-steem-leiden'},
                {'title': 'D-A-CH Support -- Discord / Steem Bridge -- added '
                          'Autovoter',
                 'url': 'https://steemit.com/utopian-io/@jedigeiss/d-a-ch-support-discord-steem-bridge-added-autovoter'}],
      'slogan': 'IT Nerd, Risk Specialist, Musician, Cryptocoin Enthusiast, '
                'Banker, Gamer'}]


**Nota bene:** The query we now ran using `$or` deliberately is the same, to show you the difference, as the example `$and` query we began with, because right now in total 3 documents were selected:

- the account (`scipio`) has both a `"posts"` field as well as an `"account_id"` field, which satisfies the `$or` clause (at least 1 expression evaluates to True, and it doesn't matter both expressions do);
- the account `jedigeiss` has a `"posts"` field;
- the account `fabiyamada` has an `"account_id"` field.

### Using the `$nor` operator

The `$nor` operator performs logical `NOR` operations on a list (array) of 2 or more expressions. As a result, the documents that satisfy NONE of all expressions, ergo when ALL expressions FAIL, will be selected.


```python
result = list(coll.find(
    {"$nor": [
        {"posts": {"$exists": True}},
        {"account_id": {"$exists": True}}
    ]}
))
pprint(result)
```

    [{'_id': ObjectId('5ae46693dd58330cd6660570'),
      'account': 'stoodkev',
      'active': True}]


### Using the `$not` operator

The `$not` operator performs logical `NOT` operations on 1 expression and selects the documents that do **not match** that expression. `$not` affects other operators.


```python
result = list(coll.find(
    {"account_id":{
        "$not": {"$exists": True}
    }}
))
pprint(result)
```

    [{'_id': ObjectId('5ae46693dd58330cd6660570'),
      'account': 'stoodkev',
      'active': True},
     {'_id': ObjectId('5ae4bc73dd58332709589486'),
      'account': 'jedigeiss',
      'active': True,
      'posts': [{'title': 'Das Tagebuch der (Steem)Leiden',
                 'url': 'https://steemit.com/deutsch/@jedigeiss/das-tagebuch-der-steem-leiden'},
                {'title': 'D-A-CH Support -- Discord / Steem Bridge -- added '
                          'Autovoter',
                 'url': 'https://steemit.com/utopian-io/@jedigeiss/d-a-ch-support-discord-steem-bridge-added-autovoter'}],
      'slogan': 'IT Nerd, Risk Specialist, Musician, Cryptocoin Enthusiast, '
                'Banker, Gamer'}]


# Other operators

### The `$size` operator
If you use the `$size` operator on a list (array) field, it will match documents having that exact number of elements:


```python
result = list(coll.find(
    {"posts": {"$size": 2}}
))
pprint(result)
```

    [{'_id': ObjectId('5ae4bc73dd58332709589486'),
      'account': 'jedigeiss',
      'active': True,
      'posts': [{'title': 'Das Tagebuch der (Steem)Leiden',
                 'url': 'https://steemit.com/deutsch/@jedigeiss/das-tagebuch-der-steem-leiden'},
                {'title': 'D-A-CH Support -- Discord / Steem Bridge -- added '
                          'Autovoter',
                 'url': 'https://steemit.com/utopian-io/@jedigeiss/d-a-ch-support-discord-steem-bridge-added-autovoter'}],
      'slogan': 'IT Nerd, Risk Specialist, Musician, Cryptocoin Enthusiast, '
                'Banker, Gamer'}]


**Nota bene:** the `$size` operator expects an integer number as its argument, you cannot use an expression such as:

```
result = list(coll.find(
    {"posts": {"$size": {"$gte": 2}}}
))
```

### The `$where` operator
For those of you that have experience in JavaScript programming, or for those aspiring Pythonistas feeling adventurous: special attention for the `$where` operator, since it allows for passing an argument string containing - you probably guessed it by now - a JavaScript expression (or even a JavaScript function).

However, please note that although the `$where` operator does provide a lot of flexibility, it is quite slow because it requires the MongoDB database to evaluate the JavaScript expression separately for every document in the selected collection.

A nice example, in which the `$where` expression shines, is by performing a "greater-than-or-equal-to"-type query for the number of elements in the `"posts"` list (array) field, which doesn't work with the same flexibility as we've just seen with the `$size` example:


```python
result = list(coll.find(
    {"posts": {"$exists": True}, "$where":"this.posts.length >= 2"} ))
pprint(result)
```

    [{'_id': ObjectId('5ae46285dd58330cd666056f'),
      'account': 'scipio',
      'account_id': 422033,
      'active': True,
      'posts': [{'title': 'Learn Python Series (#19) - PyMongo Part 2',
                 'url': 'https://steemit.com/utopian-io/@scipio/learn-python-series-19-pymongo-part-2'},
                {'title': 'Learn Python Series (#18) - PyMongo Part 1',
                 'url': 'https://steemit.com/utopian-io/@scipio/learn-python-series-18-pymongo-part-1'},
                {'title': 'Learn Python Series (#17) - Roundup #2 - Combining and '
                          'analyzing any-to-any multi-currency historical data',
                 'url': 'https://steemit.com/utopian-io/@scipio/learn-python-series-17-roundup-2-combining-and-analyzing-any-to-any-multi-currency-historical-data'}],
      'slogan': "Does it matter who's right, or who's left?"},
     {'_id': ObjectId('5ae4bc73dd58332709589486'),
      'account': 'jedigeiss',
      'active': True,
      'posts': [{'title': 'Das Tagebuch der (Steem)Leiden',
                 'url': 'https://steemit.com/deutsch/@jedigeiss/das-tagebuch-der-steem-leiden'},
                {'title': 'D-A-CH Support -- Discord / Steem Bridge -- added '
                          'Autovoter',
                 'url': 'https://steemit.com/utopian-io/@jedigeiss/d-a-ch-support-discord-steem-bridge-added-autovoter'}],
      'slogan': 'IT Nerd, Risk Specialist, Musician, Cryptocoin Enthusiast, '
                'Banker, Gamer'}]


and as you can see, in this case both the accounts of `scipio` as well as `jedigeiss` were selected correctly.

### Perform a textual search using the `$text` & `$search` operators
The `$text` operator is pretty cool, in that it allows you to search for words contained within the textual content of specific fields, provided those field are indexed with a **text index**.

To do so, first **place an index** (using `create_index()`) where you pass in the field key(s) as a list (array) and TEXT as the **index direction**. Then combine the  `$text` & `$search` operators and look for a specific word.

Like so:


```python
# Since the "title" field is nested within the elements contained,
# inside the "posts" field, use the dot-notation `.` to index
# the field "posts.title"
coll.create_index([("posts.title", pymongo.TEXT)])

result = list(coll.find(
    {"$text": {"$search": "Discord"}}
))
pprint(result)
```

    [{'_id': ObjectId('5ae4bc73dd58332709589486'),
      'account': 'jedigeiss',
      'active': True,
      'posts': [{'title': 'Das Tagebuch der (Steem)Leiden',
                 'url': 'https://steemit.com/deutsch/@jedigeiss/das-tagebuch-der-steem-leiden'},
                {'title': 'D-A-CH Support -- Discord / Steem Bridge -- added '
                          'Autovoter',
                 'url': 'https://steemit.com/utopian-io/@jedigeiss/d-a-ch-support-discord-steem-bridge-added-autovoter'}],
      'slogan': 'IT Nerd, Risk Specialist, Musician, Cryptocoin Enthusiast, '
                'Banker, Gamer'}]


# What did we learn, hopefully?

In this episode, we again gained more knowledge on how to query MongoDB via the PyMongo package. We discussed the Logical Query Operators `$and`, `$or`, `$nor` and `$not`, plus we went over the operators `$size`, `$where`, `$text` and `$search`.

And because I deliberately kept the queries and underlying dataset simple enough to comprehend (hopefully?) yet rich enough to demonstrate the various querying techniques, I hope it became clear that MongoDB / PyMongo provides us with some pretty powerful mechanisms to "precisely pinpoint" the data we're looking for based on a number of criteria!

### Thank you for your time!


<br /><hr/><em>Posted on <a href="https://utopian.io/utopian-io/@scipio/learn-python-series-20-pymongo-part-3">Utopian.io -  Rewarding Open Source Contributors</a></em><hr/>
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
properties (23)
authorscipio
permlinklearn-python-series-20-pymongo-part-3
categoryutopian-io
json_metadata"{"community":"utopian","app":"utopian/1.0.0","format":"markdown","repository":{"id":81598961,"name":"cpython","full_name":"python/cpython","html_url":"https://github.com/python/cpython","fork":false,"owner":{"login":"python"}},"pullRequests":[],"platform":"github","type":"tutorials","tags":["utopian-io","steemdev","steemstem","open-source","python"],"users":["scipio","jedigeiss"],"links":["https://cdn.utopian.io/posts/a553988d3a1bb9778db2bd768480e9e4c2f0python_logo.png","https://utopian.io/utopian-io/@scipio/learn-python-series-intro","https://utopian.io/utopian-io/@scipio/learn-python-series-2-handling-strings-part-1","https://utopian.io/utopian-io/@scipio/learn-python-series-3-handling-strings-part-2","https://utopian.io/utopian-io/@scipio/learn-python-series-4-round-up-1","https://utopian.io/utopian-io/@scipio/learn-python-series-5-handling-lists-part-1","https://utopian.io/utopian-io/@scipio/learn-python-series-6-handling-lists-part-2","https://utopian.io/utopian-io/@scipio/learn-python-series-7-handling-dictionaries","https://utopian.io/utopian-io/@scipio/learn-python-series-8-handling-tuples","https://utopian.io/utopian-io/@scipio/learn-python-series-9-using-import","https://utopian.io/utopian-io/@scipio/learn-python-series-10-matplotlib-part-1","https://utopian.io/utopian-io/@scipio/learn-python-series-11-numpy-part-1","https://utopian.io/utopian-io/@scipio/learn-python-series-12-handling-files","https://utopian.io/utopian-io/@scipio/learn-python-series-13-mini-project-developing-a-web-crawler-part-1","https://utopian.io/utopian-io/@scipio/learn-python-series-14-mini-project-developing-a-web-crawler-part-2","https://utopian.io/utopian-io/@scipio/learn-python-series-15-handling-json","https://utopian.io/utopian-io/@scipio/learn-python-series-16-mini-project-developing-a-web-crawler-part-3","https://utopian.io/utopian-io/@scipio/learn-python-series-17-roundup-2-combining-and-analyzing-any-to-any-multi-currency-historical-data","https://utopian.io/utopian-io/@scipio/learn-python-series-18-pymongo-part-1","https://utopian.io/utopian-io/@scipio/learn-python-series-19-pymongo-part-2","https://cdn.utopian.io/posts/f6991e3066151f9791917ad9c376ece2e6331.png"],"image":["https://cdn.utopian.io/posts/a553988d3a1bb9778db2bd768480e9e4c2f0python_logo.png","https://cdn.utopian.io/posts/f6991e3066151f9791917ad9c376ece2e6331.png"],"moderator":{"account":"mcfarhat","time":"2018-04-29T18:25:35.593Z","pending":false,"reviewed":true,"flagged":false},"questions":null,"score":null,"total_influence":null,"staff_pick":null,"staff_pick_by":null,"config":{"questions":[{"question":"How many substantial concepts does this tutorial address?","question_id":"tuts-1","answers":[{"answer":"4-5 substantial concepts covered in the tutorial.","answer_id":"tuts-1-a-1","value":10},{"answer":"2-3 substantial concepts covered in the tutorial.","answer_id":"tuts-1-a-2","value":7},{"answer":"1 substantial concept covered in the tutorial.","answer_id":"tuts-1-a-3","value":3},{"answer":"More than 5 substantial concepts covered in the tutorial.","answer_id":"tuts-1-a-4","value":0}]},{"question":"Does the title and the outline of the tutorial properly reflect the content?","question_id":"tuts-2","answers":[{"answer":"Yes, it is very clear.","answer_id":"tuts-2-a-1","value":15},{"answer":"To some extent.","answer_id":"tuts-2-a-2","value":11.5},{"answer":"The title is somewhat misleading and/or the outline is not detailed or informative enough.","answer_id":"tuts-2-a-3","value":4.5},{"answer":"Title and outline are of little or no relevance to the content of the tutorial.","answer_id":"tuts-2-a-4","value":0}]},{"question":"Did the contributor provide supplementary resources, such as code and sample files in the contribution post or a linked GitHub repository?","question_id":"tuts-3","answers":[{"answer":"Yes, exceptional supplementary resources are provided including a relevant github repo/gist.","answer_id":"tuts-3-a-1","value":15},{"answer":"Supplementary resources provided are of high relevance.","answer_id":"tuts-3-a-2","value":12},{"answer":"Contributor provides minimal supplementary resources.","answer_id":"tuts-3-a-3","value":6},{"answer":"No supplementary resources were provided.","answer_id":"tuts-3-a-4","value":0}]},{"question":"Is the tutorial part of a series?","question_id":"tuts-4","answers":[{"answer":"Yes.","answer_id":"tuts-4-a-1","value":10},{"answer":"Yes, but it is the first entry in the series.","answer_id":"tuts-4-a-2","value":7},{"answer":"No, but it works just fine as a stand-alone tutorial.","answer_id":"tuts-4-a-3","value":5},{"answer":"No.","answer_id":"tuts-4-a-4","value":0}]},{"question":"Does the tutorial contain sufficient explanatory visuals?","question_id":"tuts-5","answers":[{"answer":"Yes, the visual components of the post were adequate in quality and quantity.","answer_id":"tuts-5-a-1","value":10},{"answer":"The volume of visual components included was unnecessarily large.","answer_id":"tuts-5-a-2","value":7},{"answer":"The post lacked sufficient visualization to easily learn from the content.","answer_id":"tuts-5-a-3","value":3},{"answer":"No visualization was presented in this contribution.","answer_id":"tuts-5-a-4","value":0}]},{"question":"How unique and/or innovative are the concepts covered in the tutorial?","question_id":"tuts-6","answers":[{"answer":"This was the first time I read about the concepts covered.","answer_id":"tuts-6-a-1","value":10},{"answer":"The concepts covered were innovative and offer some usefulness.","answer_id":"tuts-6-a-2","value":7},{"answer":"I have read several similar ideas and thoughts elsewhere, but this one was of higher quality.","answer_id":"tuts-6-a-3","value":5},{"answer":"Such tutorials can be found online with great ease and the contribution add no value to the open source community.","answer_id":"tuts-6-a-4","value":0}]},{"question":"How would you describe the formatting, language and overall presentation of the post?","question_id":"c-1","answers":[{"answer":"The post is of very high quality.","answer_id":"c-1-a-1","value":10},{"answer":"The post is of decent quality, but not spectacular in any way.","answer_id":"c-1-a-2","value":7},{"answer":"The post is poorly written and/or formatted, but readable.","answer_id":"c-1-a-3","value":3},{"answer":"The post is really hard to read and the content is barely understandable.","answer_id":"c-1-a-4","value":0}]},{"question":"How would you rate the overall value of this contribution on the open source community and ecosystem?","question_id":"c-2","answers":[{"answer":"This contribution brings great and impactful value, and can be used for applications outside the specific project.","answer_id":"c-2-a-1","value":20},{"answer":"This contribution adds significant value to the open source community and ecosystem, or is of critical importance to the specific project.","answer_id":"c-2-a-2","value":16},{"answer":"This contribution adds some value to the open source community and ecosystem or is only valuable to the specific project.","answer_id":"c-2-a-3","value":8},{"answer":"This contribution adds no value to the open source community and ecosystem or the specific project.","answer_id":"c-2-a-4","value":0}]}]}}"
created2018-04-29 15:22:27
last_update2018-04-29 18:25:39
depth0
children8
last_payout2018-05-06 15:22:27
cashout_time1969-12-31 23:59:59
total_payout_value75.224 HBD
curator_payout_value26.155 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length18,389
author_reputation34,229,826,851,736
root_title"Learn Python Series (#20) - PyMongo Part 3"
beneficiaries
0.
accountutopian.pay
weight1,500
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id52,849,497
net_rshares18,097,426,553,405
author_curate_reward""
vote details (45)
@komischername ·
Oh man  I have waited for this tutorial my total life 😍 Thank you @scipio 
properties (22)
authorkomischername
permlinkre-scipio-learn-python-series-20-pymongo-part-3-20180429t220016626z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"community":"busy","app":"busy/2.4.0"}
created2018-04-29 22:00:18
last_update2018-04-29 22:00:18
depth1
children0
last_payout2018-05-06 22:00:18
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length74
author_reputation3,029,117,970,019
root_title"Learn Python Series (#20) - PyMongo Part 3"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id52,907,925
net_rshares0
@mcfarhat ·
$0.36
Thank you for another well presented tutorial !

----------------------------------------------------------------------
Need help? Write a ticket on https://support.utopian.io.
Chat with us on [Discord](https://discord.gg/uTyJkNm).

**[[utopian-moderator]](https://utopian.io/moderators)**
👍  
properties (23)
authormcfarhat
permlinkre-scipio-learn-python-series-20-pymongo-part-3-20180429t182752181z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"community":"utopian","app":"utopian/1.0.0"}
created2018-04-29 18:28:18
last_update2018-04-29 18:28:18
depth1
children1
last_payout2018-05-06 18:28:18
cashout_time1969-12-31 23:59:59
total_payout_value0.358 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length289
author_reputation150,651,671,367,256
root_title"Learn Python Series (#20) - PyMongo Part 3"
beneficiaries
0.
accountutopian.pay
weight1,500
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id52,880,042
net_rshares89,291,079,733
author_curate_reward""
vote details (1)
@scipio ·
$0.68
Thank you too! :-)
👍  
properties (23)
authorscipio
permlinkre-mcfarhat-re-scipio-learn-python-series-20-pymongo-part-3-20180429t205531031z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"app":"steemit/0.1"}
created2018-04-29 20:55:30
last_update2018-04-29 20:55:30
depth2
children0
last_payout2018-05-06 20:55:30
cashout_time1969-12-31 23:59:59
total_payout_value0.512 HBD
curator_payout_value0.171 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length18
author_reputation34,229,826,851,736
root_title"Learn Python Series (#20) - PyMongo Part 3"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id52,899,914
net_rshares109,765,467,443
author_curate_reward""
vote details (1)
@sabbir1213 ·
its really great information about Python. i think every python learner student is very benefit from this article.

Thank you from python student side.
properties (22)
authorsabbir1213
permlinkre-scipio-learn-python-series-20-pymongo-part-3-20180429t152618836z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"app":"steemit/0.1"}
created2018-04-29 15:26:21
last_update2018-04-29 15:26:21
depth1
children0
last_payout2018-05-06 15:26:21
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length151
author_reputation2,006,363,477,841
root_title"Learn Python Series (#20) - PyMongo Part 3"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id52,850,141
net_rshares0
@santoislam ·
dear @scipio your daily python learning series is really helpful for all.
properties (22)
authorsantoislam
permlinkre-scipio-learn-python-series-20-pymongo-part-3-20180429t171629635z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"users":["scipio"],"app":"steemit/0.1"}
created2018-04-29 17:16:30
last_update2018-04-29 17:16:30
depth1
children0
last_payout2018-05-06 17:16:30
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length73
author_reputation145,193,712,426
root_title"Learn Python Series (#20) - PyMongo Part 3"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id52,868,756
net_rshares0
@shagorshikder ·
python..the name of starange..feel like awesome
👍  
properties (23)
authorshagorshikder
permlinkre-scipio-learn-python-series-20-pymongo-part-3-20180501t134005391z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"app":"steemit/0.1"}
created2018-05-01 13:40:09
last_update2018-05-01 13:40:09
depth1
children0
last_payout2018-05-08 13:40:09
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length47
author_reputation1,883,539,080,155
root_title"Learn Python Series (#20) - PyMongo Part 3"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id53,240,189
net_rshares1,928,726,669
author_curate_reward""
vote details (1)
@shakibul ·
Good Post.    👌
👍  
properties (23)
authorshakibul
permlinkre-scipio-learn-python-series-20-pymongo-part-3-20180429t164050757z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"app":"steemit/0.1"}
created2018-04-29 16:40:54
last_update2018-04-29 16:40:54
depth1
children0
last_payout2018-05-06 16:40:54
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length15
author_reputation9,871,869,870
root_title"Learn Python Series (#20) - PyMongo Part 3"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id52,863,209
net_rshares443,086,588
author_curate_reward""
vote details (1)
@utopian-io ·
$4.26
#### Hey @scipio
We're already looking forward to your next contribution!
##### Decentralised Rewards
Share your expertise and knowledge by rating contributions made by others on Utopian.io to help us reward the best contributions together.
##### Utopian Witness!
<a href="https://v2.steemconnect.com/sign/account-witness-vote?witness=utopian-io&approve=1">Vote for Utopian Witness!</a> We are made of developers, system administrators, entrepreneurs, artists, content creators, thinkers. We embrace every nationality, mindset and belief.

**Want to chat? Join us on Discord https://discord.me/utopian-io**
👍  
properties (23)
authorutopian-io
permlinkre-scipio-learn-python-series-20-pymongo-part-3-20180501t170312751z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"community":"utopian","app":"utopian/1.0.0"}
created2018-05-01 17:03:18
last_update2018-05-01 17:03:18
depth1
children0
last_payout2018-05-08 17:03:18
cashout_time1969-12-31 23:59:59
total_payout_value4.257 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length606
author_reputation152,955,367,999,756
root_title"Learn Python Series (#20) - PyMongo Part 3"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id53,275,890
net_rshares742,025,872,941
author_curate_reward""
vote details (1)