You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by "Ramanadham, Radhika" <ra...@emc.com> on 2014/03/20 17:31:57 UTC

using python-cloudant to connect to couchDB

Hi guys,
I have a dumb question.

Now with  cloudant, how do I connect to my couchDB server (http://localhost:5984)  with no username and password?

All the examples I see connect to cloudant and not couchDB. How do I connect to http://127.0.0.1:5984/

import cloudant

# connect to your account
# in this case, https://garbados.cloudant.com
USERNAME = 'garbados'
account = cloudant.Account(USERNAME, async=True)

# login, so we can make changes
future = account.login(USERNAME, PASSWORD)
# block until we get the response body
login = future.result()
assert login.status_code == 200

Thanks,
Radhika

Re: using python-cloudant to connect to couchDB

Posted by Mike Marino <mm...@gmail.com>.
> But, I see they say its an interface for cloudant or couchDB

Absolutely, see my last email about passing the uri to Account.

>
>
> https://pypi.python.org/pypi/cloudant/0.5.6
>
>
>
>
>
> -----Original Message-----
> From: Mike Marino [mailto:mmarino@gmail.com]
> Sent: Thursday, March 20, 2014 12:58 PM
> To: user@couchdb.apache.org
> Subject: Re: using python-cloudant to connect to couchDB
>
>
>
>>> Am 20.03.2014 um 17:41 schrieb Robert Samuel Newson <rn...@apache.org>>:
>>
>
>> The library exists to connect you to cloudant, which is a remote
>
>> service. :)
>
>
>
> While this is true, it also works plenty well to connect to any couchdb instance. We've switched to using it and I've found the interface somewhat better (cleaner?) in comparison to other similar modules.
>
>
>
> Of course a matter of taste.
>
>
>
> mgm
>
>
>
>> B.
>
>
>>> On 20 Mar 2014, at 16:31, Ramanadham, Radhika <ra...@emc.com>> wrote:
>
>
>>> Hi guys,
>
>>> I have a dumb question.
>
>
>>> Now with  cloudant, how do I connect to my couchDB server (http://localhost:5984)  with no username and password?
>
>
>>> All the examples I see connect to cloudant and not couchDB. How do I
>
>>> connect to http://127.0.0.1:5984/
>
>
>>> import cloudant
>
>
>>> # connect to your account
>
>>> # in this case, https://garbados.cloudant.com USERNAME = 'garbados'
>
>>> account = cloudant.Account(USERNAME, async=True)
>
>
>>> # login, so we can make changes
>
>>> future = account.login(USERNAME, PASSWORD) # block until we get the
>
>>> response body login = future.result() assert login.status_code == 200
>
>
>>> Thanks,
>
>>> Radhika
>
>
>

Re: using python-cloudant to connect to couchDB

Posted by Mike Marino <mm...@gmail.com>.
> Am 20.03.2014 um 20:26 schrieb Andy Wenk <an...@nms.de>:
>
> The statement says that this is interface for Cloudant who are using
> CouchDB. So you can query CouchDB databases hosted at Cloudant. You can't
> use this interface for a local CouchDB database.
>

This is completely incorrect. We use this module to connect to our
local couchdb databases.


> Please have a look at http://couchdbkit.org/ and
> https://code.google.com/p/couchdb-python
>
> Cheers
>
> Andy
>
>
>
>
>
>
>>
>>
>>
>> -----Original Message-----
>> From: Mike Marino [mailto:mmarino@gmail.com]
>> Sent: Thursday, March 20, 2014 12:58 PM
>> To: user@couchdb.apache.org
>> Subject: Re: using python-cloudant to connect to couchDB
>>
>>
>>
>>> Am 20.03.2014 um 17:41 schrieb Robert Samuel Newson <rnewson@apache.org
>> <ma...@apache.org>>:
>>
>>>
>>
>>> The library exists to connect you to cloudant, which is a remote
>>
>>> service. :)
>>
>>
>>
>> While this is true, it also works plenty well to connect to any couchdb
>> instance. We've switched to using it and I've found the interface somewhat
>> better (cleaner?) in comparison to other similar modules.
>>
>>
>>
>> Of course a matter of taste.
>>
>>
>>
>> mgm
>>
>>
>>
>>> B.
>>
>>>
>>
>>>> On 20 Mar 2014, at 16:31, Ramanadham, Radhika <
>> radhika.ramanadham@emc.com<ma...@emc.com>> wrote:
>>
>>>>
>>
>>>> Hi guys,
>>
>>>> I have a dumb question.
>>
>>>>
>>
>>>> Now with  cloudant, how do I connect to my couchDB server (
>> http://localhost:5984)  with no username and password?
>>
>>>>
>>
>>>> All the examples I see connect to cloudant and not couchDB. How do I
>>
>>>> connect to http://127.0.0.1:5984/
>>
>>>>
>>
>>>> import cloudant
>>
>>>>
>>
>>>> # connect to your account
>>
>>>> # in this case, https://garbados.cloudant.com USERNAME = 'garbados'
>>
>>>> account = cloudant.Account(USERNAME, async=True)
>>
>>>>
>>
>>>> # login, so we can make changes
>>
>>>> future = account.login(USERNAME, PASSWORD) # block until we get the
>>
>>>> response body login = future.result() assert login.status_code == 200
>>
>>>>
>>
>>>> Thanks,
>>
>>>> Radhika
>>
>>>
>>
>>
>>
>
>
> --
> Andy Wenk
> Hamburg - Germany
> RockIt!
>
> http://www.couchdb-buch.de
> http://www.pg-praxisbuch.de
>
> GPG fingerprint: C044 8322 9E12 1483 4FEC 9452 B65D 6BE3 9ED3 9588
>
> https://people.apache.org/keys/committer/andywenk.asc

Re: using python-cloudant to connect to couchDB

Posted by Alexander Shorin <kx...@gmail.com>.
On Thu, May 15, 2014 at 7:21 AM, Ramanadham, Radhika
<ra...@emc.com> wrote:
>
> I have couchdb running on linux box.
>
> SUSE Linux Enterprise Server 11 (x86_64)
> VERSION = 11
> PATCHLEVEL = 3
>
> Python version is  3.3 and have python-cloudant (cloudant-0.5.6) module installed.
>
> Now when I try to run my code, it fails with the error-
>
>   File "./first.py", line 2, in <module>
>     import cloudant
>   File "/usr/lib/python3.3/site-packages/cloudant-0.5.6-py3.3.egg/cloudant/__init__.py", line 1, in <module>
> ImportError: cannot import name Resource
>
> My code works great on a windows box. I am now having issues with running any py script because of the above error. Can anyone please help?

That should be fixed in 0.5.7+ try to update.

--
,,,^..^,,,

Re: using python-cloudant to connect to couchDB

Posted by Mike Marino <mm...@gmail.com>.
Hi Radhika,

This type of error would be probably be best reported directly to the
cloudant-python developers.  I would suggest opening up an issue here:

https://github.com/cloudant-labs/cloudant-python/issues

I have found them to be pretty responsive.

Cheers,
Mike


On Thu, May 15, 2014 at 5:21 AM, Ramanadham, Radhika <
radhika.ramanadham@emc.com> wrote:

> Hi,
>
> I have couchdb running on linux box.
>
> SUSE Linux Enterprise Server 11 (x86_64)
> VERSION = 11
> PATCHLEVEL = 3
>
> Python version is  3.3 and have python-cloudant (cloudant-0.5.6) module
> installed.
>
> Now when I try to run my code, it fails with the error-
>
>   File "./first.py", line 2, in <module>
>     import cloudant
>   File
> "/usr/lib/python3.3/site-packages/cloudant-0.5.6-py3.3.egg/cloudant/__init__.py",
> line 1, in <module>
> ImportError: cannot import name Resource
>
> My code works great on a windows box. I am now having issues with running
> any py script because of the above error. Can anyone please help?
>
> Thanks,
> Radhika
>
>
>
> -----Original Message-----
> From: Simon Metson [mailto:simon@cloudant.com]
> Sent: Friday, March 21, 2014 4:16 AM
> To: user@couchdb.apache.org
> Subject: Re: using python-cloudant to connect to couchDB
>
> The biggest difference is the Cloudant module supports our search
> interface. I think Max's aim is to make it work for CouchDB as much as
> possible but where api's diverge get Cloudant support done first. For
> things like document and database crud you should be fine. I think Radhikas
> use case would be well supported.
> Cheers
> Simon
>
>
> On Friday, 21 March 2014 at 01:29, Mike Marino wrote:
>
> > Hi Andy,
> >
> > > well - obviously I am wrong. I am sorry. Thanks for your example
> > > Mike. I think Radhikas question is very well answered then :)
> > >
> >
> >
> > No problem, I probably should've sent the gist link with my first
> > response to avoid confusion. :-)
> >
> > > But I am still wondering if the intention of this library is to use
> > > it for Apache CouchDB's and not only Cloudant. But on the other side
> > > if it works it works ...
> > >
> >
> >
> > I thought so to, initially. Certainly the name suggests this!
> > However, I don't think there are any features (yet?) that are
> > cloudant-API specific. I may be wrong about this.
> >
> > Biggest differences I've found in comparison to the more well known
> > modules you listed is the built in async behavior and the avoidance of
> > anything to do with document schemes. (It's quite a bit more
> > lightweight.) It's not the only "other" module to do this; there's an
> > open discussion concerning this on the GitHub page:
> >
> > https://github.com/cloudant-labs/cloudant-python/issues/25
> >
> > Cheers,
> > Mike
> >
> > >
> > > Cheers
> > >
> > > Andy
> > >
> > >
> > > > On 20 March 2014 20:30, Mike Marino <mm...@gmail.com> wrote:
> > > >
> > > > Here is a gist demonstrating using the cloudant module connecting
> > > > to a local couchdb:
> > > >
> > > > https://gist.github.com/mgmarino/9526872
> > > >
> > > > Cheers,
> > > > Mike
> > > >
> > > > > Am 20.03.2014 um 20:26 schrieb Andy Wenk <an...@nms.de>:
> > > > >
> > > > > Radhika,
> > > > >
> > > > > On 20 March 2014 19:08, Ramanadham, Radhika
> > > > > <radhika.ramanadham@emc.com
> > > > > wrote:
> > > > >
> > > > > > But, I see they say its an interface for cloudant or couchDB
> > > > > >
> > > > > >
> > > > > >
> > > > > > https://pypi.python.org/pypi/cloudant/0.5.6
> > > > >
> > > > >
> > > > > The statement says that this is interface for Cloudant who are
> > > > > using CouchDB. So you can query CouchDB databases hosted at
> > > > > Cloudant. You can't use this interface for a local CouchDB
> database.
> > > > >
> > > > > Please have a look at http://couchdbkit.org/ and
> > > > > https://code.google.com/p/couchdb-python
> > > > >
> > > > > Cheers
> > > > >
> > > > > Andy
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > -----Original Message-----
> > > > > > From: Mike Marino [mailto:mmarino@gmail.com]
> > > > > > Sent: Thursday, March 20, 2014 12:58 PM
> > > > > > To: user@couchdb.apache.org
> > > > > > Subject: Re: using python-cloudant to connect to couchDB
> > > > > >
> > > > > >
> > > > > >
> > > > > > > Am 20.03.2014 um 17:41 schrieb Robert Samuel Newson <
> > > > rnewson@apache.org
> > > > > > <ma...@apache.org>>:
> > > > > >
> > > > > >
> > > > > > > The library exists to connect you to cloudant, which is a
> > > > > > > remote
> > > > > >
> > > > > > > service. :)
> > > > > >
> > > > > >
> > > > > >
> > > > > > While this is true, it also works plenty well to connect to
> > > > > > any couchdb instance. We've switched to using it and I've
> > > > > > found the interface
> > > > > >
> > > > >
> > > >
> > > > somewhat
> > > > > > better (cleaner?) in comparison to other similar modules.
> > > > > >
> > > > > >
> > > > > >
> > > > > > Of course a matter of taste.
> > > > > >
> > > > > >
> > > > > >
> > > > > > mgm
> > > > > >
> > > > > >
> > > > > >
> > > > > > > B.
> > > > > >
> > > > > >
> > > > > > > > On 20 Mar 2014, at 16:31, Ramanadham, Radhika <
> > > > > > radhika.ramanadham@emc.com<ma...@emc.com>>
> wrote:
> > > > > >
> > > > > >
> > > > > > > > Hi guys,
> > > > > >
> > > > > > > > I have a dumb question.
> > > > > >
> > > > > >
> > > > > > > > Now with cloudant, how do I connect to my couchDB server (
> > > > > > http://localhost:5984) with no username and password?
> > > > > >
> > > > > >
> > > > > > > > All the examples I see connect to cloudant and not
> > > > > > > > couchDB. How do I
> > > > > >
> > > > > > > > connect to http://127.0.0.1:5984/
> > > > > >
> > > > > >
> > > > > > > > import cloudant
> > > > > >
> > > > > >
> > > > > > > > # connect to your account
> > > > > >
> > > > > > > > # in this case, https://garbados.cloudant.com USERNAME =
> 'garbados'
> > > > > >
> > > > > > > > account = cloudant.Account(USERNAME, async=True)
> > > > > >
> > > > > >
> > > > > > > > # login, so we can make changes
> > > > > >
> > > > > > > > future = account.login(USERNAME, PASSWORD) # block until
> > > > > > > > we get the
> > > > > >
> > > > > > > > response body login = future.result() assert
> > > > > > > > login.status_code == 200
> > > > > >
> > > > > >
> > > > > > > > Thanks,
> > > > > >
> > > > > > > > Radhika
> > > > >
> > > > >
> > > > > --
> > > > > Andy Wenk
> > > > > Hamburg - Germany
> > > > > RockIt!
> > > > >
> > > > > http://www.couchdb-buch.de
> > > > > http://www.pg-praxisbuch.de
> > > > >
> > > > > GPG fingerprint: C044 8322 9E12 1483 4FEC 9452 B65D 6BE3 9ED3
> > > > > 9588
> > > > >
> > > > > https://people.apache.org/keys/committer/andywenk.asc
> > >
> > >
> > >
> > > --
> > > Andy Wenk
> > > Hamburg - Germany
> > > RockIt!
> > >
> > > http://www.couchdb-buch.de
> > > http://www.pg-praxisbuch.de
> > >
> > > GPG fingerprint: C044 8322 9E12 1483 4FEC 9452 B65D 6BE3 9ED3 9588
> > >
> > > https://people.apache.org/keys/committer/andywenk.asc
>
>

RE: using python-cloudant to connect to couchDB

Posted by "Ramanadham, Radhika" <ra...@emc.com>.
Hi,

I have couchdb running on linux box.

SUSE Linux Enterprise Server 11 (x86_64)
VERSION = 11
PATCHLEVEL = 3

Python version is  3.3 and have python-cloudant (cloudant-0.5.6) module installed.

Now when I try to run my code, it fails with the error-

  File "./first.py", line 2, in <module>
    import cloudant
  File "/usr/lib/python3.3/site-packages/cloudant-0.5.6-py3.3.egg/cloudant/__init__.py", line 1, in <module>
ImportError: cannot import name Resource

My code works great on a windows box. I am now having issues with running any py script because of the above error. Can anyone please help?

Thanks,
Radhika



-----Original Message-----
From: Simon Metson [mailto:simon@cloudant.com] 
Sent: Friday, March 21, 2014 4:16 AM
To: user@couchdb.apache.org
Subject: Re: using python-cloudant to connect to couchDB

The biggest difference is the Cloudant module supports our search interface. I think Max's aim is to make it work for CouchDB as much as possible but where api's diverge get Cloudant support done first. For things like document and database crud you should be fine. I think Radhikas use case would be well supported. 
Cheers
Simon


On Friday, 21 March 2014 at 01:29, Mike Marino wrote:

> Hi Andy,
> 
> > well - obviously I am wrong. I am sorry. Thanks for your example 
> > Mike. I think Radhikas question is very well answered then :)
> > 
> 
> 
> No problem, I probably should've sent the gist link with my first 
> response to avoid confusion. :-)
> 
> > But I am still wondering if the intention of this library is to use 
> > it for Apache CouchDB's and not only Cloudant. But on the other side 
> > if it works it works ...
> > 
> 
> 
> I thought so to, initially. Certainly the name suggests this!
> However, I don't think there are any features (yet?) that are 
> cloudant-API specific. I may be wrong about this.
> 
> Biggest differences I've found in comparison to the more well known 
> modules you listed is the built in async behavior and the avoidance of 
> anything to do with document schemes. (It's quite a bit more
> lightweight.) It's not the only "other" module to do this; there's an 
> open discussion concerning this on the GitHub page:
> 
> https://github.com/cloudant-labs/cloudant-python/issues/25
> 
> Cheers,
> Mike
> 
> > 
> > Cheers
> > 
> > Andy
> > 
> > 
> > > On 20 March 2014 20:30, Mike Marino <mm...@gmail.com> wrote:
> > > 
> > > Here is a gist demonstrating using the cloudant module connecting 
> > > to a local couchdb:
> > > 
> > > https://gist.github.com/mgmarino/9526872
> > > 
> > > Cheers,
> > > Mike
> > > 
> > > > Am 20.03.2014 um 20:26 schrieb Andy Wenk <an...@nms.de>:
> > > > 
> > > > Radhika,
> > > > 
> > > > On 20 March 2014 19:08, Ramanadham, Radhika 
> > > > <radhika.ramanadham@emc.com
> > > > wrote:
> > > > 
> > > > > But, I see they say its an interface for cloudant or couchDB
> > > > > 
> > > > > 
> > > > > 
> > > > > https://pypi.python.org/pypi/cloudant/0.5.6
> > > > 
> > > > 
> > > > The statement says that this is interface for Cloudant who are 
> > > > using CouchDB. So you can query CouchDB databases hosted at 
> > > > Cloudant. You can't use this interface for a local CouchDB database.
> > > > 
> > > > Please have a look at http://couchdbkit.org/ and 
> > > > https://code.google.com/p/couchdb-python
> > > > 
> > > > Cheers
> > > > 
> > > > Andy
> > > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > > -----Original Message-----
> > > > > From: Mike Marino [mailto:mmarino@gmail.com]
> > > > > Sent: Thursday, March 20, 2014 12:58 PM
> > > > > To: user@couchdb.apache.org
> > > > > Subject: Re: using python-cloudant to connect to couchDB
> > > > > 
> > > > > 
> > > > > 
> > > > > > Am 20.03.2014 um 17:41 schrieb Robert Samuel Newson <
> > > rnewson@apache.org
> > > > > <ma...@apache.org>>:
> > > > > 
> > > > > 
> > > > > > The library exists to connect you to cloudant, which is a 
> > > > > > remote
> > > > > 
> > > > > > service. :)
> > > > > 
> > > > > 
> > > > > 
> > > > > While this is true, it also works plenty well to connect to 
> > > > > any couchdb instance. We've switched to using it and I've 
> > > > > found the interface
> > > > > 
> > > > 
> > > 
> > > somewhat
> > > > > better (cleaner?) in comparison to other similar modules.
> > > > > 
> > > > > 
> > > > > 
> > > > > Of course a matter of taste.
> > > > > 
> > > > > 
> > > > > 
> > > > > mgm
> > > > > 
> > > > > 
> > > > > 
> > > > > > B.
> > > > > 
> > > > > 
> > > > > > > On 20 Mar 2014, at 16:31, Ramanadham, Radhika <
> > > > > radhika.ramanadham@emc.com<ma...@emc.com>> wrote:
> > > > > 
> > > > > 
> > > > > > > Hi guys,
> > > > > 
> > > > > > > I have a dumb question.
> > > > > 
> > > > > 
> > > > > > > Now with cloudant, how do I connect to my couchDB server (
> > > > > http://localhost:5984) with no username and password?
> > > > > 
> > > > > 
> > > > > > > All the examples I see connect to cloudant and not 
> > > > > > > couchDB. How do I
> > > > > 
> > > > > > > connect to http://127.0.0.1:5984/
> > > > > 
> > > > > 
> > > > > > > import cloudant
> > > > > 
> > > > > 
> > > > > > > # connect to your account
> > > > > 
> > > > > > > # in this case, https://garbados.cloudant.com USERNAME = 'garbados'
> > > > > 
> > > > > > > account = cloudant.Account(USERNAME, async=True)
> > > > > 
> > > > > 
> > > > > > > # login, so we can make changes
> > > > > 
> > > > > > > future = account.login(USERNAME, PASSWORD) # block until 
> > > > > > > we get the
> > > > > 
> > > > > > > response body login = future.result() assert 
> > > > > > > login.status_code == 200
> > > > > 
> > > > > 
> > > > > > > Thanks,
> > > > > 
> > > > > > > Radhika
> > > > 
> > > > 
> > > > --
> > > > Andy Wenk
> > > > Hamburg - Germany
> > > > RockIt!
> > > > 
> > > > http://www.couchdb-buch.de
> > > > http://www.pg-praxisbuch.de
> > > > 
> > > > GPG fingerprint: C044 8322 9E12 1483 4FEC 9452 B65D 6BE3 9ED3 
> > > > 9588
> > > > 
> > > > https://people.apache.org/keys/committer/andywenk.asc
> > 
> > 
> > 
> > --
> > Andy Wenk
> > Hamburg - Germany
> > RockIt!
> > 
> > http://www.couchdb-buch.de
> > http://www.pg-praxisbuch.de
> > 
> > GPG fingerprint: C044 8322 9E12 1483 4FEC 9452 B65D 6BE3 9ED3 9588
> > 
> > https://people.apache.org/keys/committer/andywenk.asc


Re: using python-cloudant to connect to couchDB

Posted by Andy Wenk <an...@nms.de>.
Hi everyone,

is anyone willing to write some notes

here: https://cwiki.apache.org/confluence/display/COUCHDB/Python

There could be added some info below or in a box :)

You need to create an account. If done so, please drop me a note and I'll
add you to the CouchDB space.

Thanks

Cheers

Andy


On 21 March 2014 09:16, Simon Metson <si...@cloudant.com> wrote:

> The biggest difference is the Cloudant module supports our search
> interface. I think Max's aim is to make it work for CouchDB as much as
> possible but where api's diverge get Cloudant support done first. For
> things like document and database crud you should be fine. I think Radhikas
> use case would be well supported.
> Cheers
> Simon
>
>
> On Friday, 21 March 2014 at 01:29, Mike Marino wrote:
>
> > Hi Andy,
> >
> > > well - obviously I am wrong. I am sorry. Thanks for your example Mike.
> I
> > > think Radhikas question is very well answered then :)
> > >
> >
> >
> > No problem, I probably should've sent the gist link with my first
> > response to avoid confusion. :-)
> >
> > > But I am still wondering if the intention of this library is to use it
> for
> > > Apache CouchDB's and not only Cloudant. But on the other side if it
> works
> > > it works ...
> > >
> >
> >
> > I thought so to, initially. Certainly the name suggests this!
> > However, I don't think there are any features (yet?) that are
> > cloudant-API specific. I may be wrong about this.
> >
> > Biggest differences I've found in comparison to the more well known
> > modules you listed is the built in async behavior and the avoidance of
> > anything to do with document schemes. (It's quite a bit more
> > lightweight.) It's not the only "other" module to do this; there's an
> > open discussion concerning this on the GitHub page:
> >
> > https://github.com/cloudant-labs/cloudant-python/issues/25
> >
> > Cheers,
> > Mike
> >
> > >
> > > Cheers
> > >
> > > Andy
> > >
> > >
> > > > On 20 March 2014 20:30, Mike Marino <mm...@gmail.com> wrote:
> > > >
> > > > Here is a gist demonstrating using the cloudant module connecting to
> a
> > > > local couchdb:
> > > >
> > > > https://gist.github.com/mgmarino/9526872
> > > >
> > > > Cheers,
> > > > Mike
> > > >
> > > > > Am 20.03.2014 um 20:26 schrieb Andy Wenk <an...@nms.de>:
> > > > >
> > > > > Radhika,
> > > > >
> > > > > On 20 March 2014 19:08, Ramanadham, Radhika <
> radhika.ramanadham@emc.com
> > > > > wrote:
> > > > >
> > > > > > But, I see they say its an interface for cloudant or couchDB
> > > > > >
> > > > > >
> > > > > >
> > > > > > https://pypi.python.org/pypi/cloudant/0.5.6
> > > > >
> > > > >
> > > > > The statement says that this is interface for Cloudant who are
> using
> > > > > CouchDB. So you can query CouchDB databases hosted at Cloudant.
> You can't
> > > > > use this interface for a local CouchDB database.
> > > > >
> > > > > Please have a look at http://couchdbkit.org/ and
> > > > > https://code.google.com/p/couchdb-python
> > > > >
> > > > > Cheers
> > > > >
> > > > > Andy
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > -----Original Message-----
> > > > > > From: Mike Marino [mailto:mmarino@gmail.com]
> > > > > > Sent: Thursday, March 20, 2014 12:58 PM
> > > > > > To: user@couchdb.apache.org
> > > > > > Subject: Re: using python-cloudant to connect to couchDB
> > > > > >
> > > > > >
> > > > > >
> > > > > > > Am 20.03.2014 um 17:41 schrieb Robert Samuel Newson <
> > > > rnewson@apache.org
> > > > > > <ma...@apache.org>>:
> > > > > >
> > > > > >
> > > > > > > The library exists to connect you to cloudant, which is a
> remote
> > > > > >
> > > > > > > service. :)
> > > > > >
> > > > > >
> > > > > >
> > > > > > While this is true, it also works plenty well to connect to any
> couchdb
> > > > > > instance. We've switched to using it and I've found the interface
> > > > > >
> > > > >
> > > >
> > > > somewhat
> > > > > > better (cleaner?) in comparison to other similar modules.
> > > > > >
> > > > > >
> > > > > >
> > > > > > Of course a matter of taste.
> > > > > >
> > > > > >
> > > > > >
> > > > > > mgm
> > > > > >
> > > > > >
> > > > > >
> > > > > > > B.
> > > > > >
> > > > > >
> > > > > > > > On 20 Mar 2014, at 16:31, Ramanadham, Radhika <
> > > > > > radhika.ramanadham@emc.com<ma...@emc.com>>
> wrote:
> > > > > >
> > > > > >
> > > > > > > > Hi guys,
> > > > > >
> > > > > > > > I have a dumb question.
> > > > > >
> > > > > >
> > > > > > > > Now with cloudant, how do I connect to my couchDB server (
> > > > > > http://localhost:5984) with no username and password?
> > > > > >
> > > > > >
> > > > > > > > All the examples I see connect to cloudant and not couchDB.
> How do I
> > > > > >
> > > > > > > > connect to http://127.0.0.1:5984/
> > > > > >
> > > > > >
> > > > > > > > import cloudant
> > > > > >
> > > > > >
> > > > > > > > # connect to your account
> > > > > >
> > > > > > > > # in this case, https://garbados.cloudant.com USERNAME =
> 'garbados'
> > > > > >
> > > > > > > > account = cloudant.Account(USERNAME, async=True)
> > > > > >
> > > > > >
> > > > > > > > # login, so we can make changes
> > > > > >
> > > > > > > > future = account.login(USERNAME, PASSWORD) # block until we
> get the
> > > > > >
> > > > > > > > response body login = future.result() assert
> login.status_code == 200
> > > > > >
> > > > > >
> > > > > > > > Thanks,
> > > > > >
> > > > > > > > Radhika
> > > > >
> > > > >
> > > > > --
> > > > > Andy Wenk
> > > > > Hamburg - Germany
> > > > > RockIt!
> > > > >
> > > > > http://www.couchdb-buch.de
> > > > > http://www.pg-praxisbuch.de
> > > > >
> > > > > GPG fingerprint: C044 8322 9E12 1483 4FEC 9452 B65D 6BE3 9ED3 9588
> > > > >
> > > > > https://people.apache.org/keys/committer/andywenk.asc
> > >
> > >
> > >
> > > --
> > > Andy Wenk
> > > Hamburg - Germany
> > > RockIt!
> > >
> > > http://www.couchdb-buch.de
> > > http://www.pg-praxisbuch.de
> > >
> > > GPG fingerprint: C044 8322 9E12 1483 4FEC 9452 B65D 6BE3 9ED3 9588
> > >
> > > https://people.apache.org/keys/committer/andywenk.asc
>
>


-- 
Andy Wenk
Hamburg - Germany
RockIt!

http://www.couchdb-buch.de
http://www.pg-praxisbuch.de

GPG fingerprint: C044 8322 9E12 1483 4FEC 9452 B65D 6BE3 9ED3 9588

https://people.apache.org/keys/committer/andywenk.asc

Re: using python-cloudant to connect to couchDB

Posted by Simon Metson <si...@cloudant.com>.
The biggest difference is the Cloudant module supports our search interface. I think Max's aim is to make it work for CouchDB as much as possible but where api's diverge get Cloudant support done first. For things like document and database crud you should be fine. I think Radhikas use case would be well supported. 
Cheers
Simon


On Friday, 21 March 2014 at 01:29, Mike Marino wrote:

> Hi Andy,
> 
> > well - obviously I am wrong. I am sorry. Thanks for your example Mike. I
> > think Radhikas question is very well answered then :)
> > 
> 
> 
> No problem, I probably should've sent the gist link with my first
> response to avoid confusion. :-)
> 
> > But I am still wondering if the intention of this library is to use it for
> > Apache CouchDB's and not only Cloudant. But on the other side if it works
> > it works ...
> > 
> 
> 
> I thought so to, initially. Certainly the name suggests this!
> However, I don't think there are any features (yet?) that are
> cloudant-API specific. I may be wrong about this.
> 
> Biggest differences I've found in comparison to the more well known
> modules you listed is the built in async behavior and the avoidance of
> anything to do with document schemes. (It's quite a bit more
> lightweight.) It's not the only "other" module to do this; there's an
> open discussion concerning this on the GitHub page:
> 
> https://github.com/cloudant-labs/cloudant-python/issues/25
> 
> Cheers,
> Mike
> 
> > 
> > Cheers
> > 
> > Andy
> > 
> > 
> > > On 20 March 2014 20:30, Mike Marino <mm...@gmail.com> wrote:
> > > 
> > > Here is a gist demonstrating using the cloudant module connecting to a
> > > local couchdb:
> > > 
> > > https://gist.github.com/mgmarino/9526872
> > > 
> > > Cheers,
> > > Mike
> > > 
> > > > Am 20.03.2014 um 20:26 schrieb Andy Wenk <an...@nms.de>:
> > > > 
> > > > Radhika,
> > > > 
> > > > On 20 March 2014 19:08, Ramanadham, Radhika <radhika.ramanadham@emc.com
> > > > wrote:
> > > > 
> > > > > But, I see they say its an interface for cloudant or couchDB
> > > > > 
> > > > > 
> > > > > 
> > > > > https://pypi.python.org/pypi/cloudant/0.5.6
> > > > 
> > > > 
> > > > The statement says that this is interface for Cloudant who are using
> > > > CouchDB. So you can query CouchDB databases hosted at Cloudant. You can't
> > > > use this interface for a local CouchDB database.
> > > > 
> > > > Please have a look at http://couchdbkit.org/ and
> > > > https://code.google.com/p/couchdb-python
> > > > 
> > > > Cheers
> > > > 
> > > > Andy
> > > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > > -----Original Message-----
> > > > > From: Mike Marino [mailto:mmarino@gmail.com]
> > > > > Sent: Thursday, March 20, 2014 12:58 PM
> > > > > To: user@couchdb.apache.org
> > > > > Subject: Re: using python-cloudant to connect to couchDB
> > > > > 
> > > > > 
> > > > > 
> > > > > > Am 20.03.2014 um 17:41 schrieb Robert Samuel Newson <
> > > rnewson@apache.org
> > > > > <ma...@apache.org>>:
> > > > > 
> > > > > 
> > > > > > The library exists to connect you to cloudant, which is a remote
> > > > > 
> > > > > > service. :)
> > > > > 
> > > > > 
> > > > > 
> > > > > While this is true, it also works plenty well to connect to any couchdb
> > > > > instance. We've switched to using it and I've found the interface
> > > > > 
> > > > 
> > > 
> > > somewhat
> > > > > better (cleaner?) in comparison to other similar modules.
> > > > > 
> > > > > 
> > > > > 
> > > > > Of course a matter of taste.
> > > > > 
> > > > > 
> > > > > 
> > > > > mgm
> > > > > 
> > > > > 
> > > > > 
> > > > > > B.
> > > > > 
> > > > > 
> > > > > > > On 20 Mar 2014, at 16:31, Ramanadham, Radhika <
> > > > > radhika.ramanadham@emc.com<ma...@emc.com>> wrote:
> > > > > 
> > > > > 
> > > > > > > Hi guys,
> > > > > 
> > > > > > > I have a dumb question.
> > > > > 
> > > > > 
> > > > > > > Now with cloudant, how do I connect to my couchDB server (
> > > > > http://localhost:5984) with no username and password?
> > > > > 
> > > > > 
> > > > > > > All the examples I see connect to cloudant and not couchDB. How do I
> > > > > 
> > > > > > > connect to http://127.0.0.1:5984/
> > > > > 
> > > > > 
> > > > > > > import cloudant
> > > > > 
> > > > > 
> > > > > > > # connect to your account
> > > > > 
> > > > > > > # in this case, https://garbados.cloudant.com USERNAME = 'garbados'
> > > > > 
> > > > > > > account = cloudant.Account(USERNAME, async=True)
> > > > > 
> > > > > 
> > > > > > > # login, so we can make changes
> > > > > 
> > > > > > > future = account.login(USERNAME, PASSWORD) # block until we get the
> > > > > 
> > > > > > > response body login = future.result() assert login.status_code == 200
> > > > > 
> > > > > 
> > > > > > > Thanks,
> > > > > 
> > > > > > > Radhika
> > > > 
> > > > 
> > > > --
> > > > Andy Wenk
> > > > Hamburg - Germany
> > > > RockIt!
> > > > 
> > > > http://www.couchdb-buch.de
> > > > http://www.pg-praxisbuch.de
> > > > 
> > > > GPG fingerprint: C044 8322 9E12 1483 4FEC 9452 B65D 6BE3 9ED3 9588
> > > > 
> > > > https://people.apache.org/keys/committer/andywenk.asc
> > 
> > 
> > 
> > --
> > Andy Wenk
> > Hamburg - Germany
> > RockIt!
> > 
> > http://www.couchdb-buch.de
> > http://www.pg-praxisbuch.de
> > 
> > GPG fingerprint: C044 8322 9E12 1483 4FEC 9452 B65D 6BE3 9ED3 9588
> > 
> > https://people.apache.org/keys/committer/andywenk.asc 


Re: using python-cloudant to connect to couchDB

Posted by Mike Marino <mm...@gmail.com>.
Hi Andy,

> well - obviously I am wrong. I am sorry. Thanks for your example Mike. I
> think Radhikas question is very well answered then :)

No problem, I probably should've sent the gist link with my first
response to avoid confusion.  :-)

> But I am still wondering if the intention of this library is to use it for
> Apache CouchDB's and not only Cloudant. But on the other side if it works
> it works ...

I thought so to, initially. Certainly the name suggests this!
However, I don't think there are any features (yet?) that are
cloudant-API specific. I may be wrong about this.

Biggest differences I've found in comparison to the more well known
modules you listed is the built in async behavior and the avoidance of
anything to do with document schemes.  (It's quite a bit more
lightweight.) It's not the only "other" module to do this; there's an
open discussion concerning this on the GitHub page:

https://github.com/cloudant-labs/cloudant-python/issues/25

Cheers,
Mike

>
> Cheers
>
> Andy
>
>
>> On 20 March 2014 20:30, Mike Marino <mm...@gmail.com> wrote:
>>
>> Here is a gist demonstrating using the cloudant module connecting to a
>> local couchdb:
>>
>> https://gist.github.com/mgmarino/9526872
>>
>> Cheers,
>> Mike
>>
>>> Am 20.03.2014 um 20:26 schrieb Andy Wenk <an...@nms.de>:
>>>
>>> Radhika,
>>>
>>> On 20 March 2014 19:08, Ramanadham, Radhika <radhika.ramanadham@emc.com
>>> wrote:
>>>
>>>> But, I see they say its an interface for cloudant or couchDB
>>>>
>>>>
>>>>
>>>> https://pypi.python.org/pypi/cloudant/0.5.6
>>>
>>>
>>> The statement says that this is interface for Cloudant who are using
>>> CouchDB. So you can query CouchDB databases hosted at Cloudant. You can't
>>> use this interface for a local CouchDB database.
>>>
>>> Please have a look at http://couchdbkit.org/ and
>>> https://code.google.com/p/couchdb-python
>>>
>>> Cheers
>>>
>>> Andy
>>>
>>>
>>>
>>>
>>>
>>>
>>>>
>>>>
>>>>
>>>> -----Original Message-----
>>>> From: Mike Marino [mailto:mmarino@gmail.com]
>>>> Sent: Thursday, March 20, 2014 12:58 PM
>>>> To: user@couchdb.apache.org
>>>> Subject: Re: using python-cloudant to connect to couchDB
>>>>
>>>>
>>>>
>>>>> Am 20.03.2014 um 17:41 schrieb Robert Samuel Newson <
>> rnewson@apache.org
>>>> <ma...@apache.org>>:
>>>>
>>>>
>>>>> The library exists to connect you to cloudant, which is a remote
>>>>
>>>>> service. :)
>>>>
>>>>
>>>>
>>>> While this is true, it also works plenty well to connect to any couchdb
>>>> instance. We've switched to using it and I've found the interface
>> somewhat
>>>> better (cleaner?) in comparison to other similar modules.
>>>>
>>>>
>>>>
>>>> Of course a matter of taste.
>>>>
>>>>
>>>>
>>>> mgm
>>>>
>>>>
>>>>
>>>>> B.
>>>>
>>>>
>>>>>> On 20 Mar 2014, at 16:31, Ramanadham, Radhika <
>>>> radhika.ramanadham@emc.com<ma...@emc.com>> wrote:
>>>>
>>>>
>>>>>> Hi guys,
>>>>
>>>>>> I have a dumb question.
>>>>
>>>>
>>>>>> Now with  cloudant, how do I connect to my couchDB server (
>>>> http://localhost:5984)  with no username and password?
>>>>
>>>>
>>>>>> All the examples I see connect to cloudant and not couchDB. How do I
>>>>
>>>>>> connect to http://127.0.0.1:5984/
>>>>
>>>>
>>>>>> import cloudant
>>>>
>>>>
>>>>>> # connect to your account
>>>>
>>>>>> # in this case, https://garbados.cloudant.com USERNAME = 'garbados'
>>>>
>>>>>> account = cloudant.Account(USERNAME, async=True)
>>>>
>>>>
>>>>>> # login, so we can make changes
>>>>
>>>>>> future = account.login(USERNAME, PASSWORD) # block until we get the
>>>>
>>>>>> response body login = future.result() assert login.status_code == 200
>>>>
>>>>
>>>>>> Thanks,
>>>>
>>>>>> Radhika
>>>
>>>
>>> --
>>> Andy Wenk
>>> Hamburg - Germany
>>> RockIt!
>>>
>>> http://www.couchdb-buch.de
>>> http://www.pg-praxisbuch.de
>>>
>>> GPG fingerprint: C044 8322 9E12 1483 4FEC 9452 B65D 6BE3 9ED3 9588
>>>
>>> https://people.apache.org/keys/committer/andywenk.asc
>
>
>
> --
> Andy Wenk
> Hamburg - Germany
> RockIt!
>
> http://www.couchdb-buch.de
> http://www.pg-praxisbuch.de
>
> GPG fingerprint: C044 8322 9E12 1483 4FEC 9452 B65D 6BE3 9ED3 9588
>
> https://people.apache.org/keys/committer/andywenk.asc

RE: using python-cloudant to connect to couchDB

Posted by "Ramanadham, Radhika" <ra...@emc.com>.
No problem. Thanks for responding.
Yes, my intention is to only use it for local couchDB and create db, documents and perform CRUD ops.

-----Original Message-----
From: Andy Wenk [mailto:andy@nms.de] 
Sent: Thursday, March 20, 2014 5:07 PM
To: user@couchdb.apache.org
Subject: Re: using python-cloudant to connect to couchDB

Mike, Radhika,

well - obviously I am wrong. I am sorry. Thanks for your example Mike. I think Radhikas question is very well answered then :)

But I am still wondering if the intention of this library is to use it for Apache CouchDB's and not only Cloudant. But on the other side if it works it works ...

Cheers

Andy


On 20 March 2014 20:30, Mike Marino <mm...@gmail.com> wrote:

> Here is a gist demonstrating using the cloudant module connecting to a 
> local couchdb:
>
> https://gist.github.com/mgmarino/9526872
>
> Cheers,
> Mike
>
> > Am 20.03.2014 um 20:26 schrieb Andy Wenk <an...@nms.de>:
> >
> > Radhika,
> >
> > On 20 March 2014 19:08, Ramanadham, Radhika 
> ><radhika.ramanadham@emc.com
> >wrote:
> >
> >> But, I see they say its an interface for cloudant or couchDB
> >>
> >>
> >>
> >> https://pypi.python.org/pypi/cloudant/0.5.6
> >
> >
> > The statement says that this is interface for Cloudant who are using 
> > CouchDB. So you can query CouchDB databases hosted at Cloudant. You 
> > can't use this interface for a local CouchDB database.
> >
> > Please have a look at http://couchdbkit.org/ and 
> > https://code.google.com/p/couchdb-python
> >
> > Cheers
> >
> > Andy
> >
> >
> >
> >
> >
> >
> >>
> >>
> >>
> >> -----Original Message-----
> >> From: Mike Marino [mailto:mmarino@gmail.com]
> >> Sent: Thursday, March 20, 2014 12:58 PM
> >> To: user@couchdb.apache.org
> >> Subject: Re: using python-cloudant to connect to couchDB
> >>
> >>
> >>
> >>> Am 20.03.2014 um 17:41 schrieb Robert Samuel Newson <
> rnewson@apache.org
> >> <ma...@apache.org>>:
> >>
> >>
> >>> The library exists to connect you to cloudant, which is a remote
> >>
> >>> service. :)
> >>
> >>
> >>
> >> While this is true, it also works plenty well to connect to any 
> >> couchdb instance. We've switched to using it and I've found the 
> >> interface
> somewhat
> >> better (cleaner?) in comparison to other similar modules.
> >>
> >>
> >>
> >> Of course a matter of taste.
> >>
> >>
> >>
> >> mgm
> >>
> >>
> >>
> >>> B.
> >>
> >>
> >>>> On 20 Mar 2014, at 16:31, Ramanadham, Radhika <
> >> radhika.ramanadham@emc.com<ma...@emc.com>> wrote:
> >>
> >>
> >>>> Hi guys,
> >>
> >>>> I have a dumb question.
> >>
> >>
> >>>> Now with  cloudant, how do I connect to my couchDB server (
> >> http://localhost:5984)  with no username and password?
> >>
> >>
> >>>> All the examples I see connect to cloudant and not couchDB. How 
> >>>> do I
> >>
> >>>> connect to http://127.0.0.1:5984/
> >>
> >>
> >>>> import cloudant
> >>
> >>
> >>>> # connect to your account
> >>
> >>>> # in this case, https://garbados.cloudant.com USERNAME = 'garbados'
> >>
> >>>> account = cloudant.Account(USERNAME, async=True)
> >>
> >>
> >>>> # login, so we can make changes
> >>
> >>>> future = account.login(USERNAME, PASSWORD) # block until we get 
> >>>> the
> >>
> >>>> response body login = future.result() assert login.status_code == 
> >>>> 200
> >>
> >>
> >>>> Thanks,
> >>
> >>>> Radhika
> >>
> >
> >
> > --
> > Andy Wenk
> > Hamburg - Germany
> > RockIt!
> >
> > http://www.couchdb-buch.de
> > http://www.pg-praxisbuch.de
> >
> > GPG fingerprint: C044 8322 9E12 1483 4FEC 9452 B65D 6BE3 9ED3 9588
> >
> > https://people.apache.org/keys/committer/andywenk.asc
>



--
Andy Wenk
Hamburg - Germany
RockIt!

http://www.couchdb-buch.de
http://www.pg-praxisbuch.de

GPG fingerprint: C044 8322 9E12 1483 4FEC 9452 B65D 6BE3 9ED3 9588

https://people.apache.org/keys/committer/andywenk.asc

Re: using python-cloudant to connect to couchDB

Posted by Andy Wenk <an...@nms.de>.
Mike, Radhika,

well - obviously I am wrong. I am sorry. Thanks for your example Mike. I
think Radhikas question is very well answered then :)

But I am still wondering if the intention of this library is to use it for
Apache CouchDB's and not only Cloudant. But on the other side if it works
it works ...

Cheers

Andy


On 20 March 2014 20:30, Mike Marino <mm...@gmail.com> wrote:

> Here is a gist demonstrating using the cloudant module connecting to a
> local couchdb:
>
> https://gist.github.com/mgmarino/9526872
>
> Cheers,
> Mike
>
> > Am 20.03.2014 um 20:26 schrieb Andy Wenk <an...@nms.de>:
> >
> > Radhika,
> >
> > On 20 March 2014 19:08, Ramanadham, Radhika <radhika.ramanadham@emc.com
> >wrote:
> >
> >> But, I see they say its an interface for cloudant or couchDB
> >>
> >>
> >>
> >> https://pypi.python.org/pypi/cloudant/0.5.6
> >
> >
> > The statement says that this is interface for Cloudant who are using
> > CouchDB. So you can query CouchDB databases hosted at Cloudant. You can't
> > use this interface for a local CouchDB database.
> >
> > Please have a look at http://couchdbkit.org/ and
> > https://code.google.com/p/couchdb-python
> >
> > Cheers
> >
> > Andy
> >
> >
> >
> >
> >
> >
> >>
> >>
> >>
> >> -----Original Message-----
> >> From: Mike Marino [mailto:mmarino@gmail.com]
> >> Sent: Thursday, March 20, 2014 12:58 PM
> >> To: user@couchdb.apache.org
> >> Subject: Re: using python-cloudant to connect to couchDB
> >>
> >>
> >>
> >>> Am 20.03.2014 um 17:41 schrieb Robert Samuel Newson <
> rnewson@apache.org
> >> <ma...@apache.org>>:
> >>
> >>
> >>> The library exists to connect you to cloudant, which is a remote
> >>
> >>> service. :)
> >>
> >>
> >>
> >> While this is true, it also works plenty well to connect to any couchdb
> >> instance. We've switched to using it and I've found the interface
> somewhat
> >> better (cleaner?) in comparison to other similar modules.
> >>
> >>
> >>
> >> Of course a matter of taste.
> >>
> >>
> >>
> >> mgm
> >>
> >>
> >>
> >>> B.
> >>
> >>
> >>>> On 20 Mar 2014, at 16:31, Ramanadham, Radhika <
> >> radhika.ramanadham@emc.com<ma...@emc.com>> wrote:
> >>
> >>
> >>>> Hi guys,
> >>
> >>>> I have a dumb question.
> >>
> >>
> >>>> Now with  cloudant, how do I connect to my couchDB server (
> >> http://localhost:5984)  with no username and password?
> >>
> >>
> >>>> All the examples I see connect to cloudant and not couchDB. How do I
> >>
> >>>> connect to http://127.0.0.1:5984/
> >>
> >>
> >>>> import cloudant
> >>
> >>
> >>>> # connect to your account
> >>
> >>>> # in this case, https://garbados.cloudant.com USERNAME = 'garbados'
> >>
> >>>> account = cloudant.Account(USERNAME, async=True)
> >>
> >>
> >>>> # login, so we can make changes
> >>
> >>>> future = account.login(USERNAME, PASSWORD) # block until we get the
> >>
> >>>> response body login = future.result() assert login.status_code == 200
> >>
> >>
> >>>> Thanks,
> >>
> >>>> Radhika
> >>
> >
> >
> > --
> > Andy Wenk
> > Hamburg - Germany
> > RockIt!
> >
> > http://www.couchdb-buch.de
> > http://www.pg-praxisbuch.de
> >
> > GPG fingerprint: C044 8322 9E12 1483 4FEC 9452 B65D 6BE3 9ED3 9588
> >
> > https://people.apache.org/keys/committer/andywenk.asc
>



-- 
Andy Wenk
Hamburg - Germany
RockIt!

http://www.couchdb-buch.de
http://www.pg-praxisbuch.de

GPG fingerprint: C044 8322 9E12 1483 4FEC 9452 B65D 6BE3 9ED3 9588

https://people.apache.org/keys/committer/andywenk.asc

RE: using python-cloudant to connect to couchDB

Posted by "Ramanadham, Radhika" <ra...@emc.com>.
Thank you very much for the example. 
My intention is to use it only for my local couchdb.

-----Original Message-----
From: Mike Marino [mailto:mmarino@gmail.com] 
Sent: Thursday, March 20, 2014 3:30 PM
To: user@couchdb.apache.org
Subject: Re: using python-cloudant to connect to couchDB

Here is a gist demonstrating using the cloudant module connecting to a local couchdb:

https://gist.github.com/mgmarino/9526872

Cheers,
Mike

> Am 20.03.2014 um 20:26 schrieb Andy Wenk <an...@nms.de>:
>
> Radhika,
>
> On 20 March 2014 19:08, Ramanadham, Radhika <ra...@emc.com>wrote:
>
>> But, I see they say its an interface for cloudant or couchDB
>>
>>
>>
>> https://pypi.python.org/pypi/cloudant/0.5.6
>
>
> The statement says that this is interface for Cloudant who are using 
> CouchDB. So you can query CouchDB databases hosted at Cloudant. You 
> can't use this interface for a local CouchDB database.
>
> Please have a look at http://couchdbkit.org/ and 
> https://code.google.com/p/couchdb-python
>
> Cheers
>
> Andy
>
>
>
>
>
>
>>
>>
>>
>> -----Original Message-----
>> From: Mike Marino [mailto:mmarino@gmail.com]
>> Sent: Thursday, March 20, 2014 12:58 PM
>> To: user@couchdb.apache.org
>> Subject: Re: using python-cloudant to connect to couchDB
>>
>>
>>
>>> Am 20.03.2014 um 17:41 schrieb Robert Samuel Newson 
>>> <rnewson@apache.org
>> <ma...@apache.org>>:
>>
>>
>>> The library exists to connect you to cloudant, which is a remote
>>
>>> service. :)
>>
>>
>>
>> While this is true, it also works plenty well to connect to any 
>> couchdb instance. We've switched to using it and I've found the 
>> interface somewhat better (cleaner?) in comparison to other similar modules.
>>
>>
>>
>> Of course a matter of taste.
>>
>>
>>
>> mgm
>>
>>
>>
>>> B.
>>
>>
>>>> On 20 Mar 2014, at 16:31, Ramanadham, Radhika <
>> radhika.ramanadham@emc.com<ma...@emc.com>> wrote:
>>
>>
>>>> Hi guys,
>>
>>>> I have a dumb question.
>>
>>
>>>> Now with  cloudant, how do I connect to my couchDB server (
>> http://localhost:5984)  with no username and password?
>>
>>
>>>> All the examples I see connect to cloudant and not couchDB. How do 
>>>> I
>>
>>>> connect to http://127.0.0.1:5984/
>>
>>
>>>> import cloudant
>>
>>
>>>> # connect to your account
>>
>>>> # in this case, https://garbados.cloudant.com USERNAME = 'garbados'
>>
>>>> account = cloudant.Account(USERNAME, async=True)
>>
>>
>>>> # login, so we can make changes
>>
>>>> future = account.login(USERNAME, PASSWORD) # block until we get the
>>
>>>> response body login = future.result() assert login.status_code == 
>>>> 200
>>
>>
>>>> Thanks,
>>
>>>> Radhika
>>
>
>
> --
> Andy Wenk
> Hamburg - Germany
> RockIt!
>
> http://www.couchdb-buch.de
> http://www.pg-praxisbuch.de
>
> GPG fingerprint: C044 8322 9E12 1483 4FEC 9452 B65D 6BE3 9ED3 9588
>
> https://people.apache.org/keys/committer/andywenk.asc


Re: using python-cloudant to connect to couchDB

Posted by Mike Marino <mm...@gmail.com>.
Here is a gist demonstrating using the cloudant module connecting to a
local couchdb:

https://gist.github.com/mgmarino/9526872

Cheers,
Mike

> Am 20.03.2014 um 20:26 schrieb Andy Wenk <an...@nms.de>:
>
> Radhika,
>
> On 20 March 2014 19:08, Ramanadham, Radhika <ra...@emc.com>wrote:
>
>> But, I see they say its an interface for cloudant or couchDB
>>
>>
>>
>> https://pypi.python.org/pypi/cloudant/0.5.6
>
>
> The statement says that this is interface for Cloudant who are using
> CouchDB. So you can query CouchDB databases hosted at Cloudant. You can't
> use this interface for a local CouchDB database.
>
> Please have a look at http://couchdbkit.org/ and
> https://code.google.com/p/couchdb-python
>
> Cheers
>
> Andy
>
>
>
>
>
>
>>
>>
>>
>> -----Original Message-----
>> From: Mike Marino [mailto:mmarino@gmail.com]
>> Sent: Thursday, March 20, 2014 12:58 PM
>> To: user@couchdb.apache.org
>> Subject: Re: using python-cloudant to connect to couchDB
>>
>>
>>
>>> Am 20.03.2014 um 17:41 schrieb Robert Samuel Newson <rnewson@apache.org
>> <ma...@apache.org>>:
>>
>>
>>> The library exists to connect you to cloudant, which is a remote
>>
>>> service. :)
>>
>>
>>
>> While this is true, it also works plenty well to connect to any couchdb
>> instance. We've switched to using it and I've found the interface somewhat
>> better (cleaner?) in comparison to other similar modules.
>>
>>
>>
>> Of course a matter of taste.
>>
>>
>>
>> mgm
>>
>>
>>
>>> B.
>>
>>
>>>> On 20 Mar 2014, at 16:31, Ramanadham, Radhika <
>> radhika.ramanadham@emc.com<ma...@emc.com>> wrote:
>>
>>
>>>> Hi guys,
>>
>>>> I have a dumb question.
>>
>>
>>>> Now with  cloudant, how do I connect to my couchDB server (
>> http://localhost:5984)  with no username and password?
>>
>>
>>>> All the examples I see connect to cloudant and not couchDB. How do I
>>
>>>> connect to http://127.0.0.1:5984/
>>
>>
>>>> import cloudant
>>
>>
>>>> # connect to your account
>>
>>>> # in this case, https://garbados.cloudant.com USERNAME = 'garbados'
>>
>>>> account = cloudant.Account(USERNAME, async=True)
>>
>>
>>>> # login, so we can make changes
>>
>>>> future = account.login(USERNAME, PASSWORD) # block until we get the
>>
>>>> response body login = future.result() assert login.status_code == 200
>>
>>
>>>> Thanks,
>>
>>>> Radhika
>>
>
>
> --
> Andy Wenk
> Hamburg - Germany
> RockIt!
>
> http://www.couchdb-buch.de
> http://www.pg-praxisbuch.de
>
> GPG fingerprint: C044 8322 9E12 1483 4FEC 9452 B65D 6BE3 9ED3 9588
>
> https://people.apache.org/keys/committer/andywenk.asc

Re: using python-cloudant to connect to couchDB

Posted by Andy Wenk <an...@nms.de>.
Radhika,

On 20 March 2014 19:08, Ramanadham, Radhika <ra...@emc.com>wrote:

> But, I see they say its an interface for cloudant or couchDB
>
>
>
> https://pypi.python.org/pypi/cloudant/0.5.6


The statement says that this is interface for Cloudant who are using
CouchDB. So you can query CouchDB databases hosted at Cloudant. You can't
use this interface for a local CouchDB database.

Please have a look at http://couchdbkit.org/ and
https://code.google.com/p/couchdb-python

Cheers

Andy






>
>
>
> -----Original Message-----
> From: Mike Marino [mailto:mmarino@gmail.com]
> Sent: Thursday, March 20, 2014 12:58 PM
> To: user@couchdb.apache.org
> Subject: Re: using python-cloudant to connect to couchDB
>
>
>
> > Am 20.03.2014 um 17:41 schrieb Robert Samuel Newson <rnewson@apache.org
> <ma...@apache.org>>:
>
> >
>
> > The library exists to connect you to cloudant, which is a remote
>
> > service. :)
>
>
>
> While this is true, it also works plenty well to connect to any couchdb
> instance. We've switched to using it and I've found the interface somewhat
> better (cleaner?) in comparison to other similar modules.
>
>
>
> Of course a matter of taste.
>
>
>
> mgm
>
>
>
> > B.
>
> >
>
> >> On 20 Mar 2014, at 16:31, Ramanadham, Radhika <
> radhika.ramanadham@emc.com<ma...@emc.com>> wrote:
>
> >>
>
> >> Hi guys,
>
> >> I have a dumb question.
>
> >>
>
> >> Now with  cloudant, how do I connect to my couchDB server (
> http://localhost:5984)  with no username and password?
>
> >>
>
> >> All the examples I see connect to cloudant and not couchDB. How do I
>
> >> connect to http://127.0.0.1:5984/
>
> >>
>
> >> import cloudant
>
> >>
>
> >> # connect to your account
>
> >> # in this case, https://garbados.cloudant.com USERNAME = 'garbados'
>
> >> account = cloudant.Account(USERNAME, async=True)
>
> >>
>
> >> # login, so we can make changes
>
> >> future = account.login(USERNAME, PASSWORD) # block until we get the
>
> >> response body login = future.result() assert login.status_code == 200
>
> >>
>
> >> Thanks,
>
> >> Radhika
>
> >
>
>
>


-- 
Andy Wenk
Hamburg - Germany
RockIt!

http://www.couchdb-buch.de
http://www.pg-praxisbuch.de

GPG fingerprint: C044 8322 9E12 1483 4FEC 9452 B65D 6BE3 9ED3 9588

https://people.apache.org/keys/committer/andywenk.asc

RE: using python-cloudant to connect to couchDB

Posted by "Ramanadham, Radhika" <ra...@emc.com>.
But, I see they say its an interface for cloudant or couchDB



https://pypi.python.org/pypi/cloudant/0.5.6





-----Original Message-----
From: Mike Marino [mailto:mmarino@gmail.com]
Sent: Thursday, March 20, 2014 12:58 PM
To: user@couchdb.apache.org
Subject: Re: using python-cloudant to connect to couchDB



> Am 20.03.2014 um 17:41 schrieb Robert Samuel Newson <rn...@apache.org>>:

>

> The library exists to connect you to cloudant, which is a remote

> service. :)



While this is true, it also works plenty well to connect to any couchdb instance. We've switched to using it and I've found the interface somewhat better (cleaner?) in comparison to other similar modules.



Of course a matter of taste.



mgm



> B.

>

>> On 20 Mar 2014, at 16:31, Ramanadham, Radhika <ra...@emc.com>> wrote:

>>

>> Hi guys,

>> I have a dumb question.

>>

>> Now with  cloudant, how do I connect to my couchDB server (http://localhost:5984)  with no username and password?

>>

>> All the examples I see connect to cloudant and not couchDB. How do I

>> connect to http://127.0.0.1:5984/

>>

>> import cloudant

>>

>> # connect to your account

>> # in this case, https://garbados.cloudant.com USERNAME = 'garbados'

>> account = cloudant.Account(USERNAME, async=True)

>>

>> # login, so we can make changes

>> future = account.login(USERNAME, PASSWORD) # block until we get the

>> response body login = future.result() assert login.status_code == 200

>>

>> Thanks,

>> Radhika

>



Re: using python-cloudant to connect to couchDB

Posted by Mike Marino <mm...@gmail.com>.
> Am 20.03.2014 um 17:41 schrieb Robert Samuel Newson <rn...@apache.org>:
>
> The library exists to connect you to cloudant, which is a remote service. :)

While this is true, it also works plenty well to connect to any
couchdb instance. We've switched to using it and I've found the
interface somewhat better (cleaner?) in comparison to other similar
modules.

Of course a matter of taste.

mgm

> B.
>
>> On 20 Mar 2014, at 16:31, Ramanadham, Radhika <ra...@emc.com> wrote:
>>
>> Hi guys,
>> I have a dumb question.
>>
>> Now with  cloudant, how do I connect to my couchDB server (http://localhost:5984)  with no username and password?
>>
>> All the examples I see connect to cloudant and not couchDB. How do I connect to http://127.0.0.1:5984/
>>
>> import cloudant
>>
>> # connect to your account
>> # in this case, https://garbados.cloudant.com
>> USERNAME = 'garbados'
>> account = cloudant.Account(USERNAME, async=True)
>>
>> # login, so we can make changes
>> future = account.login(USERNAME, PASSWORD)
>> # block until we get the response body
>> login = future.result()
>> assert login.status_code == 200
>>
>> Thanks,
>> Radhika
>

Re: using python-cloudant to connect to couchDB

Posted by Robert Samuel Newson <rn...@apache.org>.
The library exists to connect you to cloudant, which is a remote service. :)

B.

On 20 Mar 2014, at 16:31, Ramanadham, Radhika <ra...@emc.com> wrote:

> Hi guys,
> I have a dumb question.
> 
> Now with  cloudant, how do I connect to my couchDB server (http://localhost:5984)  with no username and password?
> 
> All the examples I see connect to cloudant and not couchDB. How do I connect to http://127.0.0.1:5984/
> 
> import cloudant
> 
> # connect to your account
> # in this case, https://garbados.cloudant.com
> USERNAME = 'garbados'
> account = cloudant.Account(USERNAME, async=True)
> 
> # login, so we can make changes
> future = account.login(USERNAME, PASSWORD)
> # block until we get the response body
> login = future.result()
> assert login.status_code == 200
> 
> Thanks,
> Radhika


Re: using python-cloudant to connect to couchDB

Posted by Mike Marino <mm...@gmail.com>.
Hi radhika,

> Am 20.03.2014 um 17:33 schrieb "Ramanadham, Radhika" <ra...@emc.com>:
>
> Hi guys,
> I have a dumb question.
>
> Now with  cloudant, how do I connect to my couchDB server (http://localhost:5984)  with no username and password?
>
> All the examples I see connect to cloudant and not couchDB. How do I connect to http://127.0.0.1:5984/
>
> import cloudant
>
> # connect to your account
> # in this case, https://garbados.cloudant.com
> USERNAME = 'garbados'
> account = cloudant.Account(USERNAME, async=True)

Call account with the uri key word variable:

Account(uri="http://localhost:5984")

>
> # login, so we can make changes
> future = account.login(USERNAME, PASSWORD)
> # block until we get the response body
> login = future.result()
> assert login.status_code == 200
>
> Thanks,
> Radhika