Examples#
Index > RePostPrivate > Examples
Auto-generated documentation for RePostPrivate type annotations stubs module types-boto3-repostspace.
Client#
Implicit type annotations#
Can be used with types-boto3[repostspace]
package installed.
Write your RePostPrivate
code as usual,
type checking and code completion should work out of the box.
Client method usage example#
# RePostPrivateClient usage example
from boto3.session import Session
session = Session()
client = session.client("repostspace") # (1)
result = client.batch_add_role() # (2)
- client: RePostPrivateClient
- result: BatchAddRoleOutputTypeDef
Paginator usage example#
# ListSpacesPaginator usage example
from boto3.session import Session
session = Session()
client = session.client("repostspace") # (1)
paginator = client.get_paginator("list_spaces") # (2)
for item in paginator.paginate(...):
print(item) # (3)
- client: RePostPrivateClient
- paginator: ListSpacesPaginator
- item: ListSpacesOutputTypeDef
Explicit type annotations#
With types-boto3-lite[repostspace]
or a standalone types_boto3_repostspace
package, you have to explicitly specify client: RePostPrivateClient
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.
Client method usage example#
# RePostPrivateClient usage example with type annotations
from boto3.session import Session
from types_boto3_repostspace.client import RePostPrivateClient
from types_boto3_repostspace.type_defs import BatchAddRoleOutputTypeDef
from types_boto3_repostspace.type_defs import BatchAddRoleInputTypeDef
session = Session()
client: RePostPrivateClient = session.client("repostspace")
kwargs: BatchAddRoleInputTypeDef = {...}
result: BatchAddRoleOutputTypeDef = client.batch_add_role(**kwargs)
Paginator usage example#
# ListSpacesPaginator usage example with type annotations
from boto3.session import Session
from types_boto3_repostspace.client import RePostPrivateClient
from types_boto3_repostspace.paginator import ListSpacesPaginator
from types_boto3_repostspace.type_defs import ListSpacesOutputTypeDef
session = Session()
client: RePostPrivateClient = session.client("repostspace")
paginator: ListSpacesPaginator = client.get_paginator("list_spaces")
for item in paginator.paginate(...):
item: ListSpacesOutputTypeDef
print(item)