
    5jJ                         S SK Jr  SSKJr  SSKJr  SSKJr  SSKJ	r	  SS	K
Jr  SS
KJrJrJrJr  SSKJrJr  \(       a  SSKJrJrJrJr   " S S\\\      \\\      5      rg)    )TYPE_CHECKING   )PricingData)Stream   )ContentUsageLoggerMixin   )ContentType)Session)create_reprtry_copy_to_listuniverse_arg_parserfields_arg_parser)DataProviderLayerResponse)OptStrExtendedParams
StrStrings
OptStrStrsc                   z   ^  \ rS rSrSrSr    S
           SU 4S jjjrS\4S jrSS\	S\
4S jjrS	rU =r$ )
Definition   a  
Creates a definition of information about the specific Pricing data.

Parameters
----------
universe : str or list of str
    Single instrument or list of instruments.
fields : str or list of str, optional
    Single field or list of fields to return.
service : str, optional
    Name of the streaming service publishing the instruments.
api: str, optional
    Specifies the data source for the further retrieval of data.
extended_params : dict, optional
    Specifies the parameters that will be merged with the request.

Examples
--------
>>> from lseg.data.content import pricing
>>> definition = pricing.Definition("EUR=")
>>> response = definition.get_data()

zPricing.PricingDefinitionreturnc                 r  > U=(       d    0 nUR                  SU5      n[        U5      n[        R                  " U5      nUR                  SU5      n[        U5      n[        R
                  " U=(       d    / 5      n[        TU ]  [        R                  UUUS9  Xl
        X l        X0l        X@l        XPl        g )Nuniversefields)	data_typer   r   extended_params)popr   r   get_listr   
get_uniquesuper__init__r
   PRICING	_universe_fields_service_api_extended_params)selfr   r   serviceapir   	__class__s         d/root/lseg-credit/backend/venv/lib/python3.13/site-packages/lseg/data/content/pricing/_definition.pyr#   Definition.__init__-   s     */R"&&z8<#H-&//9 $$Xv6!&)"--fl;!))+	 	 	
 "	 /    c                 2    [        U SU R                   S3S9$ )Nz{name=})content)r   r%   )r*   s    r.   __repr__Definition.__repr__H   s#    dnn-R0
 	
r0   sessionc           	          [        U R                  UU R                  U R                  U R                  U R
                  S9$ )a  
Creates and returns the pricing stream that allows you to get streaming data for previously defined instruments.

Parameters
----------
session : Session, optional
    Session object. If it's not passed the default session will be used.

Returns
-------
pricing.Stream

Examples
--------
>>> from lseg.data.content import pricing
>>> definition = pricing.Definition("IBM")
>>> stream = definition.get_stream()
>>> stream.open()
)r   r6   r   r+   r,   r   )r   r%   r&   r'   r(   r)   )r*   r6   s     r.   
get_streamDefinition.get_streamN   s9    ( ^^<<MM		 11
 	
r0   )r(   r)   r&   r'   r%   )NNNN)r   r   r   r   r+   r   r,   r   r   r   r   N)N)__name__
__module____qualname____firstlineno____doc___USAGE_CLS_NAMEr#   strr4   r   r   r8   __static_attributes____classcell__)r-   s   @r.   r   r      s    0 2O
  $ ,000 0 	0
 0 *0 
0 06
# 

' 
V 
 
r0   r   N)typingr   _pricing_content_providerr   _stream_facader   _content_provider_layerr   _content_typer
   _core.sessionr   _toolsr   r   r   r   delivery._data._data_providerr   r   _typesr   r   r   r   r    r0   r.   <module>rM      sO      2 " = ( $ [ [ HHHZ
H[12h{+,Z
r0   