I very much appreciate it ... thank you I thought I tried that, and got a "cannot convert (<datevalue>)" to json... I figured out that I can convert using jsonpickle and then do a db.save in that case...but I probably tried to use update or doc.store
Flying by the seat of my pants with 3 weeks python experience getting a proof of concept so we can use CouchDB as our main datasource. So thanks again! - Adam Flying by the seat of my pants getting a prototype together - thanks very much for the help On Sun, Feb 15, 2009 at 3:36 PM, Jeff Hinrichs - DM&T <[email protected]>wrote: > On Sat, Feb 14, 2009 at 8:31 PM, Adam Petty <[email protected]> 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 >
