prologin.rpc.server module¶
-
exception
prologin.rpc.server.BadToken¶ Bases:
ExceptionException used to notice the remote callers that the timeauth token is wrong or has expired.
-
class
prologin.rpc.server.BaseRPCApp(app_name, secret=None, **kwargs)¶ Bases:
prologin.web.AiohttpAppRPC base application: let clients call remotely subclasses methods.
Just subclass me, add some remote methods using the remote_method decorator and instanciate me!
-
REMOTE_METHODS= {}¶
-
-
class
prologin.rpc.server.MethodCollection(name, bases, dct)¶ Bases:
typeMetaclass for RPC objects: collect remote methods and store them in a class-wide REMOTE_METHOD dictionnary. Be careful: of course, stored methods are not bound to an instance.
-
exception
prologin.rpc.server.MethodError¶ Bases:
ExceptionException used to notice the remote callers that the requested method does not exist.
-
exception
prologin.rpc.server.MissingToken¶ Bases:
ExceptionException used to notice the remote callers that the timeauth token cannot be found in the request.
-
class
prologin.rpc.server.RemoteCallHandler(request)¶ Bases:
object-
property
rpc_object¶ contains method that can be called remotely.
- Type
RPC object
-
property
-
prologin.rpc.server.is_remote_method(obj)¶ Return if a random object is a remote method.
-
prologin.rpc.server.remote_method(func=None, *, auth_required=True)¶ Decorator for methods to be callable remotely.