【发布时间】:2016-08-31 05:16:26
【问题描述】:
我最近开始使用 Python。我在 Couchdb 中有一个名为 student 的数据库。我有一些属性,比如[英语、数学、科学、总数、百分比]。我想使用 python 显示我的学生数据库中的所有文档。我无法访问所有文件。我尝试了以下代码但没有用
couch = couchdb.Server()
db = couch['student']
rows = db.view('_all_docs', include_docs=True)
for row in rows:
doc = db.get(row)
print(doc['english'])
【问题讨论】:
标签: python database couchdb printdocument