Examples#
Index > ForecastQueryService > Examples
Auto-generated documentation for ForecastQueryService type annotations stubs module mypy-boto3-forecastquery.
Client#
Implicit type annotations#
Can be used with boto3-stubs[forecastquery]
package installed.
Write your ForecastQueryService
code as usual,
type checking and code completion should work out of the box.
Client method usage example#
# ForecastQueryServiceClient usage example
from boto3.session import Session
session = Session()
client = session.client("forecastquery") # (1)
result = client.query_forecast() # (2)
- client: ForecastQueryServiceClient
- result: QueryForecastResponseTypeDef
Explicit type annotations#
With boto3-stubs-lite[forecastquery]
or a standalone mypy_boto3_forecastquery
package, you have to explicitly specify client: ForecastQueryServiceClient
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#
# ForecastQueryServiceClient usage example with type annotations
from boto3.session import Session
from mypy_boto3_forecastquery.client import ForecastQueryServiceClient
from mypy_boto3_forecastquery.type_defs import QueryForecastResponseTypeDef
from mypy_boto3_forecastquery.type_defs import QueryForecastRequestTypeDef
session = Session()
client: ForecastQueryServiceClient = session.client("forecastquery")
kwargs: QueryForecastRequestTypeDef = {...}
result: QueryForecastResponseTypeDef = client.query_forecast(**kwargs)