Examples#
Index > TimestreamWrite > Examples
Auto-generated documentation for TimestreamWrite type annotations stubs module types-aiobotocore-timestream-write.
Client#
Implicit type annotations#
Can be used with types-aiobotocore[timestream-write]
package installed.
Write your TimestreamWrite
code as usual,
type checking and code completion should work out of the box.
# TimestreamWriteClient usage example
from aiobotocore.session import get_session
session = get_session()
async with session.create_client("timestream-write") as client: # (1)
result = await client.create_batch_load_task() # (2)
- client: TimestreamWriteClient
- result: CreateBatchLoadTaskResponseTypeDef
Explicit type annotations#
With types-aiobotocore-lite[timestream-write]
or a standalone types_aiobotocore_timestream_write
package, you have to explicitly specify
client: TimestreamWriteClient
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.
# TimestreamWriteClient usage example with type annotations
from aiobotocore.session import get_session
from types_aiobotocore_timestream_write.client import TimestreamWriteClient
from types_aiobotocore_timestream_write.type_defs import CreateBatchLoadTaskResponseTypeDef
from types_aiobotocore_timestream_write.type_defs import CreateBatchLoadTaskRequestRequestTypeDef
session = get_session()
async with session.create_client("timestream-write") as client:
client: TimestreamWriteClient
kwargs: CreateBatchLoadTaskRequestRequestTypeDef = {...}
result: CreateBatchLoadTaskResponseTypeDef = await client.create_batch_load_task(**kwargs)