Skip to content

Examples

Index > WorkLink > Examples

Auto-generated documentation for WorkLink type annotations stubs module types-aiobotocore-worklink.

Client

Implicit type annotations

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

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

Client usage example
from aioboto3.session import Session


session = Session()

async with session.client("worklink") as client:  # (1)
    result = await client.associate_website_authorization_provider()  # (2)
  1. client: WorkLinkClient
  2. result: AssociateWebsiteAuthorizationProviderResponseTypeDef

Explicit type annotations

With types-aioboto3-lite[worklink] or a standalone types_aiobotocore_worklink package, you have to explicitly specify client: WorkLinkClient 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 usage example
from aioboto3.session import Session

from types_aiobotocore_worklink.client import WorkLinkClient
from types_aiobotocore_worklink.type_defs import AssociateWebsiteAuthorizationProviderResponseTypeDef
from types_aiobotocore_worklink.type_defs import AssociateWebsiteAuthorizationProviderRequestRequestTypeDef


session = Session()

client: WorkLinkClient
async with session.client("worklink") as client:  # (1)
    kwargs: AssociateWebsiteAuthorizationProviderRequestRequestTypeDef = {...}  # (2)
    result: AssociateWebsiteAuthorizationProviderResponseTypeDef = await client.associate_website_authorization_provider(**kwargs)  # (3)
  1. client: WorkLinkClient
  2. kwargs: AssociateWebsiteAuthorizationProviderRequestRequestTypeDef
  3. result: AssociateWebsiteAuthorizationProviderResponseTypeDef