LSEG Data Warning: You open a platform session using the default value of the signon_control paramet

Can you help me troubleshoot a run time problem when calling an open session with an APP_Key. This is my first time using the API.

ld.open_session(app_key = APP_KEY)

here is the output:
C:\Users\mvyvo\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.13_qbz5n2kfra8p0\LocalCache\local-packages\Python313\site-packages\lseg\data_access_layer\session.py:72:FutureWarning:
You open a platform session using the default value of the signon_control parameter (signon_control=True).
In future library version v2.0, this default will be changed to False.
If you want to keep the same behavior as today, you will need to set the signon_control parameter to True either in the library configuration file
({'sessions':{'platform':{'your_session_name':{'signon_control':true}}}}) or in your code where you create the Platform Session.
These alternative options are already supported in the current version of the library.

Best Answers

  • Jirapongse
    Jirapongse ✭✭✭✭✭
    Answer ✓

    If you would like to use the platform.ldp session, you can set the "signon_control" to true, as shown below.

      "platform": {
    "ldp": {
    "app-key": "<appkey>",
    "username": "<username>",
    "password": "<password>",
    "signon_control":true
    }
    },

    To use the open the default session, you can run the ld.open_session() without passing any parameters.

  • raksina.samasiri
    Answer ✓

    Hi @mvyvoda ,

    Please let me add that The Data Library's configuration "signon_control" is use for setting the Data Platform session (RDP Authentication Service) "takeExclusiveSignOnControl" parameter. If you set it to true, it overrides any previous session you logged on i.e. force sign-out this ID from other applications and sign-in here.

    This setting make your account single sign-on with the library, but reduce a change to encounter "Session quota is reached." issue.

    I hope this information helps

Answers

  • Jirapongse
    Jirapongse ✭✭✭✭✭

    @mvyvoda

    Thank you for reaching out to us.

    First, you need to check if you would like to use the desktop.workspace or platform.ldp session.

    The desktop.workspace session retrieves data through the LSEG Workspace application running on the same machine and it requires only an application key.

    The platform.ldp session retrieves data from the cloud platform and it requires an username, password, and application key to connect to the platform.

    I assume that you have the lseg-data.config.json file.

     "sessions": {
            "default": "platform.ldp",
            "platform": {
                "ldp": {
                    "app-key": "<appkey>",
                    "username": "<username>",
                    "password": "<password>",
                    "signon_control":true
                }
            },
            "desktop": {
                "workspace": {
                    "app-key": "<appkey>"
                }
            }
        }
    

    You need to set the sessions.default configuration to the correct session (platform.ldp or desktop.workspace).

  • mvyvoda
    mvyvoda Newcomer

    Thank you. I previously updated this config file for use with the default of "platform.ldp".

    {
    "logs": {
    "level": "debug",
    "transports": {
    "console": {
    "enabled": false
    },
    "file": {
    "enabled": false,
    "name": "lseg-data-lib.log"
    }
    }
    },
    "sessions": {
    "default": "platform.ldp",
    "platform": {
    "ldp": {
    "app-key": "xxxxxxxx", # I entered my KEY here, but have this blank for this post
    "username": "xxxxx@xxxx.com", # I entered my USERNAME here, but have this blank for this post
    "password": "xxxxxx" # I entered my PASSWORD here, but have this blank for this post
    },
    "deployed": {
    "app-key": "YOUR APP KEY GOES HERE!",
    "realtime-distribution-system": {
    "url" : "YOUR DEPLOYED HOST:PORT GOES HERE!",
    "dacs" : {
    "username" : "YOUR DACS ID GOES HERE!",
    "application-id" : 256,
    "position" : ""
    }
    }
    }
    },
    "desktop": {
    "workspace": {
    "app-key": "xxxxxxxx", # I entered my KEY here, but have this blank for this post
    }
    }
    }
    }

    I placed this in the directory I am running my Python Script.