LSEG Data Library for Python

session.open

This method opens the session and connects your application to the Delivery Platform (formerly Refinitiv Data Platform).

Module

lseg.data.session

Syntax

session.open()

Parameters

None.

Returned value

Session state

Usage

The following example demonstrates how to open a session and check the session state to ensure that it opened successfully.

import lseg.data as ld

DESKTOP_APP_KEY = os.getenv("DESKTOP_APP_KEY")
session = ld.session.desktop.Definition(app_key=DESKTOP_APP_KEY).get_session()
ld.session.set_default(session)

# open session
session.open()

# check the open state
session.open_state  # returns OpenState.Opened

Session state

40 words (0:13 mins)