What is the easiest way to export data from a Google engine application in real time?

I am especially interested in solutions with accessible source code (django independence is a plus, but I'm ready to crack my way)

+6
python google-app-engine frameworks
source share
2 answers

You can, of course, write your own handler. Additionally, your options are currently limited:

  • gae-rest , which provides a RESTful interface for data storage.
  • approcket , a replication tool between MySQL and the App Engine.
  • Funny named GAEBAR - Backup and restore Google App Engine.
+6
source share

Update . The new version of the Google AppEngine application supports the import and export of data from an online application natively. In their terms, this is called upload_data and download_data respectively ( appcfg.py subcommand appcfg.py ).

See the Google documentation on how to export and import data from / to GAE . This is probably the best way to do it today.

My old answer is below:


I use the to_xml () method of the Model class to export the data store.

 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) 
+3
source share

All Articles