
    vKgP                     x    S SK r S SKrS SKrS SKJr  S SKJrJr  S SK	r	S SK
r	S SKJrJr  SSKJr   " S S5      rg)	    N)Config)DataNotFoundErrorUnknownServiceError)ResourceNotExistsErrorUnknownAPIVersionError   )ResourceFactoryc                       \ rS rSrSr      SS jrS r\S 5       r\S 5       r	\S 5       r
\S	 5       rS
 rS rS rS r SS jrS rS r         SS jr         SS jrS rSrg)Session   a  
A session stores configuration state and allows you to create service
clients and resources.

:type aws_access_key_id: string
:param aws_access_key_id: AWS access key ID
:type aws_secret_access_key: string
:param aws_secret_access_key: AWS secret access key
:type aws_session_token: string
:param aws_session_token: AWS temporary session token
:type region_name: string
:param region_name: Default region when creating new connections
:type botocore_session: botocore.session.Session
:param botocore_session: Use this Botocore session instead of creating
                         a new default one.
:type profile_name: string
:param profile_name: The name of a profile to use. If not given, then
                     the default profile is used.
Nc                 0   Ub  XPl         O#[        R                  R                  5       U l         U R                   R                  S:X  a  SU R                   R
                   3nU R                   R                  (       a#  U R                   =R                  SU-   -  sl        OXpR                   l        SU R                   l        [        R                  U R                   l        Ub  U R                   R                  SU5        U(       d  U(       d  U(       a  U R                   R                  XU5        Ub  U R                   R                  SU5        [        U R                   R                  S5      5      U l        U R                  5         U R                  5         g )NBotocorez	Botocore/ Boto3profileregionevent_emitter)_sessionbotocoresessionget_sessionuser_agent_nameuser_agent_versionuser_agent_extraboto3__version__set_config_variableset_credentialsr	   get_componentresource_factory_setup_loader_register_default_handlers)selfaws_access_key_idaws_secret_access_keyaws_session_tokenregion_namebotocore_sessionprofile_namebotocore_infos           M/var/www/highfloat_scraper/venv/lib/python3.13/site-packages/boto3/session.py__init__Session.__init__1   s1    ',M %,,88:DM ==((J6'(H(H'IJM}}--..#2EE.1>.,3DMM)/4/@/@DMM,#MM--iF 59JMM))!:K "MM--hD /MM''8!
 	'')    c                     SR                  U R                  R                  [        U R                  R                  S5      5      5      $ )Nz{}(region_name={})r   )format	__class____name__reprr   get_config_variabler#   s    r+   __repr__Session.__repr__[   s9    #**NN##228<=
 	
r.   c                 @    U R                   R                  =(       d    S$ )z!
The **read-only** profile name.
default)r   r   r5   s    r+   r)   Session.profile_namea   s    
 }}$$1	1r.   c                 8    U R                   R                  S5      $ )z 
The **read-only** region name.
r   )r   r4   r5   s    r+   r'   Session.region_nameh   s    
 }}00::r.   c                 8    U R                   R                  S5      $ )z!
The event emitter for a session
r   )r   r   r5   s    r+   eventsSession.eventso   s    
 }}**?;;r.   c                 .    U R                   R                  $ )z3
The profiles available to the session credentials
)r   available_profilesr5   s    r+   rA   Session.available_profilesv   s    
 }}///r.   c                    U R                   R                  S5      U l        U R                  R                  R	                  [
        R                  R                  [
        R                  R                  [        5      S5      5        g)z3
Setup loader paths so that we can load resources.
data_loaderdataN)
r   r   _loadersearch_pathsappendospathjoindirname__file__r5   s    r+   r!   Session._setup_loader}   sQ     }}22=A!!((GGLL2F;	
r.   c                 6    U R                   R                  5       $ )z
Get a list of available services that can be loaded as low-level
clients via :py:meth:`Session.client`.

:rtype: list
:return: List of service names
)r   get_available_servicesr5   s    r+   rP   Session.get_available_services   s     }}3355r.   c                 4    U R                   R                  SS9$ )z
Get a list of available services that can be loaded as resource
clients via :py:meth:`Session.resource`.

:rtype: list
:return: List of service names
resources-1)	type_name)rF   list_available_servicesr5   s    r+   get_available_resourcesSession.get_available_resources   s     ||33m3LLr.   c                 6    U R                   R                  5       $ )zrLists the available partitions

:rtype: list
:return: Returns a list of partition names (e.g., ["aws", "aws-cn"])
)r   get_available_partitionsr5   s    r+   rY    Session.get_available_partitions   s     }}5577r.   c                 8    U R                   R                  UUUS9$ )aX  Lists the region and endpoint names of a particular partition.

The list of regions returned by this method are regions that are
explicitly known by the client to exist and is not comprehensive. A
region not returned in this list may still be available for the
provided service.

:type service_name: string
:param service_name: Name of a service to list endpoint for (e.g., s3).

: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"]).
)service_namepartition_nameallow_non_regional)r   get_available_regions)r#   r\   r]   r^   s       r+   r_   Session.get_available_regions   s)    2 }}22%)1 3 
 	
r.   c                 6    U R                   R                  5       $ )z
Return the :class:`botocore.credentials.Credentials` 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.
)r   get_credentialsr5   s    r+   rb   Session.get_credentials   s     }},,..r.   c                 8    U R                   R                  U5      $ )zLists 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   get_partition_for_region)r#   r'   s     r+   re    Session.get_partition_for_region   s     }}55kBBr.   c                 F    U R                   R                  UUUUUUUUU	U
S9
$ )a)  
Create a low-level service client by name.

:type service_name: string
:param service_name: The name of a service, e.g. 's3' or 'ec2'. You
    can get a list of available services via
    :py:meth:`get_available_services`.

: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 region_name
    is specified in the client config, its value will take precedence
    over environment variables and configuration values, but not over
    a region_name value passed explicitly to the method. See
    `botocore config documentation
    <https://botocore.amazonaws.com/v1/documentation/api/latest/reference/config.html>`_
    for more details.

:return: Service client instance

	r'   api_versionuse_sslverifyendpoint_urlr$   r%   r&   config)r   create_client)r#   r\   r'   ri   rj   rk   rl   r$   r%   r&   rm   s              r+   clientSession.client   s?    d }}**##%/"7/ + 
 	
r.   c                     U R                   R                  USU5      nUc  U R                   R                  US5      nU
b+  U
R                  c  [        R                  " U
5      n
SU
l        O	[        SS9n
U R                  UUUUUUUUU	U
S9
nUR                   R"                  n[$        R&                  R)                  UUUS   [$        R&                  R+                  U R,                  X5      S9nU R.                  R1                  UUS   US	9nU" US
9$ ! [         a/    U R                  5       nXR	                  5       ;   n[        XU5      e[         a8    U R                   R                  US5      n[        XSR                  U5      5      ef = f)a  
Create a resource service client by name.

:type service_name: string
:param service_name: The name of a service, e.g. 's3' or 'ec2'. You
    can get a list of available services via
    :py:meth:`get_available_resources`.

: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 region_name
    is specified in the client config, its value will take precedence
    over environment variables and configuration values, but not over
    a region_name value passed explicitly to the method.  If
    user_agent_extra is specified in the client config, it overrides
    the default user_agent_extra provided by the resource API. See
    `botocore config documentation
    <https://botocore.amazonaws.com/v1/documentation/api/latest/reference/config.html>`_
    for more details.

:return: Subclass of :py:class:`~boto3.resources.base.ServiceResource`
rS   z, Resource)r   rh   	resources)r\   service_modelresource_json_definitionsservice_waiter_modelservice)resource_namesingle_resource_json_definitionservice_context)ro   )rF   load_service_modelr   rV   rP   r   r   list_api_versionsr   rK   determine_latest_versionr   copydeepcopyr   ro   metart   r   utilsServiceContextLazyLoadedWaiterModelr   r    load_from_definition)r#   r\   r'   ri   rj   rk   rl   r$   r%   r&   rm   resource_model	availablehas_low_level_clientavailable_api_versionsro   rt   rz   clss                      r+   resourceSession.resource6  s   f	!\\<<m[N(   ,,??mK &&.v.*4'Z8F##%/"7/  
 11  ++44%'&4[&A!&!B!B|"	 5 
 ##88&,:9,E+ 9 
 &!!_ # 	446I ; ; == ! ))=  ! 	%)\\%C%Cm&" )4995K+L 	s   D A9Fc                    U R                   R                  S[        R                  R	                  S5      5        U R                   R                  S[        R                  R	                  S5      5        U R                   R                  S[        R                  R	                  S5      5        U R                   R                  S[        R                  R	                  S5      5        U R                   R                  S	[        R                  R	                  S
5      SS9  U R                   R                  S[        R                  R	                  S5      SS9  U R                   R                  S[        R                  R	                  S5      5        U R                   R                  S[        R                  R	                  SU R
                  S95        g )Nzcreating-client-class.s3z*boto3.s3.inject.inject_s3_transfer_methodsz!creating-resource-class.s3.Bucketz%boto3.s3.inject.inject_bucket_methodsz!creating-resource-class.s3.Objectz%boto3.s3.inject.inject_object_methodsz(creating-resource-class.s3.ObjectSummaryz-boto3.s3.inject.inject_object_summary_methodsz creating-resource-class.dynamodbz6boto3.dynamodb.transform.register_high_level_interfacezhigh-level-dynamodb)	unique_idz&creating-resource-class.dynamodb.Tablez+boto3.dynamodb.table.register_table_methodszhigh-level-dynamodb-tablez+creating-resource-class.ec2.ServiceResourcez'boto3.ec2.createtags.inject_create_tagsz$creating-resource-class.ec2.Instancez'boto3.ec2.deletetags.inject_delete_tags)r   )r   registerr   r   	lazy_callr>   r5   s    r+   r"   "Session._register_default_handlers  sz   &KK!!<	
 	/KK!!"IJ	
 	/KK!!"IJ	
 	6KK!!?	
 	.KK!!H , 	 	
 	4KK!!= 2 	 	
 	9KK!!"KL	

 	2KK!!9"kk " 	
r.   )rF   r   r    )NNNNNN)awsF)	NNTNNNNNN)r2   
__module____qualname____firstlineno____doc__r,   r6   propertyr)   r'   r>   rA   r!   rP   rV   rY   r_   rb   re   ro   r   r"   __static_attributes__ r.   r+   r   r      s    , "(*T
 2 2 ; ; < < 0 0
6M8 FK
>/
C "]
D "f"P3
r.   r   )r~   rI   botocore.sessionr   botocore.clientr   botocore.exceptionsr   r   r   boto3.utilsboto3.exceptionsr   r   resources.factoryr	   r   r   r.   r+   <module>r      s.     	  " F   K .u
 u
r.   