A tutorial on PyMongo from Rick Copeland covering:
- configuration options for MongoDB
- documents structure, inserts and batch inserts
- querying and indexing
One thing that’s nice about the pymongo connection is that it’s automatically pooled. What this means is that pymongo maintains a pool of connections to the mongodb server that it reuses over the lifetime of your application. This is good for performance since it means pymongo doesn’t need to go through the overhead of establishing a connection each time it does an operation. Mostly, this happens automatically. you do, however, need to be aware of the connection pooling, however, since you need to manually notify pymongo that you’re “done” with a connection in the pool so it can be reused.
Original title and link: Quick Guide to MongoDB and Python With PyMongo ( ©myNoSQL)