Python 2.7 has reached end of support and will be deprecated on January 31, 2026. After deprecation, you won't be able to deploy Python 2.7 applications, even if your organization previously used an organization policy to re-enable deployments of legacy runtimes. Your existing Python 2.7 applications will continue to run and receive traffic after their deprecation date. We recommend that you migrate to the latest supported version of Python.

google.appengine.ext.appstats.loader module

Summary

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.

Contents

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

Parameters
  • 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.

Returns

List of RequestStatProto protobufs.

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

Writes appstats data to file.

Parameters
  • records – list of RequestStatProto protobufs

  • outfile – file object to write appstats data to

Returns

None.

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

google.appengine.ext.appstats.loader.UnpickleFromFile(datafile)source

Reads appstats data from file.

Parameters

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

Returns

List of RequestStatProto protobufs.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年06月16日 UTC.