Skip to content

Examples#

Index > SSOOIDC > Examples

Auto-generated documentation for SSOOIDC type annotations stubs module types-aiobotocore-sso-oidc.

Client#

Implicit type annotations#

Can be used with types-aiobotocore[sso-oidc] package installed.

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

# SSOOIDCClient usage example

from aiobotocore.session import get_session


session = get_session()

async with session.create_client("sso-oidc") as client:  # (1)
    result = await client.create_token()  # (2)
  1. client: SSOOIDCClient
  2. result: CreateTokenResponseTypeDef

Explicit type annotations#

With types-aiobotocore-lite[sso-oidc] or a standalone types_aiobotocore_sso_oidc package, you have to explicitly specify client: SSOOIDCClient 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.

# SSOOIDCClient usage example with type annotations

from aiobotocore.session import get_session

from types_aiobotocore_sso_oidc.client import SSOOIDCClient
from types_aiobotocore_sso_oidc.type_defs import CreateTokenResponseTypeDef
from types_aiobotocore_sso_oidc.type_defs import CreateTokenRequestRequestTypeDef


session = get_session()

async with session.create_client("sso-oidc") as client:
    client: SSOOIDCClient
    kwargs: CreateTokenRequestRequestTypeDef = {...}
    result: CreateTokenResponseTypeDef = await client.create_token(**kwargs)