Current File : //proc/self/root/lib/python3/dist-packages/botocore/__pycache__/session.cpython-312.pyc
�

P��e �����dZddlZddlZddlZddlZddlZddlZddlZddl	Zddl
ZddlZddlmZm
Z
mZmZmZmZmZmZmZddlmZmZddlmZmZmZmZmZmZmZddl m!Z!ddl"m#Z#m$Z$m%Z%m&Z&m'Z'ddl(m)Z)m*Z*m+Z+dd	l,m-Z-dd
l.m/Z/ddl0m1Z1ddl2m3Z3dd
l4m5Z5ddl6m7Z7m8Z8m9Z9ddlmZejte;�Z<Gd�d�Z=Gd�d�Z>Gd�de�Z?Gd�d�Z@dd�ZAy)zV
This module contains the main interface to the botocore package, the
Session object.
�N)	�UNSIGNED�__version__�handlers�invoke_initializers�
monitoring�paginate�retryhandler�	translate�waiter)�HAS_CRT�MutableMapping)�!BOTOCORE_DEFAUT_SESSION_VARIABLES�ConfigChainFactory�ConfiguredEndpointProvider�ConfigValueStore�DefaultConfigResolver�SmartDefaultsConfigStoreFactory�&create_botocore_default_config_mapping)�ClientExceptionsFactory)�ConfigNotFound�InvalidDefaultsMode�PartialCredentialsError�ProfileNotFound�UnknownServiceError)�EventAliaser�HierarchicalEmitter�first_non_none_response)�
create_loader)�ServiceModel)�ResponseParserFactory)�EndpointResolver)�UserAgentString)�
EVENT_ALIASES�IMDSRegionProvider�validate_region_name)rc��eZdZdZeje�ZdZ				d@d�Zd�Z	d�Z
d�Zd�Zd	�Z
d
�Zd�Zd�Zd
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zed��Zd�Zed��ZdAd�Zd�Z d�Z!d�Z"d�Z#ed��Z$d �Z%d!�Z&dAd"�Z'd#�Z(d$�Z)d%�Z*d&�Z+dAd'�Z,dAd(�Z-dAd)�Z.dAd*�Z/d+�Z0dBd,�Z1	dCd-�Z2dBd.�Z3	dDd/�Z4			dEd0�Z5d1�Z6d2�Z7d3�Z8d4�Z9d5�Z:d6�Z;d7�Z<									dFd8�Z=d9�Z>d:�Z?d;�Z@d<�ZAd=�ZBd>�ZC	dGd?�ZDy)H�Sessionae
    The Session object collects together useful functionality
    from `botocore` as well as important data such as configuration
    information and credentials into a single, easy-to-use object.

    :ivar available_profiles: A list of profiles defined in the config
        file associated with this session.
    :ivar profile: The current profile.
    z4%(asctime)s - %(name)s - %(levelname)s - %(message)sNc�J�|�t�|_n||_t|j�|_|r|j	|j�d|_t|_d|_d|_	d|_
d|_d|_d|_
i|_|�||jd<d|_d|_t#�|_t#�|_|j)�t+||j,�|_|�|j.j1|�t3|�y)a�
        Create a new Session object.

        :type session_vars: dict
        :param session_vars: A dictionary that is used to override some or all
            of the environment variables associated with this session.  The
            key/value pairs defined in this dictionary will override the
            corresponding variables defined in ``SESSION_VARIABLES``.

        :type event_hooks: BaseEventHooks
        :param event_hooks: The event hooks object to use. If one is not
            provided, an event hooks object will be automatically created
            for you.

        :type include_builtin_handlers: bool
        :param include_builtin_handlers: Indicates whether or not to
            automatically register builtin handlers.

        :type profile: str
        :param profile: The name of the profile to use for this
            session.  Note that the profile can only be set when
            the session is created.

        N�Botocore��profile)r�_original_handlerr�_events�_register_builtin_handlers�user_agent_namer�user_agent_version�user_agent_extra�_profile�_config�_credentials�_auth_token�_profile_map�_session_instance_vars�_client_config�_last_client_region_used�ComponentLocator�_components�_internal_components�_register_components�SessionVarDict�SESSION_VARIABLES�session_var_map�updater)�self�session_vars�event_hooks�include_builtin_handlersr+s     �2/usr/lib/python3/dist-packages/botocore/session.py�__init__zSession.__init__as
��>��%8�%:�D�"�%0�D�"�#�D�$:�$:�;���#��+�+�D�L�L�9�)���"-��� "�����
���� ������ ���')��#���5<�D�'�'�	�2�"���(,��%�+�-���$4�$6��!��!�!�#�-�d�D�4J�4J�K����#�� � �'�'��5��D�!�c��|j�|j�|j�|j�|j	�|j�|j
�|j�|j�|j�|j�|j�y�N)�_register_credential_provider�_register_token_provider�_register_data_loader�_register_endpoint_resolver�_register_event_emitter�!_register_response_parser_factory�_register_exceptions_factory�_register_config_store�_register_monitor�!_register_default_config_resolver� _register_smart_defaults_factory�_register_user_agent_creator�rBs rFr=zSession._register_components�s����*�*�,��%�%�'��"�"�$��(�(�*��$�$�&��.�.�0��)�)�+��#�#�%���� ��.�.�0��-�-�/��)�)�+rHc�P�|jjd|j�y)N�
event_emitter)r;�register_componentr-rWs rFrOzSession._register_event_emitter�s�����+�+�O�T�\�\�JrHc�P�|jjd|j�y)N�token_provider)r;�lazy_register_component�_create_token_resolverrWs rFrLz Session._register_token_provider�s!�����0�0��d�9�9�	
rHc�@�tjj|�SrJ)�botocore�tokens�create_token_resolverrWs rFr^zSession._create_token_resolver�s�����4�4�T�:�:rHc�P�|jjd|j�y)N�credential_provider)r;r]�_create_credential_resolverrWs rFrKz%Session._register_credential_provider�s!�����0�0�!�4�#C�#C�	
rHc�X�tjj||j��S)N)�region_name)r`�credentials�create_credential_resolverr9rWs rFrez#Session._create_credential_resolver�s+���#�#�>�>��d�;�;�?�
�	
rHc�D���jjd�fd��y)N�data_loaderc�8��t�jd��S)N�	data_path)r�get_config_variablerWs�rF�<lambda>z/Session._register_data_loader.<locals>.<lambda>�s���M�$�":�":�;�"G�H�rH�r;r]rWs`rFrMzSession._register_data_loader�s������0�0��H�	
rHc�H���fd�}�jjd|�y)Nc����jd�}|jd�\}}|j|�}t||��S)Nrk�	endpoints)�uses_builtin_data)�
get_component�load_data_with_path�is_builtin_pathr!)�loaderrs�path�uses_builtinrBs    �rF�create_default_resolverzDSession._register_endpoint_resolver.<locals>.create_default_resolver�sD����'�'�
�6�F�$�8�8��E�O�I�t�!�1�1�$�7�L�#�I��N�NrH�endpoint_resolver�r<r])rBr{s` rFrNz#Session._register_endpoint_resolver�s%���	O�	
�!�!�9�9��!8�	
rHc�H���fd�}�jjd|�y)Nc�^���jd�}|jd�}t|�S)Nrkzsdk-default-configuration)ru�	load_datar)rx�defaultsrBs  �rF�create_default_config_resolverzQSession._register_default_config_resolver.<locals>.create_default_config_resolver�s/����'�'�
�6�F��'�'�(C�D�H�(��2�2rH�default_config_resolverr})rBr�s` rFrTz)Session._register_default_config_resolver�s$���	3�
	
�!�!�9�9�%�'E�	
rHc�H���fd�}�jjd|�y)Nc�V���jd�}t���}t||�S)Nr���session)�_get_internal_componentr$r)r��imds_region_providerrBs  �rF�create_smart_defaults_factoryzOSession._register_smart_defaults_factory.<locals>.create_smart_defaults_factory�s7���&*�&B�&B�)�'�#�$6�d�#C� �2�'�)=��
rH�smart_defaults_factoryr})rBr�s` rFrUz(Session._register_smart_defaults_factory�s$���	�	
�!�!�9�9�$�&C�	
rHc�L�|jjdt��y)N�response_parser_factory)r;rZr rWs rFrPz)Session._register_response_parser_factory�s�����+�+�%�'<�'>�	
rHc�L�|jjdt��y)N�exceptions_factory)r<rZrrWs rFrQz$Session._register_exceptions_factory�s���!�!�4�4� �"9�";�	
rHc�B�tjD]�}t|�dk(r|\}}|j||��)|\}}}|tjur|j
j
||��^|tjus�q|j
j||���y)N�)	r�BUILTIN_HANDLERS�len�register�REGISTER_FIRSTr-�register_first�
REGISTER_LAST�
register_last)rB�events�spec�
event_name�handler�
register_types      rFr.z"Session._register_builtin_handlers�s����-�-�		D�D��4�y�A�~�&*�#�
�G��
�
�j�'�2�59�2�
�G�]� �H�$;�$;�;��L�L�/�/�
�G�D�"�h�&<�&<�<��L�L�.�.�z�7�C�		DrHc�f�tt|���}|jjd|�y)N��mapping�config_store)rrr;rZ)rB�config_store_components  rFrRzSession._register_config_stores1��!1�:�4�@�"
��	
���+�+��2�	
rHc�P�|jjd|j�y)N�monitor)r<r]�_create_csm_monitorrWs rFrSzSession._register_monitors!���!�!�9�9��t�/�/�	
rHc�d�tj�}|jjd|�y)N�user_agent_creator)r"�from_environmentr;rZ)rB�uass  rFrVz$Session._register_user_agent_creators'���.�.�0�����+�+�,@�#�FrHc��|jd�r�|jd�}|jd�}|jd�}tjtj�tjtj
t
jt
j�||tj|������}|Sy)N�csm_enabled�
csm_client_id�csm_host�csm_port)r�)�socket�host�port�
serializer)�adapter�	publisher)	rnr�Monitor�MonitorEventAdapter�SocketPublisherr��AF_INET�
SOCK_DGRAM�
CSMSerializer)rB�	client_idr�r�r�s     rFr�zSession._create_csm_monitors����#�#�M�2��0�0��A�I��+�+�J�7�D��+�+�J�7�D� �(�(�"�6�6�8�$�4�4�!�=�=�����9J�9J�K���)�7�7�&/� �	�
�G��N�rHc�D�|jd�}|jxsdS)Nr��Unknown)ru�_crt_version)rBr�s  rF�_get_crt_versionzSession._get_crt_version's%��!�/�/�0D�E��!�.�.�;�)�;rHc�P�t|j�j��SrJ)�list�_build_profile_map�keysrWs rF�available_profileszSession.available_profiles+s���D�+�+�-�2�2�4�5�5rHc�Z�|j�|jd|_|jS)N�profiles)r6�full_configrWs rFr�zSession._build_profile_map/s/�����$� $� 0� 0�� <�D��� � � rHc�b�|j�|jd�}||_|jS)Nr+)r2rn)rBr+s  rFr+zSession.profile7s-���=�=� ��.�.�y�9�G�#�D�M��}�}�rHc�j�|�|j||�S|jd�j|�S)Nr�)�(_get_config_variable_with_custom_methodsrurn)rB�logical_name�methodss   rFrnzSession.get_config_variable>sC�����@�@��g��
��!�!�.�1�E�E��
�	
rHc�,�t||��}t|�}|jj�D]A\}}|\}}}	}
|
|	d�}d|vr||d<d|vr||d<d|vr||d<|jd
i|��||<�Ct|�	�}|j
|�}
|
S)N)r�r�)�conversion_func�default�instance�
instance_name�env�
env_var_names�config�config_property_namer��)�SubsetChainConfigFactoryrr@�items�create_config_chainrrn)rBr�r��
chain_builderr��name�config_options�config_name�env_varsr��typecast�build_chain_config_argsr��values              rFr�z0Session._get_config_variable_with_custom_methodsGs���1��w�O�
�8��>��$(�$8�$8�$>�$>�$@�	� �D�.�7E�4�K��7�H�#+�"�'�#��W�$�;?�'��8����;C�'��8��7�"�BM�'�(>�?�=�M�=�=��)��G�D�M�	�"2�'�!B��&�:�:�<�H���rHc�P�tjd||�||j|<y)a�Set a configuration variable to a specific value.

        By using this method, you can override the normal lookup
        process used in ``get_config_variable`` by explicitly setting
        a value.  Subsequent calls to ``get_config_variable`` will
        use the ``value``.  This gives you per-session specific
        configuration values.

        ::
            >>> # Assume logical name 'foo' maps to env var 'FOO'
            >>> os.environ['FOO'] = 'myvalue'
            >>> s.get_config_variable('foo')
            'myvalue'
            >>> s.set_config_variable('foo', 'othervalue')
            >>> s.get_config_variable('foo')
            'othervalue'

        :type logical_name: str
        :param logical_name: The logical name of the session variable
            you want to set.  These are the keys in ``SESSION_VARIABLES``.
        :param value: The value to associate with the config variable.

        z$Setting config variable for %s to %rN)�logger�debugr7)rBr�r�s   rF�set_config_variablezSession.set_config_variablecs+��0	���2���	
�
5:��#�#�L�1rHc�@�tj|j�SrJ)�copyr7rWs rF�instance_variableszSession.instance_variables�s���y�y��4�4�5�5rHc��|jd�}|j�}|�|jdi�S||vrt|���||S)a5
        Returns the config values from the config file scoped to the current
        profile.

        The configuration data is loaded **only** from the config file.
        It does not resolve variables based on different locations
        (e.g. first from the session instance, then from environment
        variables, then from the config file).  If you want this lookup
        behavior, use the ``get_config_variable`` method instead.

        Note that this configuration is specific to a single profile (the
        ``profile`` session variable).

        If the ``profile`` session variable is set and the profile does
        not exist in the config file, a ``ProfileNotFound`` exception
        will be raised.

        :raises: ConfigNotFound, ConfigParseError, ProfileNotFound
        :rtype: dict

        r+r�)r+)rnr��getr)rB�profile_name�profile_maps   rF�get_scoped_configzSession.get_scoped_config�s[��,�/�/�	�:���-�-�/�����?�?�9�b�1�1�
��
,�"�,�7�7��|�,�,rHc� �|j��	|jd�}tjj	|�|_	|jd�}tjj
|�}|D]L}||}||jdvr||jd|<�,|jd|j|��N	|jS|jS#t
$rdii|_Y��wxYw#t
$rY|jSwxYw)z�Return the parsed config file.

        The ``get_config`` method returns the config associated with the
        specified profile.  This property returns the contents of the
        **entire** config file.

        :rtype: dict
        �config_filer��credentials_file)r3rnr`�configloader�load_configr�raw_config_parserA)rBr��	cred_file�
cred_profilesr+�	cred_varss      rFr�zSession.full_config�s���<�<��
0�"�6�6�}�E��'�4�4�@�@��M���
�!�4�4�5G�H�	� (� 5� 5� F� F��!�
� -�L�G� -�g� 6�I��d�l�l�:�&>�>�<E����Z�0��9����Z�0��9�@�@��K�L��|�|��t�|�|���)"�
0� *�B�/���
0��$"�
���|�|��
�s$�5C�BC6�C3�2C3�6	D
�D
c��|jS)aRetrieves the default config for creating clients

        :rtype: botocore.client.Config
        :returns: The default client config object when creating clients. If
            the value is ``None`` then there is no default config object
            attached to the session.
        �r8rWs rF�get_default_client_configz!Session.get_default_client_config�s���"�"�"rHc��||_y)a1Sets the default config for creating clients

        :type client_config: botocore.client.Config
        :param client_config: The default client config object when creating
            clients. If the value is ``None`` then there is no default config
            object attached to the session.
        Nr�)rB�
client_configs  rF�set_default_client_configz!Session.set_default_client_config�s��,��rHc�P�tjj|||�|_y)aO
        Manually create credentials for this session.  If you would
        prefer to use botocore without a config file, environment variables,
        or IAM roles, you can pass explicit credentials into this
        method to establish credentials for this session.

        :type access_key: str
        :param access_key: The access key part of the credentials.

        :type secret_key: str
        :param secret_key: The secret key part of the credentials.

        :type token: str
        :param token: An option session token used by STS session
            credentials.
        N)r`rh�Credentialsr4)rB�
access_key�
secret_key�tokens    rF�set_credentialszSession.set_credentials�s$��"%�0�0�<�<��
�E�
��rHc��|j�.|jjd�j�|_|jS)a$
        Return the :class:`botocore.credential.Credential` object
        associated with this session.  If the credentials have not
        yet been loaded, this will attempt to load them.  If they
        have already been loaded, this will return the cached
        credentials.

        rd)r4r;ru�load_credentialsrWs rF�get_credentialszSession.get_credentials�sF�����$� $� 0� 0� >� >�%�!��� �
��� � � rHc��|j�0|jjd�}|j�|_|jS)a
        Return the :class:`botocore.tokens.AuthToken` object associated with
        this session. If the authorization token has not yet been loaded, this
        will attempt to load it. If it has already been loaded, this will
        return the cached authorization token.

        r\)r5r;ru�
load_token)rB�providers  rF�get_auth_tokenzSession.get_auth_tokensD�����#��'�'�5�5�6F�G�H�'�2�2�4�D�����rHc
��|j�d|j�dtj��dtj��dtj
���	}tr|d|j�zz
}tjjd��%|dtjjd�zz
}|jr|d|jzz
}|S)ak
        Return a string suitable for use as a User-Agent header.
        The string will be of the form:

        <agent_name>/<agent_version> Python/<py_ver> <plat_name>/<plat_ver> <exec_env>

        Where:

         - agent_name is the value of the `user_agent_name` attribute
           of the session object (`Botocore` by default).
         - agent_version is the value of the `user_agent_version`
           attribute of the session object (the botocore version by default).
           by default.
         - py_ver is the version of the Python interpreter beng used.
         - plat_name is the name of the platform (e.g. Darwin)
         - plat_ver is the version of the platform
         - exec_env is exec-env/$AWS_EXECUTION_ENV

        If ``user_agent_extra`` is not empty, then this value will be
        appended to the end of the user agent string.

        �/z Python/� z
 awscrt/%s�AWS_EXECUTION_ENVz exec-env/%sz %s)r/r0�platform�python_version�system�releaserr��os�environr�r1)rB�bases  rF�
user_agentzSession.user_agents���0�#�#�$�A�d�&=�&=�%>�?��-�-�/�0����� �!��8�#3�#3�#5�"6�
8�	
�
��L�4�#8�#8�#:�:�:�D�
�:�:�>�>�-�.�:��N�R�Z�Z�^�^�4G�%H�H�H�D�� � ��E�D�1�1�1�1�D��rHc�B�|jd�j|�S)z�
        Retrieve the data associated with `data_path`.

        :type data_path: str
        :param data_path: The path to the data you wish to retrieve.
        rk)rur�)rBrms  rF�get_datazSession.get_data8s ���!�!�-�0�:�:�9�E�ErHc�@�|j||�}t||��S)a�Get the service model object.

        :type service_name: string
        :param service_name: The service name

        :type api_version: string
        :param api_version: The API version of the service.  If none is
            provided, then the latest API version will be used.

        :rtype: L{botocore.model.ServiceModel}
        :return: The botocore service model for the service.

        )�service_name)�get_service_datar)rBr�api_version�service_descriptions    rF�get_service_modelzSession.get_service_modelAs%��#�3�3�L�+�N���/�l�K�KrHc�t�|jd�}|j|d|�}tj|�S)Nrkz	waiters-2)ru�load_service_modelr�WaiterModel)rBrrrx�
waiter_configs     rF�get_waiter_modelzSession.get_waiter_modelRs<���#�#�M�2���1�1��+�{�
�
��!�!�-�0�0rHc�t�|jd�}|j|d|�}tj|�S)Nrkzpaginators-1)rurr�PaginatorModel)rBrrrx�paginator_configs     rF�get_paginator_modelzSession.get_paginator_modelYs>���#�#�M�2��!�4�4��.�+�
���&�&�'7�8�8rHc��|}|jd�j|d|��}tj||�}|jjd|z|||��|S)zK
        Retrieve the fully merged data associated with a service.
        rk�	service-2)�	type_namerzservice-data-loaded.%s)�service_datarr�)rurr#r�r-�emit)rBrrrmr*�
service_ids      rFrzSession.get_service_data`su��!�	��)�)�-�8�K�K���+�L�
��#�&�&�|�\�B�
������$�z�1�%�%��		�	
��rHc�D�|jd�jd��S)z?
        Return a list of names of available services.
        rkr()r))ru�list_available_servicesrWs rF�get_available_serviceszSession.get_available_servicesqs+���!�!�-�0�H�H�!�I�
�	
rHc�D�|j|tj�y)zk
        Convenience function to quickly configure full debug output
        to go to the console.
        N)�set_stream_logger�logging�DEBUG)rB�logger_names  rF�set_debug_loggerzSession.set_debug_loggerys��
	
���{�G�M�M�:rHc�B�tj|�}|jtj�tj|�}|j|�|�|j
}tj|�}|j|�|j|�y)a�
        Convenience method to configure a stream logger.

        :type logger_name: str
        :param logger_name: The name of the logger to configure

        :type log_level: str
        :param log_level: The log level to set for the logger.  This
            is any param supported by the ``.setLevel()`` method of
            a ``Log`` object.

        :type stream: file
        :param stream: A file like object to log to.  If none is provided
            then sys.stderr will be used.

        :type format_string: str
        :param format_string: The format string to use for the log
            formatter.  If none is provided this will default to
            ``self.LOG_FORMAT``.

        N)	r2�	getLogger�setLevelr3�
StreamHandler�
LOG_FORMAT�	Formatter�setFormatter�
addHandler)rBr4�	log_level�stream�
format_string�log�ch�	formatters        rFr1zSession.set_stream_logger�s}��0����,�����W�]�]�#�
�
"�
"�6�
*��
���I��� � �O�O�M��%�%�m�4�	�	���	�"�	���r�rHc�:�tj|�}|jtj�tj|�}|j|�tj
|j�}|j|�|j|�y)aV
        Convenience function to quickly configure any level of logging
        to a file.

        :type log_level: int
        :param log_level: A log level as specified in the `logging` module

        :type path: string
        :param path: Path to the log file.  The file will be created
            if it doesn't already exist.
        N)	r2r7r8r3�FileHandlerr;r:r<r=)rBr>ryr4rArBrCs       rF�set_file_loggerzSession.set_file_logger�st������,�����W�]�]�#��
 �
 ��
&��
���I���%�%�d�o�o�6�	�	���	�"�	���r�rHc�B�|jj||||��y)a)Register a handler with an event.

        :type event_name: str
        :param event_name: The name of the event.

        :type handler: callable
        :param handler: The callback to invoke when the event
            is emitted.  This object must be callable, and must
            accept ``**kwargs``.  If either of these preconditions are
            not met, a ``ValueError`` will be raised.

        :type unique_id: str
        :param unique_id: An optional identifier to associate with the
            registration.  A unique_id can only be used once for
            the entire session registration (unless it is unregistered).
            This can be used to prevent an event handler from being
            registered twice.

        :param unique_id_uses_count: boolean
        :param unique_id_uses_count: Specifies if the event should maintain
            a count when a ``unique_id`` is registered and unregisted. The
            event can only be completely unregistered once every register call
            using the unique id has been matched by an ``unregister`` call.
            If ``unique_id`` is specified, subsequent ``register``
            calls must use the same value for  ``unique_id_uses_count``
            as the ``register`` call that first registered the event.

        :raises ValueError: If the call to ``register`` uses ``unique_id``
            but the value for ``unique_id_uses_count`` differs from the
            ``unique_id_uses_count`` value declared by the very first
            ``register`` call for that ``unique_id``.
        )�unique_id_uses_countN)r-r��rBr�r��	unique_idrHs     rFr�zSession.register�s(��F	
��������!5�		�	
rHc�B�|jj||||��y)aUnregister a handler with an event.

        :type event_name: str
        :param event_name: The name of the event.

        :type handler: callable
        :param handler: The callback to unregister.

        :type unique_id: str
        :param unique_id: A unique identifier identifying the callback
            to unregister.  You can provide either the handler or the
            unique_id, you do not have to provide both.

        :param unique_id_uses_count: boolean
        :param unique_id_uses_count: Specifies if the event should maintain
            a count when a ``unique_id`` is registered and unregisted. The
            event can only be completely unregistered once every ``register``
            call using the ``unique_id`` has been matched by an ``unregister``
            call. If the ``unique_id`` is specified, subsequent
            ``unregister`` calls must use the same value for
            ``unique_id_uses_count`` as the ``register`` call that first
            registered the event.

        :raises ValueError: If the call to ``unregister`` uses ``unique_id``
            but the value for ``unique_id_uses_count`` differs from the
            ``unique_id_uses_count`` value declared by the very first
            ``register`` call for that ``unique_id``.
        )r�rJrHN)r-�
unregisterrIs     rFrLzSession.unregister�s(��F	
��������!5�		 �	
rHc�<�|jj|fi|��SrJ)r-r+)rBr��kwargss   rFr+zSession.emits�� �t�|�|� � ��6�v�6�6rHc�R�|jj|fi|��}t|�SrJ)r-r+r)rBr�rN�	responsess    rF�emit_first_non_none_responsez$Session.emit_first_non_none_responses(��%�D�L�L�%�%�j�;�F�;�	�&�y�1�1rHc���	|jj|�S#t$r@|dvr:tjd|zt
�|jj|�cYS�wxYw)N)r|r�z�Fetching the %s component with the get_component() method is deprecated as the component has always been considered an internal interface of botocore)r;ru�
ValueError�warnings�warn�DeprecationWarningr<�rBr�s  rFruzSession.get_component sr��	��#�#�1�1�$�7�7���		��B�B��
�
�C�EI�J�'�	��0�0�>�>�t�D�D��		�s��AA&�$A&c�8�|jj|�SrJ)r<rurWs  rFr�zSession._get_internal_component.s���(�(�6�6�t�<�<rHc�:�|jj||�SrJ)r<rZ�rBr��	components   rF�_register_internal_componentz$Session._register_internal_component4s���(�(�;�;�D�)�L�LrHc�<�|jj||�yrJ)r;rZrZs   rFrZzSession.register_component:s�����+�+�D�)�<rHc�<�|jj||�yrJrprZs   rFr]zSession.lazy_register_component=s�����0�0��y�ArHc�X�|j�}|
�|�|j|
�}
n|�|}
|j||
�}|�|jd�}|�!|jd�j	|d�}|jd�}|jd�}
|jd�}|
�|
jturd}nf|�%|�#tjj|||	��}n?|j||�rtd|j||��	��|j�}|j�}|jd
�}|jd�}t!j |jd��}|jd
�}|j#|j$|j&|j(��|j+|
|�}|dk7r$|jd�}|j-|||�|j/||��tj0j3|||j5�|
t6t8||||��
}|j;|||||||j=�|
||��
}|jd�}|�%|j?|j@jB�|S)aP
Create a botocore client.

        :type service_name: string
        :param service_name: The name of the service for which a client will
            be created.  You can use the ``Session.get_available_services()``
            method to get a list of all available service names.

        :type region_name: string
        :param region_name: The name of the region associated with the client.
            A client is associated with a single region.

        :type api_version: string
        :param api_version: The API version to use.  By default, botocore will
            use the latest API version when creating a client.  You only need
            to specify this parameter if you want to use a previous API version
            of the client.

        :type use_ssl: boolean
        :param use_ssl: Whether or not to use SSL.  By default, SSL is used.
            Note that not all services support non-ssl connections.

        :type verify: boolean/string
        :param verify: Whether or not to verify SSL certificates.
            By default SSL certificates are verified.  You can provide the
            following values:

            * False - do not validate SSL certificates.  SSL will still be
              used (unless use_ssl is False), but SSL certificates
              will not be verified.
            * path/to/cert/bundle.pem - A filename of the CA cert bundle to
              uses.  You can specify this argument if you want to use a
              different CA cert bundle than the one used by botocore.

        :type endpoint_url: string
        :param endpoint_url: The complete URL to use for the constructed
            client.  Normally, botocore will automatically construct the
            appropriate URL to use when communicating with a service.  You can
            specify a complete URL (including the "http/https" scheme) to
            override this behavior.  If this value is provided, then
            ``use_ssl`` is ignored.

        :type aws_access_key_id: string
        :param aws_access_key_id: The access key to use when creating
            the client.  This is entirely optional, and if not provided,
            the credentials configured for the session will automatically
            be used.  You only need to provide this argument if you want
            to override the credentials used for this specific client.

        :type aws_secret_access_key: string
        :param aws_secret_access_key: The secret key to use when creating
            the client.  Same semantics as aws_access_key_id above.

        :type aws_session_token: string
        :param aws_session_token: The session token to use when creating
            the client.  Same semantics as aws_access_key_id above.

        :type config: botocore.client.Config
        :param config: Advanced client configuration options. If a value
            is specified in the client config, its value will take precedence
            over environment variables and configuration values, but not over
            a value passed explicitly to the method. If a default config
            object is set on the session, the config object used when creating
            the client will be the result of calling ``merge()`` on the
            default config with the config provided to this call.

        :rtype: botocore.client.BaseClient
        :return: A botocore client instance

        N�	ca_bundle�api_versionsrkrYr�)r�rr�explicit)r�cred_varr|r�r�r�)�session_user_agent_name�session_user_agent_version�session_user_agent_extra�legacyr�)�client_namer�)r�)
rrg�	is_secure�endpoint_url�verifyrh�
scoped_configr�r�
auth_tokenr�)"r��merge�_resolve_region_namernr�ru�signature_versionrr`rhr��_missing_cred_varsrrr	r�r��set_session_configr/r0r1�_resolve_defaults_mode�merge_smart_defaults�!_add_configured_endpoint_provider�client�
ClientCreatorrr	r
�
create_clientr�r��metar�)rBrrgr�use_sslrkrj�aws_access_key_id�aws_secret_access_key�aws_session_tokenr��default_client_configrxrYr�rhrmr|r�r�r��
defaults_moder��client_creatorrvr�s                          rFrxzSession.create_client@s���d!%� >� >� @����"7�"C�*�0�0��8�F�#�
.�*�F��/�/��V�D���>��-�-�k�:�F����2�2�>�B�F�F��d��K��#�#�M�2���*�*�?�;�
�"&�"4�"4�5N�"O����&�":�":�h�"F��K��)�.C�.O�"�.�.�:�:�,�0�'�;��K�
�
$�
$�%6�8M�
N�)�#��0�0�%�'<���
��.�.�0�K��(�(�*�
� �8�8�9L�M��!�9�9�:N�O���y�y��!3�!3�N�!C�D��!�/�/�0D�E��	�-�-�$(�$8�$8�'+�'>�'>�%)�%:�%:�	.�	
�
�3�3�F�L�I�
��H�$�%)�%A�%A�(�&�"�
#�7�7��m�[�
�	
�.�.�$�%�	/�	
�
"���6�6����O�O�����#���1�7�
�� �-�-�%�#��%��#��0�0�2� �#�!�.�
���.�.�y�9�������V�[�[�/�/�0��
rHc��|�,|r|j�
|j}n|jd�}t|�||_|S)N�region)rgrnr%r9)rBrgr�s   rFrozSession._resolve_region_name�sK�����&�,�,�8�$�0�0��"�6�6�x�@���[�)�)4��%��rHc��|jd�}|r|jr|j}|jd�}|j�}|j	�}||vrt|dj
|����|S)Nrr�z, )�mode�valid_modes)rnrr��get_default_modes�lowerr�join)rBr�r�r�r��
default_modes�lmodes       rFrszSession._resolve_defaults_modes����/�/��@���]�8�8� �.�.�D�"&�">�">�%�#
��0�A�A�C�
��
�
����
�%�%��t�y�y��'?��
��rHc�v�t|j|j�|��}|jd|��y)N)r�rlrhrj)r�r)rr�r��set_config_provider)rBrhr��chains    rFruz)Session._add_configured_endpoint_providers?��*��(�(��0�0�2�#�
��
	�(�(�'��	)�	
rHc��|�|�y|�|�yy)Nr|r{r�)rBr�rs   rFrqzSession._missing_cred_vars)s!���!�j�&8�*��!�j�&8�&�rHc�D�|jd�}|j�S)z�Lists the available partitions found on disk

        :rtype: list
        :return: Returns a list of partition names (e.g., ["aws", "aws-cn"])
        r|)r��get_available_partitions)rB�resolvers  rFr�z Session.get_available_partitions0s$���/�/�0C�D���0�0�2�2rHc�F�|jd�}|j|�S)aLists the partition name of a particular region.

        :type region_name: string
        :param region_name: Name of the region to list partition for (e.g.,
             us-east-1).

        :rtype: string
        :return: Returns the respective partition name (e.g., aws).
        r|)r��get_partition_for_region)rBrgr�s   rFr�z Session.get_partition_for_region9s&���/�/�0C�D���0�0��=�=rHc��|jd�}g}	|j|�}|djd|�}|j|||�}|S#t$rY|SwxYw)a]Lists the region and endpoint names of a particular partition.

        :type service_name: string
        :param service_name: Name of a service to list endpoint for (e.g., s3).
            This parameter accepts a service name (e.g., "elb") or endpoint
            prefix (e.g., "elasticloadbalancing").

        :type partition_name: string
        :param partition_name: Name of the partition to limit endpoints to.
            (e.g., aws for the public AWS endpoints, aws-cn for AWS China
            endpoints, aws-us-gov for AWS GovCloud (US) Endpoints, etc.

        :type allow_non_regional: bool
        :param allow_non_regional: Set to True to include endpoints that are
             not regional endpoints (e.g., s3-external-1,
             fips-us-gov-west-1, etc).
        :return: Returns a list of endpoint names (e.g., ["us-east-1"]).
        r|�metadata�endpointPrefix)r�rr��get_available_endpointsr)rBr�partition_name�allow_non_regionalr��resultsr*�endpoint_prefixs        rF�get_available_regionszSession.get_available_regionsFs���*�/�/�0C�D����		��0�0��>�L�*�:�6�:�:� �,��O��6�6���1C��G�
���#�	����	�s�9A�	A�A)NNTNrJ)r`)NN)NF)NNF)	NNTNNNNNN)�awsF)E�__name__�
__module__�__qualname__�__doc__r�rr?r:rGr=rOrLr^rKrerMrNrTrUrPrQr.rRrSrVr�r��propertyr�r�r+rnr�r�r�r�r�r�r�rrr	rrrr"r&rr/r5r1rFr�rLr+rQrur�r\rZr]rxrorsrurqr�r�r�r�rHrFr'r'Qs����"��	�	�"C�D��H�J���!%��>"�@,�K�
�
;�
�

�

�	
�
�
�
�

�

D�
�
�
G��&<��6��6�!�����
��8:�>6�#-�J�!��!�F#�,�
�*
!� �#�JF�L�"1�9��"
�;�BF�'�R�:IN�(
�Z��"�(
�T7�2��=�M�=�B�������"���t�l�,�$	
��3�>�FK�!rHr'c�(�eZdZdZd�Zd�Zd�Zd�Zy)r:z'Service locator for session components.c� �i|_i|_yrJ)r;�	_deferredrWs rFrGzComponentLocator.__init__ms�������rHc���||jvr1|j|}|�|j|<	|j|=	|j|S#t$rY�wxYw#t$rtd|z��wxYw)NzUnknown component: %s)r�r;�KeyErrorrS)rBr��factorys   rFruzComponentLocator.get_componentqs����4�>�>�!��n�n�T�*�G�%,�Y�D���T�"�
��N�N�4�(�	=��#�#�D�)�)���
��

���	=��4�t�;�<�<�	=�s�
A�A�	A�A�A7c�\�||j|<	|j|=y#t$rYywxYwrJ)r;r�r�rZs   rFrZz#ComponentLocator.register_component�s5��!*������	����t�$���	��	���
�	+�+c�\�||j|<	|j|=y#t$rYywxYwrJ)r�r;r�)rBr��no_arg_factorys   rFr]z(ComponentLocator.lazy_register_component�s5��-����t��	�� � ��&���	��	�r�N)r�r�r�r�rGrurZr]r�rHrFr:r:js��1��=�*�rHr:c�6�eZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	y)	r>c�F�||_tj|�|_yrJ)�_sessionr��_store)rBr�rCs   rFrGzSessionVarDict.__init__�s����
��i�i��-��rHc� �|j|SrJ�r��rB�keys  rF�__getitem__zSessionVarDict.__getitem__�s���{�{�3��rHc�F�||j|<|j||�yrJ)r��&_update_config_store_from_session_vars)rBr�r�s   rF�__setitem__zSessionVarDict.__setitem__�s �� ����C���3�3�C��?rHc��|j|=yrJr�r�s  rF�__delitem__zSessionVarDict.__delitem__�s���K�K��rHc�,�t|j�SrJ)�iterr�rWs rF�__iter__zSessionVarDict.__iter__�s���D�K�K� � rHc�,�t|j�SrJ)r�r�rWs rF�__len__zSessionVarDict.__len__�s���4�;�;��rHc
��t|j��}|\}}}}|jjd�}|j||j	|||||���y)Nr�r��r�r��config_property_namesr�r�)rr�rur�r�)	rBr�r��config_chain_builderr�r�r�r�r�s	         rFr�z5SessionVarDict._update_config_store_from_session_vars�sh�� 2�$�-�-�H��3A�0��X�w���}�}�2�2�>�B���(�(�� �4�4�*�&�&1�� (�
5�
�		
rHN)
r�r�r�rGr�r�r�r�r�r�r�rHrFr>r>�s&��.� �@��!� �
rHr>c�*�eZdZdZdd�Z					dd�Zy)r�a`A class for creating backwards compatible configuration chains.

    This class can be used instead of
    :class:`botocore.configprovider.ConfigChainFactory` to make it honor the
    methods argument to get_config_variable. This class can be used to filter
    out providers that are not in the methods tuple when creating a new config
    chain.
    Nc�4�t||�|_||_yrJ)r�_factory�_supported_methods)rBr�r�rs    rFrGz!SubsetChainConfigFactory.__init__�s��*�7�G�<��
�")��rHc��d|jvrd}d|jvrd}d|jvrd}|jj|||||��S)a�Build a config chain following the standard botocore pattern.

        This config chain factory will omit any providers not in the methods
        tuple provided at initialization. For example if given the tuple
        ('instance', 'config',) it will not inject the environment provider
        into the standard config chain. This lets the botocore session support
        the custom ``methods`` argument for all the default botocore config
        variables when calling ``get_config_variable``.
        r�Nr�r�r�)r�r�r�)rBr�r�r�r�r�s      rFr�z,SubsetChainConfigFactory.create_config_chain�si��"�T�4�4�4� �M���/�/�/� �M��4�2�2�2�#'� ��}�}�0�0�'�'�"6��+�1�
�	
rHrJ)NNNNN)r�r�r�r�rGr�r�rHrFr�r��s"���*���!���

rHr�c��t|�S)z&
    Return a new session object.
    )r')r�s rF�get_sessionr��s���8��rHrJ)Br�r�r2rrr�rT�botocore.clientr`�botocore.configloader�botocore.credentials�botocore.tokensrrrrrrr	r
r�botocore.compatrr
�botocore.configproviderrrrrrrr�botocore.errorfactoryr�botocore.exceptionsrrrrr�botocore.hooksrrr�botocore.loadersr�botocore.modelr�botocore.parsersr �botocore.regionsr!�botocore.useragentr"�botocore.utilsr#r$r%r7r�r�r'r:r>r�r�r�rHrF�<module>r�s����
��	��
������
�
�
�4����:�����
+�'�2�-�.���$�
��	�	�8�	$��V�V�r (�(�V+
�^�+
�\+
�+
�\rH
¿Qué es la limpieza dental de perros? - Clínica veterinaria


Es la eliminación del sarro y la placa adherida a la superficie de los dientes mediante un equipo de ultrasonidos que garantiza la integridad de las piezas dentales a la vez que elimina en profundidad cualquier resto de suciedad.

A continuación se procede al pulido de los dientes mediante una fresa especial que elimina la placa bacteriana y devuelve a los dientes el aspecto sano que deben tener.

Una vez terminado todo el proceso, se mantiene al perro en observación hasta que se despierta de la anestesia, bajo la atenta supervisión de un veterinario.

¿Cada cuánto tiempo tengo que hacerle una limpieza dental a mi perro?

A partir de cierta edad, los perros pueden necesitar una limpieza dental anual o bianual. Depende de cada caso. En líneas generales, puede decirse que los perros de razas pequeñas suelen acumular más sarro y suelen necesitar una atención mayor en cuanto a higiene dental.


Riesgos de una mala higiene


Los riesgos más evidentes de una mala higiene dental en los perros son los siguientes:

  • Cuando la acumulación de sarro no se trata, se puede producir una inflamación y retracción de las encías que puede descalzar el diente y provocar caídas.
  • Mal aliento (halitosis).
  • Sarro perros
  • Puede ir a más
  • Las bacterias de la placa pueden trasladarse a través del torrente circulatorio a órganos vitales como el corazón ocasionando problemas de endocarditis en las válvulas. Las bacterias pueden incluso acantonarse en huesos (La osteomielitis es la infección ósea, tanto cortical como medular) provocando mucho dolor y una artritis séptica).

¿Cómo se forma el sarro?

El sarro es la calcificación de la placa dental. Los restos de alimentos, junto con las bacterias presentes en la boca, van a formar la placa bacteriana o placa dental. Si la placa no se retira, al mezclarse con la saliva y los minerales presentes en ella, reaccionará formando una costra. La placa se calcifica y se forma el sarro.

El sarro, cuando se forma, es de color blanquecino pero a medida que pasa el tiempo se va poniendo amarillo y luego marrón.

Síntomas de una pobre higiene dental
La señal más obvia de una mala salud dental canina es el mal aliento.

Sin embargo, a veces no es tan fácil de detectar
Y hay perros que no se dejan abrir la boca por su dueño. Por ejemplo…

Recientemente nos trajeron a la clínica a un perro que parpadeaba de un ojo y decía su dueño que le picaba un lado de la cara. Tenía molestias y dificultad para comer, lo que había llevado a sus dueños a comprarle comida blanda (que suele ser un poco más cara y llevar más contenido en grasa) durante medio año. Después de una exploración oftalmológica, nos dimos cuenta de que el ojo tenía una úlcera en la córnea probablemente de rascarse . Además, el canto lateral del ojo estaba inflamado. Tenía lo que en humanos llamamos flemón pero como era un perro de pelo largo, no se le notaba a simple vista. Al abrirle la boca nos llamó la atención el ver una muela llena de sarro. Le realizamos una radiografía y encontramos una fístula que llegaba hasta la parte inferior del ojo.

Le tuvimos que extraer la muela. Tras esto, el ojo se curó completamente con unos colirios y una lentilla protectora de úlcera. Afortunadamente, la úlcera no profundizó y no perforó el ojo. Ahora el perro come perfectamente a pesar de haber perdido una muela.

¿Cómo mantener la higiene dental de tu perro?
Hay varias maneras de prevenir problemas derivados de la salud dental de tu perro.

Limpiezas de dientes en casa
Es recomendable limpiar los dientes de tu perro semanal o diariamente si se puede. Existe una gran variedad de productos que se pueden utilizar:

Pastas de dientes.
Cepillos de dientes o dedales para el dedo índice, que hacen más fácil la limpieza.
Colutorios para echar en agua de bebida o directamente sobre el diente en líquido o en spray.

En la Clínica Tus Veterinarios enseñamos a nuestros clientes a tomar el hábito de limpiar los dientes de sus perros desde que son cachorros. Esto responde a nuestro compromiso con la prevención de enfermedades caninas.

Hoy en día tenemos muchos clientes que limpian los dientes todos los días a su mascota, y como resultado, se ahorran el dinero de hacer limpiezas dentales profesionales y consiguen una mejor salud de su perro.


Limpiezas dentales profesionales de perros y gatos

Recomendamos hacer una limpieza dental especializada anualmente. La realizamos con un aparato de ultrasonidos que utiliza agua para quitar el sarro. Después, procedemos a pulir los dientes con un cepillo de alta velocidad y una pasta especial. Hacemos esto para proteger el esmalte.

La frecuencia de limpiezas dentales necesaria varía mucho entre razas. En general, las razas grandes tienen buena calidad de esmalte, por lo que no necesitan hacerlo tan a menudo e incluso pueden pasarse la vida sin requerir una limpieza. Sin embargo, razas pequeñas como el Yorkshire o el Maltés, deben hacérselas todos los años desde cachorros si se quiere conservar sus piezas dentales.

Otro factor fundamental es la calidad del pienso. Algunas marcas han diseñado croquetas que limpian la superficie del diente y de la muela al masticarse.

Ultrasonido para perros

¿Se necesita anestesia para las limpiezas dentales de perros y gatos?

La limpieza dental en perros no es una técnica que pueda practicarse sin anestesia general , aunque hay veces que los propietarios no quieren anestesiar y si tiene poco sarro y el perro es muy bueno se puede intentar…… , pero no se va a poder pulir ni acceder a todas la zona de la boca …. Además los limpiadores dentales van a irrigar agua y hay riesgo de aspiración a vías respiratorias si no se realiza una anestesia correcta con intubación traqueal . En resumen , sin anestesia no se va hacer una correcta limpieza dental.

Tampoco sirve la sedación ya que necesitamos que el animal esté totalmente quieto, y el veterinario tenga un acceso completo a todas sus piezas dentales y encías.

Alimentos para la limpieza dental

Hay que tener cierto cuidado a la hora de comprar determinados alimentos porque no todos son saludables. Algunos tienen demasiado contenido graso, que en exceso puede causar problemas cardiovasculares y obesidad.

Los mejores alimentos para los dientes son aquellos que están elaborados por empresas farmacéuticas y llevan componentes químicos con tratamientos específicos para el diente del perro. Esto implica no solo limpieza a través de la acción mecánica de morder sino también un tratamiento antibacteriano para prevenir el sarro.

Conclusión

Si eres como la mayoría de dueños, por falta de tiempo , es probable que no estés prestando la suficiente atención a la limpieza dental de tu perro. Por eso te animamos a que comiences a limpiar los dientes de tu perro y consideres atender a su higiene bucal con frecuencia.

Estas simples medidas pueden conllevar a que tu perro tenga una vida más larga y mucho más saludable.

Si te resulta imposible introducir un cepillo de dientes a tu perro en la boca, pásate con él por clínica Tus Veterinarios y te explicamos cómo hacerlo.

Necesitas hacer una limpieza dental profesional a tu mascota?
Llámanos al 622575274 o contacta con nosotros

Deja un comentario

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *

¡Hola!