I'm especially interested in solutions with source code available (Django independency is a plus, but I'm willing to hack my way through)
You can, of course, write your own handler. Other than that, your options currently are limited to:
Update: New version of Google AppEngine supports data import to and export from the online application natively. In their terms this is called upload_data
and download_data
respectively (names of subcommands of appcfg.py
).
Please refer to Google documentation how to export and import data from/to GAE. This is probably the better way to do it today.
My old answer is below:
I use to_xml() method of the Model class to export the datastore.
class XmlExport(webapp.RequestHandler):
def get(self):
objects=MyModel.all().fetch(1000)
xml='<?xml version="1.0" encoding="UTF-8"?>\n<site>\n'
for o in objects:
xml = xml + o.to_xml()
xml = xml + '</site>'
self.response.headers['Content-Type']='text/xml; charset=utf-8'
self.response.out.write(xml)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With