MongoDB and Python 9781449312817, 1449312810, 9781449317096, 144931709X, 9781449317461, 1449317464

"Learn how to leverage MongoDB with your Python applications, using the hands-on recipes in this book. You get comp

444 44 616KB

English Pages 53 Year 2011

Report DMCA / Copyright

DOWNLOAD FILE

MongoDB and Python
 9781449312817, 1449312810, 9781449317096, 144931709X, 9781449317461, 1449317464

Table of contents :
Content: Table of Contents
Preface
Conventions Used in This Book
Using Code Examples
Safari® Books Online
How to Contact Us
Acknowledgments
Chapter 1. Getting Started
Introduction
Finding Reference Documentation
Installing MongoDB
Running MongoDB
Setting up a Python Environment with MongoDB
Chapter 2. Reading and Writing to MongoDB with Python
Connecting to MongoDB with Python
Getting a Database Handle
Inserting a Document into a Collection
Write to a Collection Safely and Synchronously
Guaranteeing Writes to Multiple Database Nodes
Introduction to MongoDB Query Language. Reading, Counting, and Sorting Documents in a CollectionUpdating Documents in a Collection
Deleting Documents from a Collection
MongoDB Query Operators
MongoDB Update Modifiers
Chapter 3. Common MongoDB and Python Patterns
A Uniquely Document-Oriented Pattern: Embedding
Fast Lookups: Using Indexes with MongoDB
Location-based Apps with MongoDB: GeoSpatial Indexing
Code Defensively to Avoid KeyErrors and Other Bugs
Update-or-Insert: Upserts in MongoDB
Atomic Read-Write-Modify: MongoDB's findAndModify
Fast Accounting Pattern
Chapter 4. MongoDB with Web Frameworks. Pylons 1.x and MongoDBPyramid and MongoDB
Django and MongoDB
Going Further.

Polecaj historie