prologin.rpc.server module¶
-
exception
prologin.rpc.server.
BadToken
¶ Bases:
Exception
Exception 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.AiohttpApp
RPC 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:
type
Metaclass 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:
Exception
Exception used to notice the remote callers that the requested method does not exist.
-
exception
prologin.rpc.server.
MissingToken
¶ Bases:
Exception
Exception 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.