Registry /
type-stubs / mypy-boto3-redshift-serverless
Install & Compatibility
Where this runs
tested against v1.43.75 · 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.636s · 52.2MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 4.5s · import 0.608s · 53MB
50MB installed
● package 50MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
RedshiftServerlessClient
✓ from mypy_boto3_redshift_serverless.client import RedshiftServerlessClient
✗ from mypy_boto3_redshift_serverless import RedshiftServerlessClient
Client types are located in the '.client' sub-module.
CreateNamespaceRequestRequestTypeDef
✓ from mypy_boto3_redshift_serverless.type_defs import CreateNamespaceRequestRequestTypeDef
✗ from mypy_boto3_redshift_serverless.client import CreateNamespaceRequestRequestTypeDef
All TypeDef (TypedDict) definitions are found in the '.type_defs' sub-module.
This example demonstrates how to initialize a `RedshiftServerlessClient` with type hints and call a basic operation (`list_namespaces`) while leveraging the provided `TypeDef` for the response. Ensure `boto3` and AWS credentials are configured to run successfully.
import boto3
from mypy_boto3_redshift_serverless.client import RedshiftServerlessClient
from mypy_boto3_redshift_serverless.type_defs import ListNamespacesResponseTypeDef
# Create a boto3 client for Redshift Serverless with type hints
# The 'type: ignore' is sometimes needed if boto3.client does not directly
# return the exact stub type expected by mypy-boto3 in all scenarios,
# or if you are using an older boto3 without full type-hinting support.
redshift_client: RedshiftServerlessClient = boto3.client("redshift-serverless") # type: ignore
def list_redshift_namespaces() -> ListNamespacesResponseTypeDef:
"""
Lists Redshift Serverless namespaces and returns the typed response.
"""
print("Calling list_namespaces...")
response: ListNamespacesResponseTypeDef = redshift_client.list_namespaces()
namespaces = response.get("namespaces", [])
if namespaces:
for ns in namespaces:
print(f" Namespace Name: {ns.get('namespaceName')}, Status: {ns.get('status')}")
else:
print(" No namespaces found.")
return response
if __name__ == "__main__":
# To run this, ensure:
# 1. 'pip install boto3'
# 2. 'pip install mypy-boto3-redshift-serverless'
# 3. AWS credentials are configured (e.g., via ~/.aws/credentials or environment variables)
try:
list_redshift_namespaces()
except Exception as e:
print(f"An error occurred: {e}")
print("Please ensure boto3 is configured with valid AWS credentials and permissions.")
Debug
Known issues
breakingAs of `mypy-boto3-builder` version 8.12.0 (affecting `mypy-boto3-*` stub packages 1.42.x and newer), Python 3.8 is no longer supported. Projects must use Python 3.9 or newer.fixUpgrade your project's Python version to 3.9 or higher.
affects: mypy-boto3-builder >= 8.12.0 (and corresponding stub packages)
breakingThe `mypy-boto3-builder` (v8.9.0+) introduced breaking changes to `TypeDef` naming conventions. Argument `TypeDef` names were shortened (e.g., `CreateNamespaceRequestRequestTypeDef` to `CreateNamespaceRequestTypeDef`), and conflicting `Extra` postfixes were moved (e.g., `...ExtraRequestTypeDef` to `...RequestExtraTypeDef`).fixReview and update your code to use the new `TypeDef` names. Refer to the specific service's `type_defs.pyi` for current names.
affects: mypy-boto3-builder >= 8.9.0 (and corresponding stub packages)
gotchaThese packages are type stubs, meaning they provide type annotations but do not include the `boto3` runtime library itself. You must install `boto3` separately alongside the `mypy-boto3-redshift-serverless` package for your code to run.fixAlways ensure both `boto3` and `mypy-boto3-redshift-serverless` are installed (e.g., `pip install boto3 mypy-boto3-redshift-serverless`).
affects: All
gotchaThe builder (v8.12.0+) migrated to PEP 561 namespace packages. This change is generally handled by `pip`, but might impact complex environments, especially those using custom `PYTHONPATH` or older `mypy` versions, causing stubs to not be found.fixEnsure you are using a recent version of `mypy` and `pip`. If issues persist, check `mypy`'s `MYPYPATH` configuration.
affects: mypy-boto3-builder >= 8.12.0 (and corresponding stub packages)
gotchaService-specific stub packages follow the `mypy-boto3-<service-name>` naming convention. A common mistake is trying to install or import from just `mypy-boto3` or `<service-name>-stubs`.fixAlways use the full package name, e.g., `pip install mypy-boto3-redshift-serverless` and `from mypy_boto3_redshift_serverless.client import ...`.
affects: All
Upgrade
Version history
1.43.75latest on PyPI · released Aug 19, 2026
Audit
Dependencies
boto3optionalThese are type stubs for boto3; the boto3 library itself is required at runtime to use these stubs effectively.