Module Expr Str Import alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias Assign NameStore Num Assign NameStore Num ClassDef bases NameLoad body Expr Str decorator_list ClassDef bases NameLoad body Expr Str decorator_list ClassDef bases NameLoad body Expr Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Dict AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad If CompareIn AttributeLoad NameLoad attr NameLoad body Return Call SubscriptLoad NameLoad Index AttributeLoad NameLoad attr AttributeLoad NameLoad attr orelse Return NameLoad decorator_list FunctionDef arguments args defaults body Expr Str If Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr Str Str attr Str body Return Str orelse Return Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str If Call NameLoad NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Str orelse If UnaryOpNot Call NameLoad NameLoad NameLoad body Raise NameLoad If CompareGt Call NameLoad NameLoad NameLoad body Raise NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str Assign NameStore Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad TryExcept body Expr Call AttributeLoad NameLoad attr Call NameLoad Str NameLoad NameLoad handlers ExceptHandler type AttributeLoad NameLoad attr name NameStore body Raise Call NameLoad NameLoad Return Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad If Call NameLoad NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Str orelse If UnaryOpNot Call NameLoad NameLoad NameLoad body Raise Call NameLoad Str If CompareGt Call NameLoad NameLoad NameLoad body Raise Call NameLoad BinOpMod Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad TryExcept body Expr Call AttributeLoad NameLoad attr Call NameLoad Str NameLoad NameLoad handlers ExceptHandler type AttributeLoad NameLoad attr name NameStore body Raise Call NameLoad NameLoad decorator_list
N/A N/A Channel API.

This module allows App Engine apps to push messages to a client.

Functions defined in this module:
  create_channel: Creates a channel to send messages to.
  send_message: Send a message to any clients listening on the given channel.
 N/A os google.appengine.api api_base_pb google.appengine.api apiproxy_stub_map google.appengine.api.channel channel_service_pb google.appengine.runtime apiproxy_errors N/A MAXIMUM_CLIENT_ID_LENGTH 256 N/A MAXIMUM_MESSAGE_LENGTH 32767 Error N/A Exception N/A N/A Base error class for this module. N/A InvalidChannelClientIdError N/A Error N/A N/A Error that indicates a bad client id. N/A InvalidMessageError N/A Error N/A N/A Error that indicates a message is malformed. N/A _ToChannelError N/A N/A error N/A N/A N/A Translate an application error to a channel Error, if possible.

  Args:
    error: An ApplicationError to translate.

  Returns:
    The appropriate channel service error, if a match is found, or the original
    ApplicationError.
   N/A error_map N/A N/A N/A channel_service_pb ChannelServiceError INVALID_CHANNEL_KEY N/A N/A channel_service_pb ChannelServiceError BAD_MESSAGE InvalidChannelClientIdError InvalidMessageError N/A N/A N/A error application_error error_map N/A N/A N/A N/A error_map N/A N/A error application_error N/A error error_detail N/A N/A error N/A _GetService N/A N/A N/A N/A N/A Gets the service name to use, based on if we're on the dev server. N/A N/A N/A N/A N/A N/A os environ get SERVER_SOFTWARE startswith Devel N/A N/A channel N/A N/A xmpp N/A _ValidateClientId N/A N/A client_id N/A N/A N/A Validates a client id.

  Args:
    client_id: The client id provided by the application.

  Returns:
    If the client id is of type str, returns the original client id.
    If the client id is of type unicode, returns the id encoded to utf-8.

  Raises:
    InvalidChannelClientIdError: if client id is not an instance of str or
        unicode, or if the (utf-8 encoded) string is longer than 64 characters.
   N/A N/A isinstance client_id unicode N/A N/A client_id N/A N/A client_id encode utf-8 N/A N/A N/A N/A isinstance client_id str N/A N/A InvalidChannelClientIdError N/A N/A N/A len client_id MAXIMUM_CLIENT_ID_LENGTH N/A N/A InvalidChannelClientIdError N/A client_id N/A create_channel N/A N/A client_id duration_minutes N/A None N/A N/A Create a channel.

  Args:
    client_id: A string to identify this channel on the server side.
    duration_minutes: A string, the maximum number of minutes the channel 
      should be open.
  Returns:
    A token that the client can use to connect to the channel.

  Raises:
    InvalidChannelClientIdError: if clientid is not an instance of str or
        unicode, or if the (utf-8 encoded) string is longer than 64 characters.
    Other errors returned by _ToChannelError
   N/A client_id N/A _ValidateClientId client_id N/A request N/A N/A channel_service_pb CreateChannelRequest N/A response N/A N/A channel_service_pb CreateChannelResponse N/A N/A N/A request set_application_key client_id N/A N/A N/A N/A N/A apiproxy_stub_map MakeSyncCall N/A _GetService CreateChannel request response N/A N/A N/A N/A apiproxy_errors ApplicationError N/A e N/A N/A N/A _ToChannelError e N/A N/A N/A response token N/A send_message N/A N/A client_id message N/A N/A N/A Send a message to a channel.

  Args:
    client_id: The client id passed to create_channel.
    message: A string representing the message to send.

  Raises:
    InvalidChannelClientIdError: if client_id is not an instance of str or
        unicode, or if the (utf-8 encoded) string is longer than 64 characters.
    InvalidMessageError: if the message isn't a string or is too long.
    Errors returned by _ToChannelError
   N/A client_id N/A _ValidateClientId client_id N/A N/A isinstance message unicode N/A N/A message N/A N/A message encode utf-8 N/A N/A N/A N/A isinstance message str N/A N/A N/A InvalidMessageError Message must be a string N/A N/A N/A len message MAXIMUM_MESSAGE_LENGTH N/A N/A N/A InvalidMessageError N/A Message must be no longer than %d chars MAXIMUM_MESSAGE_LENGTH N/A request N/A N/A channel_service_pb SendMessageRequest N/A response N/A N/A api_base_pb VoidProto N/A N/A N/A request set_application_key client_id N/A N/A N/A request set_message message N/A N/A N/A N/A N/A apiproxy_stub_map MakeSyncCall N/A _GetService SendChannelMessage request response N/A N/A N/A N/A apiproxy_errors ApplicationError N/A e N/A N/A N/A _ToChannelError e N/A