Refinitiv Data Library for Python

Configuration file

For ease of use, you can set various initialization parameters of the session layer and whole RD Library in the refinitiv-data.config.json configuration file - as detailed in the next section below.

Typically, you may place this file in the same folder as your Notebook or Python script. You can also place the file in your home folder, or you can place it in an alternative folder and specify the folder path using the RD_LIB_CONFIG_PATH environment variable.

Using configuration file

Using the Refinitiv data library config file allows you to specify various parameters such as:

  • Default session
  • Credentials
  • Connectivity parameters
  • Logging related:
    • Enable/Disable console or file logging
    • Log level
    • Log file name

Using the refinitiv-data.config.json file, where possible, provides the simplest approach to creating and opening sessions.
For example, assuming you have refinitiv-data.config.json in the Configuration directory with the credentials and the specified default session, you can create and open the default session as follows:

rd.open_session()

The above will look for an entry such as:

"sessions": {
    "default": "desktop.workspace",
    ...
}

and then use the parameters defined in the config section ("desktop.workspace" in this example) to create and open a desktop session.

Note: If you do not have any configuration file, by default rd.open_session() creates and opens a desktop session. This session will try to connect to the Refinitiv Workspace (or Eikon) desktop application running on the same machine that your Python script.

Open a specific configured session

If you have multiple sessions configurations specified in the json file you can open a specific one by name e.g.:

rd.open_session(name='platform.rdp')

The above code would open a session based on the parameters specified in the "platform.rdp" section of the json file.