Examples#
Index > TimestreamInfluxDB > Examples
Auto-generated documentation for TimestreamInfluxDB type annotations stubs module types-boto3-timestream-influxdb.
Client#
Implicit type annotations#
Can be used with types-boto3[timestream-influxdb] package installed.
Write your TimestreamInfluxDB code as usual,
type checking and code completion should work out of the box.
Client method usage example#
# TimestreamInfluxDBClient usage example
from boto3.session import Session
session = Session()
client = session.client("timestream-influxdb") # (1)
result = client.create_db_backup() # (2)
- client: TimestreamInfluxDBClient
- result: CreateDbBackupOutputTypeDef
Paginator usage example#
# ListDbBackupsPaginator usage example
from boto3.session import Session
session = Session()
client = session.client("timestream-influxdb") # (1)
paginator = client.get_paginator("list_db_backups") # (2)
for item in paginator.paginate(...):
print(item) # (3)
- client: TimestreamInfluxDBClient
- paginator: ListDbBackupsPaginator
- item: ListDbBackupsOutputTypeDef
Explicit type annotations#
With types-boto3-lite[timestream-influxdb]
or a standalone types_boto3_timestream_influxdb package, you have to explicitly specify client: TimestreamInfluxDBClient 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#
# TimestreamInfluxDBClient usage example with type annotations
from boto3.session import Session
from types_boto3_timestream_influxdb.client import TimestreamInfluxDBClient
from types_boto3_timestream_influxdb.type_defs import CreateDbBackupOutputTypeDef
from types_boto3_timestream_influxdb.type_defs import CreateDbBackupInputTypeDef
session = Session()
client: TimestreamInfluxDBClient = session.client("timestream-influxdb")
kwargs: CreateDbBackupInputTypeDef = {...}
result: CreateDbBackupOutputTypeDef = client.create_db_backup(**kwargs)
Paginator usage example#
# ListDbBackupsPaginator usage example with type annotations
from boto3.session import Session
from types_boto3_timestream_influxdb.client import TimestreamInfluxDBClient
from types_boto3_timestream_influxdb.paginator import ListDbBackupsPaginator
from types_boto3_timestream_influxdb.type_defs import ListDbBackupsOutputTypeDef
session = Session()
client: TimestreamInfluxDBClient = session.client("timestream-influxdb")
paginator: ListDbBackupsPaginator = client.get_paginator("list_db_backups")
for item in paginator.paginate(...):
item: ListDbBackupsOutputTypeDef
print(item)