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.
Stay organized with collections
Save and categorize content based on your preferences.
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.
ReturnsList of RequestStatProto protobufs.
- google.appengine.ext.appstats.loader.PickleToFile(records, outfile)source
Writes appstats data to file.
ParametersReturnsNone.
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.
Parametersdatafile – file object to read appstats data from. File format is a
pickled list of protobufs encoded as binary strings.
ReturnsList 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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-06-16 UTC."],[[["This module provides functionality for loading and saving appstats data from various sources, including memcache and files."],["The `FromMemcache` function retrieves appstats records from memcache, filtering by timestamp and accommodating Java applications."],["The `PickleToFile` function saves appstats data to a file in a pickled format as a list of protobufs encoded as binary strings."],["The `UnpickleFromFile` function reads appstats data from a file that is in a pickled format and returns a list of RequestStatProto protobufs."]]],[]]