Skip to content

Examples#

Index > WorkSpacesWeb > Examples

Auto-generated documentation for WorkSpacesWeb type annotations stubs module types-aiobotocore-workspaces-web.

Client#

Implicit type annotations#

Can be used with types-aiobotocore[workspaces-web] package installed.

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

# WorkSpacesWebClient usage example

from aiobotocore.session import get_session


session = get_session()

async with session.create_client("workspaces-web") as client:  # (1)
    result = await client.associate_browser_settings()  # (2)
  1. client: WorkSpacesWebClient
  2. result: AssociateBrowserSettingsResponseTypeDef

Explicit type annotations#

With types-aiobotocore-lite[workspaces-web] or a standalone types_aiobotocore_workspaces_web package, you have to explicitly specify client: WorkSpacesWebClient 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.

# WorkSpacesWebClient usage example with type annotations

from aiobotocore.session import get_session

from types_aiobotocore_workspaces_web.client import WorkSpacesWebClient
from types_aiobotocore_workspaces_web.type_defs import AssociateBrowserSettingsResponseTypeDef
from types_aiobotocore_workspaces_web.type_defs import AssociateBrowserSettingsRequestRequestTypeDef


session = get_session()

async with session.create_client("workspaces-web") as client:
    client: WorkSpacesWebClient
    kwargs: AssociateBrowserSettingsRequestRequestTypeDef = {...}
    result: AssociateBrowserSettingsResponseTypeDef = await client.associate_browser_settings(**kwargs)