Python 3.9 is now generally available.

google.appengine.api.runtime.memory_usage

Returns a SystemStat describing memory usage, expressed in MB.

The returned object has the following accessors:

  • current(): memory currently used by this instance
  • average1m(): average memory use, over the last minute
  • average10m(): average memory use, over the last ten minutes