Notice: Over the next few months, we're reorganizing the App Engine documentation site to make it easier to find content and better align with the rest of Google Cloud products. The same content will be available, but the navigation will now match the rest of the Cloud products. If you have feedback or questions as you navigate the site, click Send Feedback.

Python 2 is no longer supported by the community. We recommend that you migrate Python 2 apps to Python 3.
Stay organized with collections Save and categorize content based on your preferences.

google.appengine.ext.appstats.loader module


Loading appstats data from and to various sources like file, memcache etc.

The file currently has modules to read data from memcache, to write appstats data to a file in pickled format, and to read records from a file after unpickling. The script is envisioned to be extensible in the future to allow reading/writing to/from datastore, storing data in alternate file formats such as SQLLite etc.


google.appengine.ext.appstats.loader.FromMemcache(filter_timestamp=0, java_application=False)source

Reads appstats data from memcache.

Get all appstats full records from memcache which correspond to requests with a greater timestamp than filter_timestamp

  • filter_timestamp – only retrieve records with timestamp (in milliseconds) higher than this value. If 0, all records are retrieved.

  • java_application – Boolean. If true, this function is being called by the download_appstats tool for a Java application.


List of RequestStatProto protobufs.

google.appengine.ext.appstats.loader.PickleToFile(records, outfile)source

Writes appstats data to file.

  • records – list of RequestStatProto protobufs

  • outfile – file object to write appstats data to



File format is a pickled list of protobufs encoded as binary strings.


Reads appstats data from file.


datafile – file object to read appstats data from. File format is a pickled list of protobufs encoded as binary strings.


List of RequestStatProto protobufs.