# Paginators

> [Index](../README.md) > [{{ service_name.class_name }}](./README.md) > Paginators

{% include "common/header_note.md.jinja2" with context %}

{% for paginator in package.paginators -%}
## {{ paginator.name }}

Type annotations and code completion for `#!python {{ package.library_name }}.client("{{ service_name.boto3_name }}").get_paginator("{{ paginator.operation_name }}")`.
[:material-aws: boto3 documentation]({{ paginator.boto3_doc_link }})

```python
# {{ paginator.name }} usage example

from {{ package.library_name }}.session import Session

from {{ package.name }}.paginator import {{ paginator.name }}

def get_{{ paginator.operation_name }}_paginator() -> {{ paginator.name }}:
    return Session().client("{{ service_name.boto3_name }}").get_paginator("{{ paginator.operation_name }}")
```

```python
# {{ paginator.name }} usage example with type annotations

from {{ package.library_name }}.session import Session

from {{ package.name }}.paginator import {{ paginator.name }}

session = Session()

client = Session().client("{{ service_name.boto3_name }}")  # (1)
paginator: {{ paginator.name }} = client.get_paginator("{{ paginator.operation_name }}")  # (2)
for item in paginator.paginate(...):
    print(item)  # (3)
```

1. client: [{{ package.client.name }}]({{ get_md_doc_link('client') }})
2. paginator: [{{ paginator.name }}]({{ get_md_doc_link('paginators', paginator.name) }})
3. item: {% with type_annotation=paginator.methods[0].return_type %}{% include "common/type_hint.md.jinja2" with context -%}{% endwith %}

{% for method in paginator.methods %}
### {{ method.name|escape_md }}

Type annotations and code completion for `#!python {{ paginator.name }}.{{ method.name }}` method.

{% include "common/method_code.md.jinja2" with context -%}

{% endfor -%}
{% endfor %}
