How can I get the fields for a couchdb document? I’m thinking of how to use couchdb-python, and often will not know the complete set of fields for a document. I haven’t seen anything about how to introspect a document in the docs. What’s the best way? If the document was a python object I would query object.__dict__ for its attributes.
How can I get the fields for a couchdb document? I’m thinking of how
Share
.keys() returns a list of field names.
You should get the doc id, followed by the fields.