Skip to content

Examples#

Index > rePostPrivate > Examples

Auto-generated documentation for rePostPrivate type annotations stubs module mypy-boto3-repostspace.

Client#

Implicit type annotations#

Can be used with boto3-stubs[repostspace] package installed.

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

# rePostPrivateClient usage example

from boto3.session import Session


session = Session()

client = session.client("repostspace")  # (1)
result = client.create_space()  # (2)
  1. client: rePostPrivateClient
  2. result: CreateSpaceOutputTypeDef
# 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)
  1. client: rePostPrivateClient
  2. paginator: ListSpacesPaginator
  3. item: ListSpacesOutputTypeDef

Explicit type annotations#

With boto3-stubs-lite[repostspace] or a standalone mypy_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.

# rePostPrivateClient usage example with type annotations

from boto3.session import Session

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


session = Session()

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

kwargs: CreateSpaceInputRequestTypeDef = {...}
result: CreateSpaceOutputTypeDef = client.create_space(**kwargs)
# ListSpacesPaginator usage example with type annotations

from boto3.session import Session

from mypy_boto3_repostspace.client import rePostPrivateClient
from mypy_boto3_repostspace.paginator import ListSpacesPaginator
from mypy_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)