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

Summary

Base class for implementing RPC of API proxy stubs.

Contents

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.

CheckSuccess()source

If there was an exception, raise it now.

Raises

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

Clone()source

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.

FINISHING = 2
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.

Parameters

as constructor; see __init__. (Same) –

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

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

RUNNING = 1
Wait()source

Waits on the API call associated with this RPC.

exception
state

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.