a library provided by cloudant for python users to access the Cloudant DB as a Service API
Questions tagged [python-cloudant]
27 questions
0
votes
0 answers
How can I search for a document whom a field contains a regex matches with the query?
I have a collection of documents with a field called "idPattern" containing regex string. I want to search all documents that their fields "idPattern" regex string matches with my search string or a substring of it. How can I perform…

Douglas Lima Dantas
- 23
- 4
0
votes
1 answer
Can I connect my IBM Cloudant Database as the callback URL for my Twilio IBM STT add-on service?
I have a Watson voice assistant instance connected using SIP trunk to a Twilio API. I want to enable to the IBM Speech-To-Text add-on from the Twilio Marketplace which will allow me to obtain full transcriptions of phone calls made to the Watson…
0
votes
0 answers
CouchDB $in query results in Error : 400 Client Error: Bad Request bad_arg Bad argument for operator $in:
While executing a CouchDB query with the $in option , it results in error.
400 Client Error: Bad Request bad_arg Bad argument for operator $in: <<91,,,107,34,93>>
The query being used is
{u'$and': [{u'messageContent.component': {u'$in':…

Raj
- 1
0
votes
1 answer
Error building a python script in IBM Cloud for Data refinery
I'm trying to execute this code in a notebook:
from cloudant.client import Cloudant
client = Cloudant('yyyyyy', 'xxxxxxxx', url='https://yyyyyy.cloudant.com',
connect=True,
auto_renew=True)
my_database = client['logs']
my_document =…
0
votes
1 answer
Getting ImportError: No module named document for any cloudant import
I'm trying to use cloudant-python library in my application, but I'm not able to import the library itself as I'm getting ImportError: No module named document as soon as I try to import anything from cloudant context. Following are…

Utkarsh Patil
- 29
- 5
0
votes
1 answer
cloudant: update document which replace existing data
I have following document
{
"_id": "9036472948305957379",
"_rev":"162de87a696361533791aa7",
"firstname":"xyz",
"lastname": "abc"
}
Now I want to update above dosument to following
{
"_id": "9036472948305957379",
…

DaenKhaleesi
- 179
- 2
- 5
- 17
0
votes
1 answer
Issues while inserting data in cloudant DB
I am working a project, where in I am suppose to get some user input through web application, and send that data to cloudant DB. I am using python for the use case. Below is the sample code:
import requests
import json
dict_key ={}
key =…

user3521180
- 1,044
- 2
- 20
- 45
0
votes
1 answer
Cloudant: How to perform wildcard searches on text fields
I have a db in cloudant that looks like this
count word
4 a
1 a boy
1 a boy goes
i want to run a query like this
word: *boy*
how do i do this in cloudant? i tried the following but it did not work
{
"selector": {
"word":…

AbtPst
- 7,778
- 17
- 91
- 172
0
votes
1 answer
Flask Cloudant slow response time
I am creating a Flask application that is connecting to a Cloudant database using the python cloudant library.
My response time when I just add connect statement (with no queries) can be anywhere from .4s to 12s. My connect statement is like…

John Smith
- 99
- 1
- 2
- 13
0
votes
1 answer
how to call _all_docs primary index with list of keys using python-cloudant?
I'm currently using the primary index to query for a list of keys in a Cloudant database:
class DAO:
@staticmethod
def get_movie_names(movie_ids: List[int]) -> Dict[int, str]:
# The movie_ids in cloudant are stored as strings so…

Chris Snow
- 23,813
- 35
- 144
- 309
-1
votes
1 answer
How to create views with cloudant
In docs https://python-cloudant.readthedocs.io/en/latest/database.html show how to create_documents and database, but doesn't show how to create views
can somebody help me?.
I'm using cloudant with python(Flask)...
class…

Ivan Camilito Ramirez Verdes
- 1,131
- 3
- 11
- 16
-1
votes
1 answer
Unable to load data from Cloudant into Python/Spark dataframe in Watson Studio Notebook
I am trying to load the data from Cloudant DB into a Python/Spark dataframe in Python and Spark environment in Watson Studio. I have followed the steps mentioned in this link and stuck in Procedure 3: Step 5. I already have a cloudant DB with the…

Arun Kumar L
- 11
- 1