Skip to content

Examples#

Index > rePostPrivate > Examples

Auto-generated documentation for rePostPrivate type annotations stubs module types-aiobotocore-repostspace.

Client#

Implicit type annotations#

Can be used with types-aioboto3[repostspace] package installed.

Write your rePostPrivate code as usual, type checking and code completion should work out of the box.

# rePostPrivateClient usage example

from aioboto3.session import Session


session = Session()

async with session.client("repostspace") as client:  # (1)
    result = await client.create_space()  # (2)
  1. client: rePostPrivateClient
  2. result: CreateSpaceOutputTypeDef
# ListSpacesPaginator usage example

from aioboto3.session import Session


session = Session()

async with session.client("repostspace") as client:  # (1)
    paginator = client.get_paginator("list_spaces")  # (2)
    async for item in paginator.paginate(...):
        print(item)  # (3)
  1. client: rePostPrivateClient
  2. paginator: ListSpacesPaginator
  3. item: ListSpacesOutputTypeDef

Explicit type annotations#

With types-aioboto3-lite[repostspace] or a standalone types_aiobotocore_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.

# rePostPrivateClient usage example with type annotations

from aioboto3.session import Session

from types_aiobotocore_repostspace.client import rePostPrivateClient
from types_aiobotocore_repostspace.type_defs import CreateSpaceOutputTypeDef
from types_aiobotocore_repostspace.type_defs import CreateSpaceInputRequestTypeDef


session = Session()

client: rePostPrivateClient
async with session.client("repostspace") as client:  # (1)
    kwargs: CreateSpaceInputRequestTypeDef = {...}  # (2)
    result: CreateSpaceOutputTypeDef = await client.create_space(**kwargs)  # (3)
  1. client: rePostPrivateClient
  2. kwargs: CreateSpaceInputRequestTypeDef
  3. result: CreateSpaceOutputTypeDef
# ListSpacesPaginator usage example with type annotations

from aioboto3.session import Session

from types_aiobotocore_repostspace.client import rePostPrivateClient
from types_aiobotocore_repostspace.paginator import ListSpacesPaginator
from types_aiobotocore_repostspace.type_defs import ListSpacesOutputTypeDef


session = Session()

client: rePostPrivateClient
async with session.client("repostspace") as client:  # (1)
    paginator: ListSpacesPaginator = client.get_paginator("list_spaces")  # (2)
    async for item in paginator.paginate(...):
        item: ListSpacesOutputTypeDef
        print(item)  # (3)
  1. client: rePostPrivateClient
  2. paginator: ListSpacesPaginator
  3. item: ListSpacesOutputTypeDef