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.ui module
Summary
Web-based User Interface for appstats.
This is a simple set of webapp-based request handlers that display the
collected statistics and let you drill down on the information in
various ways.
Template files are in the templates/ subdirectory. Static files are
in the static/ subdirectory.
The templates are written to work with either Django 0.96 or Django
1.0, and most likely they also work with Django 1.1.
Contents
- class google.appengine.ext.appstats.ui.AllStatsInfo(calls, cost, billed_ops)source
-
Bases: object
AllStats data.
- class google.appengine.ext.appstats.ui.AuthCheckMiddleware(application)source
-
Bases: object
Middleware which conducts an auth check.
- class google.appengine.ext.appstats.ui.DetailsHandlersource
-
Bases: google.appengine.ext.webapp._webapp25.RequestHandler
Request handler for the details page (/stats/details).
- class google.appengine.ext.appstats.ui.FileHandlersource
-
Bases: google.appengine.ext.webapp._webapp25.RequestHandler
Request handler for displaying any text file in the system.
NOTE: This gives any admin of your app full access to your source code.
- class google.appengine.ext.appstats.ui.PathStatsInfo(cost, billed_ops, num_requests, most_recent_requests)source
-
Bases: object
PathStats data.
- class google.appengine.ext.appstats.ui.PivotInfo(name, calls, cost, billed_ops, cost_pct)source
-
Bases: object
Pivot data. The name attribute can be an rpc or a path.
- classmethod from_list(values)source
- to_list()source
-
Convert to a list with values in the locations expected by the ui.
- class google.appengine.ext.appstats.ui.ShellHandlersource
-
Bases: google.appengine.ext.webapp._webapp25.RequestHandler
Request handler for interactive shell.
This is like /_ah/admin/interactive, but with Appstats output integrated.
GET displays a form; POST runs some code and displays its output + stats.
- class google.appengine.ext.appstats.ui.StaticHandlersource
-
Bases: google.appengine.ext.webapp._webapp25.RequestHandler
Request handler to serve static files.
Only files directory in the static subdirectory are rendered this
way (no subdirectories).
- class google.appengine.ext.appstats.ui.SummaryHandlersource
-
Bases: google.appengine.ext.webapp._webapp25.RequestHandler
Request handler for the main stats page (/stats/).
- google.appengine.ext.appstats.ui.get_details_data(record, file_url=None)source
Calculate detailed appstats data for a single request.
Parameters
-
record – A RequestStatProto which contains detailed Appstats recording
for an individual request.
-
file_url – Indicates the URL to be used to follow links to files in
application source code. A default value of ‘None’ indicates that
links to files in source code will not be shown.
ReturnsA dictionary containing detailed appstats data for a single request.
- google.appengine.ext.appstats.ui.main()source
-
Main program. Run the auth checking middleware wrapped WSGIApplication.
- google.appengine.ext.appstats.ui.render(tmplname, data)source
-
Helper function to render a template.
- google.appengine.ext.appstats.ui.render_record(response, record, file_url=None, extra_data=None)source
Render an appstats record in detail.
This is a minor refactoring of DetailsHandler to support an offline
tool for analyzing Appstats data and to allow that tool to call
the original Appstats detailed record visualization. Since the offline
tool may read Appstats records from other sources (e.g., a downloaded file),
we are moving the logic of DetailsHandler related to processing and
visualizing individual Appstats records to this function. This
function may now be called from outside this file.
Parameters
-
response – An instance of the webapp response class representing
data to be sent in response to a web request.
-
record – A RequestStatProto which contains detailed Appstats recording
for an individual request.
-
file_url – Indicates the URL to be used to follow links to files in
application source code. A default value of ‘None’ indicates that
links to files in source code will not be shown.
-
extra_data – Optional dict of additional parameters for template.
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 a web-based user interface for viewing and analyzing Appstats data, which includes statistics about web application performance."],["The UI is composed of several request handlers, including `DetailsHandler` for individual request details, `FileHandler` for displaying text files, `ShellHandler` for an interactive shell with integrated Appstats, `StaticHandler` for serving static files, and `SummaryHandler` for the main stats page."],["The module contains data structures such as `AllStatsInfo`, `PathStatsInfo`, and `PivotInfo`, which hold different types of aggregated statistics data."],["The `get_details_data` function calculates detailed Appstats data for a single request, while the `render_record` function allows for the visualization of detailed Appstats records and can be used by other tools."],["The templates used by this UI are compatible with Django 0.96, 1.0, and likely 1.1, and static files and templates are kept in separate subdirectories."]]],[]]