Cookies help us deliver our services. By using our services, you agree to our use of cookies. More information

Difference between revisions of "Main Page"

From NoSQLZoo
Jump to: navigation, search
Line 1: Line 1:
 +
<pre class=setup>
 +
#ENCODING
 +
import io
 +
import sys
 +
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-16')
 +
#MONGO
 +
from pymongo import MongoClient
 +
client = MongoClient()
 +
client.progzoo.authenticate('scott','tiger')
 +
db = client['progzoo']
 +
#PRETTY
 +
import pprint
 +
pp = pprint.PrettyPrinter(indent=4)
 +
</pre>
 
{{TopTenTips}}
 
{{TopTenTips}}
 
Learn NoSQL using: MongoDB, PyMongo, and Python3.4
 
Learn NoSQL using: MongoDB, PyMongo, and Python3.4
 +
<div class=q data-lang="py3">
 +
Show all the data concering France.
 +
<pre class=def>
 +
pp.pprint(list(
 +
    db.world.find({"name":"France"})
 +
))
 +
</pre>
 +
</div>
 
==Tutorials: Learn NoSQL in stages==
 
==Tutorials: Learn NoSQL in stages==
 
; [[FIND basics|0 FIND basics]]:Some examples of common queries.
 
; [[FIND basics|0 FIND basics]]:Some examples of common queries.

Revision as of 11:02, 27 July 2015

#ENCODING
import io
import sys
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-16')
#MONGO
from pymongo import MongoClient
client = MongoClient()
client.progzoo.authenticate('scott','tiger')
db = client['progzoo']
#PRETTY
import pprint
pp = pprint.PrettyPrinter(indent=4)

Learn NoSQL using: MongoDB, PyMongo, and Python3.4

Show all the data concering France.

pp.pprint(list(
    db.world.find({"name":"France"})
))

Tutorials: Learn NoSQL in stages

0 FIND basics
Some examples of common queries.
1 FIND names
Some pattern matching queries.
2 AGGREGATE basics
Examples of the aggregation framework.
3 AGGREGATE world
In which we query the world collection and make use of aggregate functions.
4 MAPREDUCE basics
Using MapReduce.
5 MAPREDUCE elite
MapReduce questions using the Elite Dangerous dataset.

Reference: How to...

Coming Soon.

MongoDB resources

Manuals
MongoDB Documentaion MongoDB Documentation GitHub
Python 3 Documentaion PyMongo API Documentation
Karl Seguin's The Little MongoDB Book