Server : LiteSpeed
System : Linux server51.dnsbootclub.com 4.18.0-553.62.1.lve.el8.x86_64 #1 SMP Mon Jul 21 17:50:35 UTC 2025 x86_64
User : nandedex ( 1060)
PHP Version : 8.1.33
Disable Function : NONE
Directory :  /opt/cppython/lib/python3.8/site-packages/boto3/docs/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]


Current File : //opt/cppython/lib/python3.8/site-packages/boto3/docs/__pycache__/service.cpython-38.pyc
U

Q��g`!�@spddlZddlmZddlmZddlmZddlZddl	m
Z
ddlmZm
Z
ddlmZGdd	�d	e�ZdS)
�N)�DocumentStructure)�ServiceDocumenter)�DataNotFoundError)�Boto3ClientDocumenter)�ResourceDocumenter�ServiceResourceDocumenter)�ServiceContextcsleZdZej�ej�ej�d�Z	�fdd�Z
dd�Zdd�Zdd	�Z
d
d�Zdd
�Zdd�Zdd�Z�ZS)r�examplescspt�j||j|d�||_|j�|�|_d|_|j|j��krL|j�	|�|_dddddddg|_
||_d	|_dS)
N)�service_name�session�root_docs_path�title�client�
paginators�waiters�	resourcesr	�context-paramszLhttps://boto3.amazonaws.com/v1/documentation/api/latest/guide/resources.html)
�super�__init__�_session�_boto3_sessionr�_client�_service_resource�
_service_nameZget_available_resources�resource�sections�_root_docs_path�_USER_GUIDE_LINK)�selfr
rr��	__class__��?/opt/cppython/lib/python3.8/site-packages/boto3/docs/service.pyrs*��	�zServiceDocumenter.__init__cCs�t|j|jdd�}|�|�d��|�|�d��|�|�d��|�|�d��|jrh|�	|�d��|�
|�d��|�d	�}|�|�|��S)
ziDocuments an entire service.

        :returns: The reStructured text of the documented service.
        �html)Z
section_names�targetr
rrrrr	r)
rrrr
Zget_section�
client_apiZ
paginator_apiZ
waiter_apir�resource_section�_document_examplesZclient_context_paramsZflush_structure)rZ
doc_structureZcontext_params_sectionr!r!r"�document_service9s�

z"ServiceDocumenter.document_servicecCsDd}z|�|j�}Wntk
r(YnXt|j|j|��|�dS)N)Zget_examplesrrrrrZdocument_client)r�sectionr	r!r!r"r%Ms��zServiceDocumenter.client_apicCs�|j�d�|j��|�d�|jjd|jd�|�d�|j��|j��|�d�|j��|j��|�|�|�|�dS)NZ	Resourcesz�Resources are available in boto3 via the ``resource`` method. For more detailed instructions and examples on the usage of resources, see the resources z
user guide)r
�link�.zThe available resources are:)	�style�h2�new_line�writeZ
external_linkrZtoctree�_document_service_resource�_document_resources)rr)r!r!r"r&Xs"
��






z"ServiceDocumenter.resource_sectioncCs�tddd�}|�d�}|j�|jjjd|j���|�d�t	|j
|j|j��
|�|j
jjj}||jkrnd}tj�|j|j�|����}|�|d�|j�|j�d|�d	��dS)
Nzservice-resourcer#�r$�
breadcrumb�../../z / Resource / ServiceResource�index�/�/index)r�add_new_sectionr,�refrr �__name__rr/rrrr�document_resource�meta�resource_model�name�os�path�join�lower�
write_to_file�tocitem)rr)Zservice_resource_doc�breadcrumb_section�
resource_name�service_resource_dir_pathr!r!r"r0ns6�

�
��
�z,ServiceDocumenter._document_service_resourcec
CsZd}|j�d�}|�|jd�}|jjjjj}|dD�]}|d|}|jj	j
||t|j|d|dd�d�}|jjj
}	g}
|	D]}|
�|�q~||
d|ji�}|jjj��}t|dd	�}
|
�d
�}|j�|jjjd|j���|�d|jjj���t||j|j��|
�|jjj��tj�|j|j�|��}|
�|d
�|j� |j�d|�d��q4dS)NZfooZdata_loaderzresources-1r)r
Zresource_json_definitions�
service_modelZservice_waiter_model)rFZsingle_resource_json_definitionZservice_contextrr#r2r3r4z / Resource / r5r6r7)!rZ
get_componentZload_service_modelrrr<rrHrZresource_factoryZload_from_definitionrr=�identifiers�appendrr>rBrr8r,r9r r:r/rrr;r?r@rArCrD)rr)Ztemp_identifier_value�loaderZjson_resource_modelrHrFr=Zresource_clsrI�args�_rZresource_docrErGr!r!r"r1�sj�����


������z%ServiceDocumenter._document_resourcescCstj�tj�|j|jd��S)Nz.rst)r?r@�realpathrA�EXAMPLE_PATHr)rr!r!r"�_get_example_file�s�z#ServiceDocumenter._get_example_filec	CsP|��}tj�|�rL|j�d�|j��t|��}|�|�	��W5QRXdS)NZExamples)
rPr?r@�isfiler,r-r.�openr/�read)rr)Z
examples_file�fr!r!r"r'�s

z$ServiceDocumenter._document_examples)r:�
__module__�__qualname__r?r@rA�dirname�boto3�__file__rOrr(r%r&r0r1rPr'�
__classcell__r!r!rr"rs7r)r?Zbotocore.docs.bcdoc.restdocrZbotocore.docs.servicerZBaseServiceDocumenterZbotocore.exceptionsrrXZboto3.docs.clientrZboto3.docs.resourcerrZboto3.utilsrr!r!r!r"�<module>
s

F1le Man4ger