Examples#
Auto-generated documentation for WorkLink type annotations stubs module mypy-boto3-worklink.
Client#
Implicit type annotations#
Can be used with boto3-stubs[worklink]
package installed.
Write your WorkLink
code as usual,
type checking and code completion should work out of the box.
# WorkLinkClient usage example
from boto3.session import Session
session = Session()
client = session.client("worklink") # (1)
result = client.associate_website_authorization_provider() # (2)
- client: WorkLinkClient
- result: AssociateWebsiteAuthorizationProviderResponseTypeDef
Explicit type annotations#
With boto3-stubs-lite[worklink]
or a standalone mypy_boto3_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.
# WorkLinkClient usage example with type annotations
from boto3.session import Session
from mypy_boto3_worklink.client import WorkLinkClient
from mypy_boto3_worklink.type_defs import AssociateWebsiteAuthorizationProviderResponseTypeDef
from mypy_boto3_worklink.type_defs import AssociateWebsiteAuthorizationProviderRequestRequestTypeDef
session = Session()
client: WorkLinkClient = session.client("worklink")
kwargs: AssociateWebsiteAuthorizationProviderRequestRequestTypeDef = {...}
result: AssociateWebsiteAuthorizationProviderResponseTypeDef = client.associate_website_authorization_provider(**kwargs)