yr.init

Contents

yr.init#

yr.init(conf: Config | None = None) ClientInfo[source]#

The openYuanRong client initialization interface is used to configure the running mode and other parameters.

Parameters:

conf (Config, optional) – The initialization parameter configuration for Yuanrong. For detailed descriptions of the parameters, see the Config data structure. It is optional and will be imported from environment variables if left empty.

Returns:

The context information of this invocation. Data type is ClientInfo.

Raises:
  • RuntimeError – If yr.init is called more than once.

  • TypeError – If the parameter type is incorrect.

  • ValueError – If the parameter value is incorrect.

Example

>>> import yr
>>>
>>> conf = yr.Config()
>>> yr.init(conf)