Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from pymongo import Connection
- from pymongo.objectid import ObjectId
- connection = Connection()
- db = connection.coledit_development
- def test():
- project = db.projects.find_one({'_id': ObjectId('4e52ccbd3a5c9f20b8000003')})
- #print project['name']
- from timeit import Timer
- t = Timer("test()", "from __main__ import test")
- print t.timeit(10000)
Add Comment
Please, Sign In to add comment