[pyamf-users] Python/Django/Google App Engine De-serialization Issue

Michael Wesner mike at konsole.net
Tue Jul 1 19:29:15 CEST 2008


Hi,

I am using the following software:
	python 2.5
	Google App Engine SDK
	Google App Engine Django Helper
	Django from SVN Trunk (the helper works with that)
	PYAMF from SVN Trunk

The software all is setup and works well, I even have the google-ae- 
utils package setup so that django sessions work, etc.  This is  
definitely a pyamf issue.


I am able to use the pyamf Django gateway to setup services and pass  
all simple types, untyped objects and bytearray between client/server  
all fine.  (pass in, return... return pass in... all fine)

I am able to return a typed Google App Engine db.Model based object to  
the client from a service., they show up typed and thats fine.

I am NOT able to take that typed object  or any typed object and pass  
it into a service method. (which then de-serializes into an app engine  
db.Model based object)   It seems that pyamf can not de-serialize into  
a google app engine model.


The issue is mentioned on this blog comment:  http://aralbalkan.com/1319#comment-138065
Someone named Nick Joyce says that pyamf does support serialization of  
GAE objects... which i guess is true.. it just doesnt appear to  
support de-serialization.


My questions are:

0. is this an issue or does someone have this working?
1. is there a ticket for this issue?  I didnt see one at quick glance
2. is there a hack or patch that anyone has for this issue?  (I'd  
prefer not to use simple vo's and such.)

Thanks for any info you can provide.  This is holding up a big project  
and I am not sure I want to make some nasty hack to pyamf.  I'd rather  
not have to merge things later as pyamf matures.

-Michael Wesner
(Python/Django guy, working with some really sharp flex guys)





P.S.   on handling the .key() for google app engine entities ....

This seems strange since it looks to just be passing the properties.  
Its not handling the app engine model key's either, which could be  
solved by sticking a string version of the key onto a property that  
only client side VO's have.. and then when De-serializing it, could  
get the Key object and set it back on the entity, for example:

for the client:
	obj.keystr =  str(obj.key())

back from the client:
	obj._entity._Entity__key = db.Key(fromclientobj.keystr)


More information about the users mailing list