Registry /
type-stubs / mypy-boto3-redshift-data
Install & Compatibility
Where this runs
tested against v1.43.55 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 18.3MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 1.6s · import 0.000s · 19MB
16MB installed
● package 16MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
RedshiftDataClient
✓ from mypy_boto3_redshift_data import RedshiftDataClient
✗ from mypy_boto3_redshift_data import RedshiftDataClient
This quickstart demonstrates how to initialize a `boto3` RedshiftData client and use it with type hints provided by `mypy-boto3-redshift-data`. It includes an example `execute_statement` call, showcasing how input arguments and output responses benefit from static type checking. Remember to install `boto3` separately.
import boto3
from mypy_boto3_redshift_data import RedshiftDataClient
from mypy_boto3_redshift_data.type_defs import ExecuteStatementResponseTypeDef
import os
# Instantiate the boto3 client, which will be augmented with type hints
# from mypy-boto3-redshift-data for static analysis.
client: RedshiftDataClient = boto3.client("redshift-data")
# Example of executing a Redshift Data API statement.
# Replace with your actual cluster, database, and SQL for a successful run.
cluster_identifier = os.environ.get("REDSHIFT_CLUSTER_IDENTIFIER", "your-redshift-cluster-identifier")
database = os.environ.get("REDSHIFT_DATABASE", "dev")
db_user = os.environ.get("REDSHIFT_DB_USER", "awsuser")
sql_statement = "SELECT 1;" # A simple, safe statement
try:
# mypy will check arguments and the response type
response: ExecuteStatementResponseTypeDef = client.execute_statement(
ClusterIdentifier=cluster_identifier,
Database=database,
DbUser=db_user,
Sql=sql_statement,
WithEvent=False # Example of an optional parameter with type checking
)
print(f"Statement ID: {response['Id']}")
# Accessing an optional key safely with .get()
print(f"Statement status: {response.get('Status', 'UNKNOWN')}")
# Mypy would flag if you tried to access 'response["NonExistentKey"]'
# or used a wrong type for an argument to client.execute_statement.
except Exception as e:
print(f"Error executing statement: {e}")
print("Please ensure environment variables REDSHIFT_CLUSTER_IDENTIFIER, REDSHIFT_DATABASE, REDSHIFT_DB_USER are set if expecting a successful execution.")
print("\nType checking for RedshiftDataClient is enabled.")
Upgrade
Version history
1.43.55latest on PyPI · released Jul 23, 2026
Audit
Dependencies
boto3requiredProvides the runtime client for which these type stubs are generated.