Skip to content

Examples#

Index > RDSDataService > Examples

Auto-generated documentation for RDSDataService type annotations stubs module types-aiobotocore-rds-data.

Client#

Implicit type annotations#

Can be used with types-aiobotocore[rds-data] package installed.

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

# RDSDataServiceClient usage example

from aiobotocore.session import get_session


session = get_session()

async with session.create_client("rds-data") as client:  # (1)
    result = await client.batch_execute_statement()  # (2)
  1. client: RDSDataServiceClient
  2. result: BatchExecuteStatementResponseTypeDef

Explicit type annotations#

With types-aiobotocore-lite[rds-data] or a standalone types_aiobotocore_rds_data package, you have to explicitly specify client: RDSDataServiceClient 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.

# RDSDataServiceClient usage example with type annotations

from aiobotocore.session import get_session

from types_aiobotocore_rds_data.client import RDSDataServiceClient
from types_aiobotocore_rds_data.type_defs import BatchExecuteStatementResponseTypeDef
from types_aiobotocore_rds_data.type_defs import BatchExecuteStatementRequestRequestTypeDef


session = get_session()

async with session.create_client("rds-data") as client:
    client: RDSDataServiceClient
    kwargs: BatchExecuteStatementRequestRequestTypeDef = {...}
    result: BatchExecuteStatementResponseTypeDef = await client.batch_execute_statement(**kwargs)