Skip to content

Examples#

Index > QLDBSession > Examples

Auto-generated documentation for QLDBSession type annotations stubs module types-boto3-qldb-session.

Client#

Implicit type annotations#

Can be used with types-boto3[qldb-session] package installed.

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

# QLDBSessionClient usage example

from boto3.session import Session


session = Session()

client = session.client("qldb-session")  # (1)
result = client.send_command()  # (2)
  1. client: QLDBSessionClient
  2. result: SendCommandResultTypeDef

Explicit type annotations#

With types-boto3-lite[qldb-session] or a standalone types_boto3_qldb_session package, you have to explicitly specify client: QLDBSessionClient 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.

# QLDBSessionClient usage example with type annotations

from boto3.session import Session

from types_boto3_qldb_session.client import QLDBSessionClient
from types_boto3_qldb_session.type_defs import SendCommandResultTypeDef
from types_boto3_qldb_session.type_defs import SendCommandRequestRequestTypeDef


session = Session()

client: QLDBSessionClient = session.client("qldb-session")

kwargs: SendCommandRequestRequestTypeDef = {...}
result: SendCommandResultTypeDef = client.send_command(**kwargs)