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
0
votes
1 answer

Quering in a array/list in CouchDB

I do not know how to implement the following query in CouchDB: chr.letter between two objects/dicts in chr are not the same and no X, and the document must be in range 200000 - 2000000, but I guess it has to be done with startkey and endkey in the…
user977828
  • 7,259
  • 16
  • 66
  • 117
0
votes
1 answer

How to update a document in CouchDB

I have a list r which contains 12 lists as elements. Each list contains some elements (i[0] to i[5]) which are the same compare to other lists. I tried only to insert unique documents so as result I should get 5 documents in the DB. If the document…
user977828
  • 7,259
  • 16
  • 66
  • 117
0
votes
1 answer

couchdb-python specify own _id failed

How is it possible to define own _id in couchdb-python (0.9), because when I tried '_id': i[5] I got the following error message? $ python test3.py 828288 Traceback (most recent call last): File "test3.py", line 42, in db.save(doc) …
user977828
  • 7,259
  • 16
  • 66
  • 117
0
votes
1 answer

TypeError: int() argument must be a string or a number, not 'tuple' with couchdb-python

I got $ python test3.py 828288 Traceback (most recent call last): File "test3.py", line 48, in test.pos = i[3], File "/home/mic/.virtualenvs/test/lib/python2.7/site-packages/couchdb/mapping.py", line 105, in __set__ value =…
user977828
  • 7,259
  • 16
  • 66
  • 117
0
votes
1 answer

Error occurred while writing a data into CouchDB

I am trying to Delete the whole data from the CouchDB and again i am trying to write same data with modified **_id field and some extra field ** but i am getting following error : { 'reason' => 'Document update conflict.', 'error'…
0
votes
1 answer

Equal distribution of couchdb document keys for parallel processing

I have a couchdb db instance where each document has a unique id (string). I would like to go over each document in the db and perform some external operation based on the contents of each document (for ex: connecting to another web server to get…
Prakash
  • 63
  • 4
0
votes
2 answers

Python 3 can't use with couch db

I am using IDE PyCharm 3.4 and python 3.3 (tried use python 3.4 but the same problem). I want to install CouchDB package through IDE: Step by step: 1) Install "Pygments" package (because it's required package) 2) Trying to install "CouchDB"package…
Anton Erjomin
  • 183
  • 1
  • 1
  • 9
0
votes
1 answer

with Python, how can I save a json dumps as a CouchDB document?

Given the following example data : [ "this", 1000, { "that": 1 } ] (which is valid json according to jsonlint.com) data=json.loads('["this",1000,{"that":1}]') when I try to save that structure to CouchDB, it generates an…
Matt
  • 79
  • 2
  • 9
0
votes
1 answer

how to set group=True in couchdb-python

How is it possible to set group=True in couchdb-python ? from couchdb import Server from couchdb.mapping import Document, TextField, IntegerField, DateTimeField, ViewField server = Server() db = server.create('python-tests2') class…
user977828
  • 7,259
  • 16
  • 66
  • 117
0
votes
1 answer

How can I synchronize views from python couchdb to my design docs using a ViewField of the Document Mapping classes?

I'm trying to use the Document mapping classs for the python couchdb lib but I am finding the docs extremely inadequate It includes a few lines of code on how to define a view on the Document subclass your using but these are not synced with the…
WebSnake
  • 62
  • 8
0
votes
1 answer

couchdb python query document from view

Based on existing question Multiple CouchDB Document fetch with couchdb-python The question was: Blockquote: How to fetch multiple documents from CouchDB, in particular with couchdb-python? One answer was: Blockquote: Easiest way is to pass a…
user3105117
  • 1
  • 1
  • 3
0
votes
2 answers

bulk update failing when document has attachments?

I am performing the following operation: Prepare some documents: docs = [ doc1, doc2, ... ]. The documents have maybe attachments I POST to _bulk_docs the list of documents I get an Exception > Problems updating list of documents (length = 1):…
blueFast
  • 41,341
  • 63
  • 198
  • 344
0
votes
0 answers

CouchDb : Deleting a huge document first time gives Status: 500 (Internal Server Error)

When I try to delete a document (5Mb) in couchdb for the first time , I get this Status: 500 (Internal Server Error) {"error":"os_process_error","reason":"{exit_status,1}"} While deleting the document the 2nd time deletes it correctly. This…
dogfish
  • 2,646
  • 4
  • 21
  • 37
0
votes
1 answer

unable to run views written in python in couchdb futon

i started using couchdb with python-couchdb recently. The problem is when i use futon run my views written in python i get the following error message: Error: os_process_error {exit_status,4} even for the default view it crashes. def fun(doc): …
Rakon_188
  • 573
  • 2
  • 7
  • 15
0
votes
1 answer

Quickest way to add a field to each document in a large couchDB using python

I have a couchDB with over 1 million entries spread over a few databases. I need to draw random samples from such that I have a record of the members of each sample. To that end, and following this question I want to add a field with a random number…
mac389
  • 3,004
  • 5
  • 38
  • 62