Python Script for Mongodb