incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Pratt <fairwinds...@gmail.com>
Subject Re: quick python / couch question
Date Mon, 16 Feb 2009 18:59:15 GMT
Allan. there is a couchdb lib for twisted. Google should help you  
find this. It is basic though and without the features of clenz's  
couchdb lib. I am also a twisted fan btw.

Regards,
David


On Feb 16, 2009, at 2:37 PM, Alan Bell wrote:

> Has anyone given the twisted python library any love recently? last  
> time I checked it was almost growing attachment handling (as was  
> couchdb) or is there a way to do twisted type programming with  
> deferred events with the couchdb-python library.
>
> Alan.
>
> Jeff Hinrichs - DM&T wrote:
>> On Sat, Feb 14, 2009 at 8:31 PM, Adam Petty <adamjpetty@gmail.com>  
>> wrote:
>>
>>> My appologies if this isn't the right place...and yes I'm a neub  
>>> at things
>>> both python and couch so I'll be greatly appreciative for any info
>>> available.
>>>
>>> I'm currently trying to get a python object to convert to a couch  
>>> document
>>> to submit to the DB - but can't seem to find a good way to do it.
>>>
>>> for example:
>>>
>>> Id like to convert the following python document:
>>>
>>> {'username':'johnsmith','date'":(2009, 1, 1, 0, 0, 0, 3, 1, -1),  
>>> 'names':
>>> {'lname':'smith','birtdate':(1974, 1, 20, 0, 0, 0, 3, 1, -1),
>>> 'fname':'tim'}}
>>>
>>> I'd like to write this directly to a couchDB - and I've tried  
>>> jsonpickle,
>>> and looked all through couchdb.schema, but again am new at python  
>>> and couch.
>>>
>>>
>>>
>>> I can see the dicts, and I know I can convert from a couchdoc to  
>>> python
>>> automatically -- what am I missing.
>>>
>>> Again - thanks,
>>>
>>> Adam
>>>
>>>
>> Are you using the couchdb-python libary,
>> http://code.google.com/p/couchdb-python/ ?
>> Since you mention couchdb.schema, I assume that you are.  I would go
>> with the standard interface as suggested by Paul.
>>
>>
>> -Jeff
>>
>


Mime
View raw message