Client

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).

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

__init__(**kwargs)

C’tor.

Parameters

kwargs – just stored as an attribute and passed when creating the RPCClient

property call

To be removed once we’re sure self.call has been removed

Type

Deprecated

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.

Parameters
  • 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

getClientKWArgs()

Returns a copy of the connection arguments

getServer()

Getter for the server url. Useful ?

httpsClient

alias of DIRAC.Core.Tornado.Client.TornadoClient.TornadoClient

setServer(url)

Set the server URL used by default

Parameters

url – url of the service

DIRAC.Core.Base.Client.createClient(serviceName)

Decorator to expose the service functions automatically in the Client.

Parameters

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

class DIRAC.Core.Base.Client.partialmethodWithDoc(func, /, *args, **keywords)

Bases: functools.partialmethod

Extension of meth:functools.partialmethod that preserves docstrings

__init__(func, /, *args, **keywords)