Skip to content

Examples#

Index > SSOOIDC > Examples

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

Client#

Implicit type annotations#

Can be used with types-boto3[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 boto3.session import Session


session = Session()

client = session.client("sso-oidc")  # (1)
result = client.create_token()  # (2)
  1. client: SSOOIDCClient
  2. result: CreateTokenResponseTypeDef

Explicit type annotations#

With types-boto3-lite[sso-oidc] or a standalone types_boto3_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 boto3.session import Session

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


session = Session()

client: SSOOIDCClient = session.client("sso-oidc")

kwargs: CreateTokenRequestRequestTypeDef = {...}
result: CreateTokenResponseTypeDef = client.create_token(**kwargs)