import pymongo
import uuid
c = pymongo.Connection()
uu = uuid.uuid4()
uu
c.test.uuidtest.insert({'_id': uu})
c.test.uuidtest.find_one()
How to create a worldwide unique GUID/UUID system for Mongo with Python?