Skip to content

ForecastService module#

Index > ForecastService

Auto-generated documentation for ForecastService type annotations stubs module mypy-boto3-forecast.

How to install#

VSCode extension#

Add AWS Boto3 extension to your VSCode and run AWS boto3: Quick Start command.

Click Modify and select boto3 common and ForecastService.

From PyPI with pip#

Install boto3-stubs for ForecastService service.

# install with boto3 type annotations
python -m pip install 'boto3-stubs[forecast]'

# Lite version does not provide session.client/resource overloads
# it is more RAM-friendly, but requires explicit type annotations
python -m pip install 'boto3-stubs-lite[forecast]'

# standalone installation
python -m pip install mypy-boto3-forecast

How to uninstall#

python -m pip uninstall -y mypy-boto3-forecast


Code samples can be found in Examples.


Type annotations and code completion for boto3.client("forecast") as ForecastServiceClient boto3 documentation

# ForecastServiceClient usage example

from boto3.session import Session

from mypy_boto3_forecast.client import ForecastServiceClient

def get_client() -> ForecastServiceClient:
    return Session().client("forecast")


Type annotations and code completion for paginators from boto3.client("forecast").get_paginator("...").

# ListDatasetGroupsPaginator usage example

from boto3.session import Session

from mypy_boto3_forecast.paginator import ListDatasetGroupsPaginator

def get_list_dataset_groups_paginator() -> ListDatasetGroupsPaginator:
    return Session().client("forecast").get_paginator("list_dataset_groups"))


Type annotations for literals used in methods and schemas.

# AttributeTypeType usage example

from mypy_boto3_forecast.literals import AttributeTypeType

def get_value() -> AttributeTypeType:
    return "float"

Typed dictionaries#

Type annotations for typed dictionaries used in methods and schema.

# ActionTypeDef usage example

from mypy_boto3_forecast.type_defs import ActionTypeDef

def get_value() -> ActionTypeDef:
    return {
        "AttributeName": ...,
        "Operation": ...,
        "Value": ...,