pymongo

pymongo 存入当前时间ISODate格式到mongo

June 15, 2017 Python No comments , , ,

import datetime
dateStr = datetime.datetime.now().strft("%Y-%m-%dT%H:%M:%S.%fZ")
dateISODate = datetime.datetime.strptime(dateStr, "%Y-%m-%dT%H:%M:%S.[......]

Read more

python+mongodb note

February 27, 2017 Database, Python, Science No comments , ,

持续更新, 最后更新时间2017-04-05

pymongo获得client的数据库名

`client.database_names()'

pymongo获得db中的collection名

`db.collection_names()'

pymong获得collection中的it[......]

Read more