Examples#
Auto-generated documentation for QLDB type annotations stubs module mypy-boto3-qldb.
Client#
Implicit type annotations#
Can be used with boto3-stubs[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)
- client: QLDBClient
- result: CancelJournalKinesisStreamResponseTypeDef
Explicit type annotations#
With boto3-stubs-lite[qldb]
or a standalone mypy_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 mypy_boto3_qldb.client import QLDBClient
from mypy_boto3_qldb.type_defs import CancelJournalKinesisStreamResponseTypeDef
from mypy_boto3_qldb.type_defs import CancelJournalKinesisStreamRequestTypeDef
session = Session()
client: QLDBClient = session.client("qldb")
kwargs: CancelJournalKinesisStreamRequestTypeDef = {...}
result: CancelJournalKinesisStreamResponseTypeDef = client.cancel_journal_kinesis_stream(**kwargs)