Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #45797
| Date | 2013-05-23 14:16 +0300 |
|---|---|
| From | Burak Arslan <burak.arslan@arskom.com.tr> |
| Subject | Re: serialize a class to XML and back |
| References | <519DF151.1080405@globe.de> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.2010.1369307794.3114.python-list@python.org> (permalink) |
On 05/23/13 13:37, Schneider wrote: > Hi list, > > how can I serialize a python class to XML? Plus a way to get the class > back from the XML? > > My aim is to store instances of this class in a database. Hi, I'm working on a project called Spyne (http://spyne.io). With one object definition, you can serialize to/from xml and save to database via SQLAlchemy. The code generator on the site has examples for RPC and SQL. If you're not interested in doing RPC with the resulting document, here's an example for just the xml part: https://github.com/arskom/spyne/blob/master/examples/xml_utils.py Best regards, Burak
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: serialize a class to XML and back Burak Arslan <burak.arslan@arskom.com.tr> - 2013-05-23 14:16 +0300
csiph-web