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.api.apiproxy_rpc module


Base class for implementing RPC of API proxy stubs.


class google.appengine.api.apiproxy_rpc.RPC(package=None, call=None, request=None, response=None, callback=None, deadline=None, stub=None)source

Bases: object

Base class for implementing RPC of API proxy stubs.

To implement a RPC to make real asynchronous API call:
  • Extend this class.

  • Override _MakeCallImpl and/or _WaitImpl to do a real asynchronous call.


If there was an exception, raise it now.


Exception of the API call or the callback, if any.


Make a shallow copy of this instances attributes, excluding methods.

This is usually used when an RPC has been specified with some configuration options and is being used as a template for multiple RPCs outside of a developer’s easy control.

IDLE = 0
MakeCall(package=None, call=None, request=None, response=None, callback=None, deadline=None)source

Makes an asynchronous (i.e. non-blocking) API call within the specified package for the specified call method.

It will call the _MakeRealCall to do the real job.


as constructor; see __init__. (Same) –

  • TypeError or AssertionError if an argument is of an invalid type.

  • AssertionError or RuntimeError is an RPC is already in use.


Waits on the API call associated with this RPC.