Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import pymongo, datetime
- from pymongo import MongoClient
- client = MongoClient("mongodb://localhost:27017/")
- db = client.Experience
- collection = db.Reputation
- post = {"author": "William",
- "text": "May you help?",
- "date": datetime.datetime.now()}
- collection.insert_one(post)
Add Comment
Please, Sign In to add comment