= pymongo = PyMongo is a Python distribution containing tools for working with MongoDB, and is the recommended way to work with MongoDB from Python [[http://api.mongodb.org/python/current/]] == Install from source on Slackware == * cd /tmp * git clone git://github.com/mongodb/mongo-python-driver.git pymongo * cd pymongo/ * su * python setup.py install == Eclipse - pydev == * Window * Preferences * pydev * interpreter - python * Forced builtins * new * pymongo * apply Ok == Queries == === Query by _id === {{{#!highlight python from bson import ObjectId import pymongo import datetime mongo = pymongo.Connection('10.0.0.130', 45555) dbx = mongo['dbx'] collx = dbx['collx'] nowx = datetime.datetime.now(); currDay = datetime.datetime(nowx.year,nowx.month,nowx.day,0,0,0,0) query={'_id':ObjectId(objx.getId()) } print query res = collx.find_one(query ) print res }}} == Driver windows Python 2.5 == https://pypi.python.org/packages/2.5/p/pymongo/pymongo-2.6.3.win32-py2.5.exe