Module that expose the base class for DIRAC Clients.

This class exposes possible RPC calls, given a url of a service.

class DIRAC.Core.Base.Client.Client(**kwargs)

Bases: object

Simple class to redirect unknown actions directly to the server. Arguments to the constructor are passed to the RPCClient constructor as they are. Some of them can however be overwritten at each call (url and timeout). This class is not thread safe !

  • The self.serverURL member should be set by the inheriting class


Parameters:kwargs – just stored as an attribute and passed when creating the RPCClient
executeRPC(*parms, **kws)

This method extracts some parameters from kwargs that are used as parameter of the constructor or RPCClient. Unfortunately, only a few of all the available parameters of BaseClient are exposed.

  • rpc – if an RPC client is passed, use that one
  • timeout – we can change the timeout on a per call bases. Default is self.timeout
  • url – We can specify which url to use

Getter for the server url. Useful ?


Set the server URL used by default

Parameters:url – url of the service

Specify the timeout of the call. Forwarded to RPCClient

param int timeout:
 timeout for the RPC calls

Deprecated: Please use self._getRPC(timeout) or self.timeout=<value>


Decorator to expose the service functions automatically in the Client.

Parameters:serviceName (str) – system/service. e.g. WorkloadManagement/JobMonitoring