Skip to content

Redshift module#

Index > Redshift

Auto-generated documentation for Redshift type annotations stubs module mypy-boto3-redshift.

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 Redshift.

From PyPI with pip#

Install boto3-stubs for Redshift service.

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

# 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[redshift]'

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

How to uninstall#

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


Code samples can be found in Examples.


Type annotations and code completion for boto3.client("redshift") as RedshiftClient boto3 documentation

# RedshiftClient usage example

from boto3.session import Session

from mypy_boto3_redshift.client import RedshiftClient

def get_client() -> RedshiftClient:
    return Session().client("redshift")


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

# DescribeClusterDbRevisionsPaginator usage example

from boto3.session import Session

from mypy_boto3_redshift.paginator import DescribeClusterDbRevisionsPaginator

def get_describe_cluster_db_revisions_paginator() -> DescribeClusterDbRevisionsPaginator:
    return Session().client("redshift").get_paginator("describe_cluster_db_revisions"))


Type annotations and code completion for waiters from boto3.client("redshift").get_waiter("...").

# ClusterAvailableWaiter usage example

from boto3.session import Session

from mypy_boto3_redshift.waiter import ClusterAvailableWaiter

def get_cluster_available_waiter() -> ClusterAvailableWaiter:
    return Session().client("redshift").get_waiter("cluster_available")


Type annotations for literals used in methods and schemas.

# ActionTypeType usage example

from mypy_boto3_redshift.literals import ActionTypeType

def get_value() -> ActionTypeType:
    return "recommend-node-config"

Typed dictionaries#

Type annotations for typed dictionaries used in methods and schema.

# AcceptReservedNodeExchangeInputMessageRequestTypeDef usage example

from mypy_boto3_redshift.type_defs import AcceptReservedNodeExchangeInputMessageRequestTypeDef

def get_value() -> AcceptReservedNodeExchangeInputMessageRequestTypeDef:
    return {
        "ReservedNodeId": ...,
        "TargetReservedNodeOfferingId": ...,