Examples#
Index > ResourceGroupsTaggingAPI > Examples
Auto-generated documentation for ResourceGroupsTaggingAPI type annotations stubs module mypy-boto3-resourcegroupstaggingapi.
Client#
Implicit type annotations#
Can be used with boto3-stubs[resourcegroupstaggingapi]
package installed.
Write your ResourceGroupsTaggingAPI
code as usual,
type checking and code completion should work out of the box.
# ResourceGroupsTaggingAPIClient usage example
from boto3.session import Session
session = Session()
client = session.client("resourcegroupstaggingapi") # (1)
result = client.get_compliance_summary() # (2)
- client: ResourceGroupsTaggingAPIClient
- result: GetComplianceSummaryOutputTypeDef
# GetComplianceSummaryPaginator usage example
from boto3.session import Session
session = Session()
client = session.client("resourcegroupstaggingapi") # (1)
paginator = client.get_paginator("get_compliance_summary") # (2)
for item in paginator.paginate(...):
print(item) # (3)
- client: ResourceGroupsTaggingAPIClient
- paginator: GetComplianceSummaryPaginator
- item: GetComplianceSummaryOutputTypeDef
Explicit type annotations#
With boto3-stubs-lite[resourcegroupstaggingapi]
or a standalone mypy_boto3_resourcegroupstaggingapi
package, you have to explicitly specify client: ResourceGroupsTaggingAPIClient
type annotation.
All other type annotations are optional, as types should be discovered automatically. However, these type annotations can be helpful in your functions and methods.
# ResourceGroupsTaggingAPIClient usage example with type annotations
from boto3.session import Session
from mypy_boto3_resourcegro