![](/img/trans.png)
[英]How to retrieve all docs from couchdb and convert it as CSV using python
[英]How to display all documents in Couchdb using Python
我最近开始使用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'])
import couchdb
couch = couchdb.Server('localhost:5984/')
db = couch['newtweets']
count = 0
for docid in db.view('_all_docs'):
i = docid['id']
#and you are in each document
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.