I am using pymongo driver. Supposedly, one can use a string to query the _id field of a document, like this:
thing = db.things.find_one({\'_id\':\'4ea113d6b6848
To print it:
import pymongo from bson.objectid import ObjectId print(db.things.find_one({'_id': ObjectId('4ea113d6b684853c8e000001')}))
if you don't want to print, store in other variable