
    5j
                     "    S r Sr " S S\5      rg)a  
This type of session is used to connect to the Data Platform through Refinitiv Eikon or LSEG Workspace.
It requires Refinitiv Eikon or LSEG Workspace to be running alongside your application. This type of session does
not work with Refinitiv Eikon Web or LSEG Workspace for Web.
)
Definitionc                   >    \ rS rSrSr   S
S\S\S\4S jjrS rS	rg)r   
   a`  
Desktop session.
Can be defined indirectly using the name of a session defined in
the configuration file or directly by specifying the app_key parameter.

Parameters
----------
name: str, default "workspace"
    Name of the session in the config file.
app_key: str, optional
    Application key.
app_name: str, optional
    Application name.

Raises
---------
Exception
    If app-key is not found in the config file and in arguments.

Examples
--------
>>> from lseg.data import session
>>> definition = session.desktop.Definition(name="custom-session-name")
>>> desktop_session = definition.get_session()
Nnameapp_keyapp_namec                 j    SSK Jn  [        U[        5      (       d  [	        S5      eU" UUUS9U l        g )N   )+_make_desktop_session_provider_by_argumentsz1Invalid session name type, please provide string.)session_namer   r   )_core.session._session_providerr
   
isinstancestr
ValueError_create_session)selfr   r   r   r
   s        X/root/lseg-credit/backend/venv/lib/python3.13/site-packages/lseg/data/session/desktop.py__init__Definition.__init__%   s7     	b$$$PQQJ 
    c                 &    U R                  5       nU$ )zQ
Creates and returns the session.

Returns
-------
The desktop session instance.
r   )r   sessions     r   get_sessionDefinition.get_session6   s     &&(r   r   )	workspaceNN)	__name__
__module____qualname____firstlineno____doc__r   r   r   __static_attributes__ r   r   r   r   
   s8    8  	

 
 	
"	r   r   N)r    __all__objectr   r"   r   r   <module>r%      s    5 5r   