Skip to content

Examples#

Index > QLDB > Examples

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

Client#

Implicit type annotations#

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

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

Client method usage example#

# QLDBClient usage example

from boto3.session import Session


session = Session()

client = session.client("qldb")  # (1)
result = client.cancel_journal_kinesis_stream()  # (2)
  1. client: QLDBClient
  2. result: CancelJournalKinesisStreamResponseTypeDef

Explicit type annotations#

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

Client method usage example#

# QLDBClient usage example with type annotations

from boto3.session import Session

from types_boto3_qldb.client import QLDBClient
from types_boto3_qldb.type_defs import CancelJournalKinesisStreamResponseTypeDef
from types_boto3_qldb.type_defs import CancelJournalKinesisStreamRequestTypeDef


session = Session()

client: QLDBClient = session.client("qldb")

kwargs: CancelJournalKinesisStreamRequestTypeDef = {...}
result: CancelJournalKinesisStreamResponseTypeDef = client.cancel_journal_kinesis_stream(**kwargs)