在文档https://python-cloudant.readthedocs.io/en/latest/database.html中展示了如何创建文档和数据库,但没有展示如何创建视图
有人可以帮助我吗?我正在将 cloudant 与 python(Flask) 一起使用...
class TestContext(unittest.TestCase):
def setUp(self):
self.client_couchdb = CouchDB(
user='admin',
auth_token='token123',
url='https://couchbk.123',
connect=True
)
self.doc_test = {
'_id': 'julia102',
'name': 'Julia',
'age': 30,
'type': 'event'
}
self.db = self.client_couchdb.create_database('test')
self.db.create_document(self.doc_test)