Skip to content

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_channel_role_to_accessors()  # (2)
  1. client: RePostPrivateClient
  2. result: BatchAddChannelRoleToAccessorsOutputTypeDef

Paginator usage example#

# ListChannelsPaginator usage example

from boto3.session import Session


session = Session()
client = session.client("repostspace")  # (1)

paginator = client.get_paginator("list_channels")  # (2)
for item in paginator.paginate(...):
    print(item)  # (3)
  1. client: RePostPrivateClient
  2. paginator: ListChannelsPaginator
  3. item: ListChannelsOutputTypeDef

Waiter usage example#

# ChannelCreatedWaiter usage example

from boto3.session import Session


session = Session()
client = session.client("repostspace")  # (1)

waiter = client.get_waiter("channel_created")  # (2)
waiter.wait(...)
  1. client: RePostPrivateClient
  2. waiter: ChannelCreatedWaiter

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 BatchAddChannelRoleToAccessorsOutputTypeDef
from types_boto3_repostspace.type_defs import BatchAddChannelRoleToAccessorsInputTypeDef


session = Session()

client: RePostPrivateClient = session.client("repostspace")

kwargs: BatchAddChannelRoleToAccessorsInputTypeDef = {...}
result: BatchAddChannelRoleToAccessorsOutputTypeDef = client.batch_add_channel_role_to_accessors(**kwargs)

Paginator usage example#

# ListChannelsPaginator usage example with type annotations

from boto3.session import Session

from types_boto3_repostspace.client import RePostPrivateClient
from types_boto3_repostspace.paginator import ListChannelsPaginator
from types_boto3_repostspace.type_defs import ListChannelsOutputTypeDef


session = Session()
client: RePostPrivateClient = session.client("repostspace")

paginator: ListChannelsPaginator = client.get_paginator("list_channels")
for item in paginator.paginate(...):
    item: ListChannelsOutputTypeDef
    print(item)

Waiter usage example#

# ChannelCreatedWaiter usage example with type annotations

from boto3.session import Session

from types_boto3_repostspace.client import RePostPrivateClient
from types_boto3_repostspace.waiter import ChannelCreatedWaiter

session = Session()
client: RePostPrivateClient = session.client("repostspace")

waiter: ChannelCreatedWaiter = client.get_waiter("channel_created")
waiter.wait(...)