Skip to content

Examples#

Index > RTBFabric > Examples

Auto-generated documentation for RTBFabric type annotations stubs module mypy-boto3-rtbfabric.

Client#

Implicit type annotations#

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

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

Client method usage example#

# RTBFabricClient usage example

from boto3.session import Session


session = Session()

client = session.client("rtbfabric")  # (1)
result = client.accept_link()  # (2)
  1. client: RTBFabricClient
  2. result: AcceptLinkResponseTypeDef

Paginator usage example#

# ListLinksPaginator usage example

from boto3.session import Session


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

paginator = client.get_paginator("list_links")  # (2)
for item in paginator.paginate(...):
    print(item)  # (3)
  1. client: RTBFabricClient
  2. paginator: ListLinksPaginator
  3. item: ListLinksResponseTypeDef

Waiter usage example#

# InboundExternalLinkActiveWaiter usage example

from boto3.session import Session


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

waiter = client.get_waiter("inbound_external_link_active")  # (2)
waiter.wait(...)
  1. client: RTBFabricClient
  2. waiter: InboundExternalLinkActiveWaiter

Explicit type annotations#

With boto3-stubs-lite[rtbfabric] or a standalone mypy_boto3_rtbfabric package, you have to explicitly specify client: RTBFabricClient 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#

# RTBFabricClient usage example with type annotations

from boto3.session import Session

from mypy_boto3_rtbfabric.client import RTBFabricClient
from mypy_boto3_rtbfabric.type_defs import AcceptLinkResponseTypeDef
from mypy_boto3_rtbfabric.type_defs import AcceptLinkRequestTypeDef


session = Session()

client: RTBFabricClient = session.client("rtbfabric")

kwargs: AcceptLinkRequestTypeDef = {...}
result: AcceptLinkResponseTypeDef = client.accept_link(**kwargs)

Paginator usage example#

# ListLinksPaginator usage example with type annotations

from boto3.session import Session

from mypy_boto3_rtbfabric.client import RTBFabricClient
from mypy_boto3_rtbfabric.paginator import ListLinksPaginator
from mypy_boto3_rtbfabric.type_defs import ListLinksResponseTypeDef


session = Session()
client: RTBFabricClient = session.client("rtbfabric")

paginator: ListLinksPaginator = client.get_paginator("list_links")
for item in paginator.paginate(...):
    item: ListLinksResponseTypeDef
    print(item)

Waiter usage example#

# InboundExternalLinkActiveWaiter usage example with type annotations

from boto3.session import Session

from mypy_boto3_rtbfabric.client import RTBFabricClient
from mypy_boto3_rtbfabric.waiter import InboundExternalLinkActiveWaiter

session = Session()
client: RTBFabricClient = session.client("rtbfabric")

waiter: InboundExternalLinkActiveWaiter = client.get_waiter("inbound_external_link_active")
waiter.wait(...)