couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jay Luker" <lb...@reallywow.com>
Subject Re: couchdb-python: looking for the equivalent of Database.exists()
Date Sun, 13 Apr 2008 21:37:46 GMT
Ah, I'd failed to notice that Server implemented __iter__. (Bit of a
python n00b).
Thats perfect - thanks!

--jay

On Sun, Apr 13, 2008 at 5:12 PM, Yoan Blanc <yoan.blanc@gmail.com> wrote:
> Do this work for you?
>
>  if dbname in couch:
>     db = couch[dbname]
>  else:
>     db = couch.create(dbname)
>
>  Cheers,
>
>  -- Yoan

Mime
View raw message