Questions tagged [couchdb-python]

couchdb-python is a Python library for interfacing with the document-oriented, CouchDB NoSQL database.

couchdb-python consists of four main modules:

  1. couchdb.client, which contains code for interfacing with the CouchDB server
  2. couchdb.design, which enables creation and modification of design documents
  3. couchdb.mapping, a helper module that maps between CouchDB and Python objects and
  4. couchdb.view, a view server that allows one to write view functions in Python rather than the standard JavaScript.

You can find more information from the couchdb-python website or browse the documentation.

79 questions
1
vote
2 answers

couchdb-python and map function ViewField execute

How is it possible to execute in couchdb-python a map function which is in ViewField define >>> from couchdb import Server >>> from couchdb.mapping import Document, TextField, IntegerField, DateTimeField, ViewField >>> db =…
user977828
  • 7,259
  • 16
  • 66
  • 117
1
vote
2 answers

Scratch couchdb document

Is it possible to "scratch" a couchdb document? By that I mean to delete a document, and make sure that the document and its history is completely removed from the database. I do not want to perform a database compaction, I just want to fully wipe…
blueFast
  • 41,341
  • 63
  • 198
  • 344
1
vote
1 answer

python-couchdb add ViewField to Model after instantiation

I am trying to build a base model class with the most used couch-views on it (mainly those for CRUD). I cannot just add the ViewFields to the base class, since the js string inside must be changed slightly per the model class name. This is no…
Mathias Nielsen
  • 1,560
  • 1
  • 17
  • 31
1
vote
2 answers

Does different language = different performance in couchDB lists?

I am writing a list function in couchDB. I want to know if using a faster language than javascript would boost performance (i was thinking python, just because I know it). Does anyone know if this is true, and has anyone tested whether it is true?
ddouglascarr
  • 1,334
  • 3
  • 14
  • 23
1
vote
2 answers

storing tgz to couchdb with python

I am trying to read a tgz file and writing it to couchdb. here is the code. import couchdb conn = couchdb.Server('http://localhost:5984') db = conn['test'] with open('/tmp/test.txt.tgz.enc') as f: data = f.read() doc = {'file': data} …
dave
  • 161
  • 2
  • 12
1
vote
3 answers

How to access CouchDB server from another computer?

I created a couchDB on my computer, that is I used the Python line server = couchdb.Server('http://localhost:5984') I want to share this database with two other colleagues. How can I make it available to them? For the moment, I am comfortable giving…
mac389
  • 3,004
  • 5
  • 38
  • 62
1
vote
1 answer

CouchDB-Python: how to use “_show” and “_list” functions?

The python-couchdb package (used as import couchdb) provides a db.view() function to access a couchdb "_view", but how do you access a "_show" or "_list" function? This was asked before…
pirhac
  • 887
  • 2
  • 8
  • 16
1
vote
0 answers

CouchDB connection lost without error

The program is being developed in Python. It contains lots of queries to a remote CouchDB database. The program begins to run and after a while, it is just freezes up. When I check the connection, I observe that the CouchDB database connection has…
Shnkc
  • 2,108
  • 1
  • 27
  • 35
1
vote
1 answer

Compare two couchdb databases

I have a couchdb instance with database a and database b. They should contain identical sets of documents, except that the _rev property will be different, which, AIUI, means I can't use replication. How do I verify that the two databases really do…
Gijs
  • 5,201
  • 1
  • 27
  • 42
0
votes
2 answers

How to store output of os.urandom(8) in CouchDB?

I am trying to store some cryptographic data in couchdb. I need to store a salt and encrypted password in couchdb. The salt is generated using python's os.urandom(8) and the sample output of that would look like: 'z/\xfe\xdf\xdeJ=y' I'm using…
Mark
  • 2,137
  • 4
  • 27
  • 42
0
votes
1 answer

Using couchdb.mapping and unable to set an attribute

Hi everyone and couchdb pros, I have a mapping setup like such: class Product(BaseModel): name= mapping.TextField() returned = mapping.DictField(mapping.Mapping.build( reason = mapping.TextField(), put_back = mapping.BooleanField() …
Mark
  • 2,137
  • 4
  • 27
  • 42
0
votes
0 answers

What's the recommended way to interface with Apache CouchDB from a Python app?

I want to have an instance of CouchDB running, and access it from a Python frontend. couchdb-python seems like a good option, but it's been unmaintained since 2019. Is it a viable idea to use it nonetheless, or is there another API wrapper that's…
theo
  • 149
  • 8
0
votes
0 answers

Temporary views are not supported in CouchDB when using couchdb-python

My CouchDB stores documents structured in the following way: { "_id": "1e8903e7b054c5129d3d5b605f000366", "_rev": "1-f95adbeff8401059f55494da920e2725", "person": "Rachel", "age": 36 } I'm trying to read contents of such documents using the…
AbreQueVoy
  • 1,748
  • 8
  • 31
  • 52
0
votes
0 answers

How to compare a Returned value from couchdb emit javascript function

I did a couchdb view in Javascript and when I test it with a get python requests, it returns me things I want when I do : url='http://admin:kolea21342@localhost:5984/my_database_2/_design/newdesigndoc/_view/ReviewinUsers?key="ayoub"' res =…
user18862346
0
votes
1 answer

CouchDB stops with socket error 54 partway through first indexing

I'm trying to sort ~13,000 documents on my Mac's local CouchDB database by date, but it gets hung up on document 5407 each time. I've tried increasing the time-out tolerance on Futon but to no avail. This is the error message I'm getting: for row in…
Mike G
  • 1