MCPcopy Create free account
hub / github.com/aws/aws-cli / document_paginators

Method document_paginators

awscli/botocore/docs/paginator.py:35–67  ·  view source on GitHub ↗

Documents the various paginators for a service param section: The section to write to.

(self, section)

Source from the content-addressed store, hash-verified

33 )
34
35 def document_paginators(self, section):
36 """Documents the various paginators for a service
37
38 param section: The section to write to.
39 """
40 section.style.h2('Paginators')
41 self._add_overview(section)
42 section.style.new_line()
43 section.writeln('The available paginators are:')
44 section.style.toctree()
45
46 paginator_names = sorted(
47 self._service_paginator_model._paginator_config
48 )
49
50 # List the available paginators and then document each paginator.
51 for paginator_name in paginator_names:
52 section.style.tocitem(
53 f'{self._service_name}/paginator/{paginator_name}'
54 )
55 # Create a new DocumentStructure for each paginator and add contents.
56 paginator_doc_structure = DocumentStructure(
57 paginator_name, target='html'
58 )
59 self._add_paginator(paginator_doc_structure, paginator_name)
60 # Write paginators in individual/nested files.
61 # Path: <root>/reference/services/<service>/paginator/<paginator_name>.rst
62 paginator_dir_path = os.path.join(
63 self._root_docs_path, self._service_name, 'paginator'
64 )
65 paginator_doc_structure.write_to_file(
66 paginator_dir_path, paginator_name
67 )
68
69 def _add_paginator(self, section, paginator_name):
70 section.add_title_section(paginator_name)

Callers 3

paginator_apiMethod · 0.95

Calls 9

_add_overviewMethod · 0.95
_add_paginatorMethod · 0.95
write_to_fileMethod · 0.95
DocumentStructureClass · 0.90
h2Method · 0.45
new_lineMethod · 0.45
writelnMethod · 0.45
toctreeMethod · 0.45
tocitemMethod · 0.45

Tested by 2