{"library":"mypy-boto3-redshift-serverless","title":"mypy-boto3-redshift-serverless Type Stubs","description":"This package provides type annotations for the `boto3` Redshift Serverless service, generated by `mypy-boto3-builder`. It enables static type checking for your `boto3` client calls, enhancing code quality and developer experience. The current version is 1.42.28, closely tracking `boto3` releases, with frequent updates to align with new AWS service features and API changes.","language":"python","status":"active","last_verified":"Thu May 14","install":{"commands":["pip install mypy-boto3-redshift-serverless boto3"],"cli":null},"imports":["from mypy_boto3_redshift_serverless.client import RedshiftServerlessClient","from mypy_boto3_redshift_serverless.type_defs import CreateNamespaceRequestRequestTypeDef"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import boto3\nfrom mypy_boto3_redshift_serverless.client import RedshiftServerlessClient\nfrom mypy_boto3_redshift_serverless.type_defs import ListNamespacesResponseTypeDef\n\n# Create a boto3 client for Redshift Serverless with type hints\n# The 'type: ignore' is sometimes needed if boto3.client does not directly\n# return the exact stub type expected by mypy-boto3 in all scenarios,\n# or if you are using an older boto3 without full type-hinting support.\nredshift_client: RedshiftServerlessClient = boto3.client(\"redshift-serverless\") # type: ignore\n\ndef list_redshift_namespaces() -> ListNamespacesResponseTypeDef:\n    \"\"\"\n    Lists Redshift Serverless namespaces and returns the typed response.\n    \"\"\"\n    print(\"Calling list_namespaces...\")\n    response: ListNamespacesResponseTypeDef = redshift_client.list_namespaces()\n    \n    namespaces = response.get(\"namespaces\", [])\n    if namespaces:\n        for ns in namespaces:\n            print(f\"  Namespace Name: {ns.get('namespaceName')}, Status: {ns.get('status')}\")\n    else:\n        print(\"  No namespaces found.\")\n        \n    return response\n\nif __name__ == \"__main__\":\n    # To run this, ensure:\n    # 1. 'pip install boto3'\n    # 2. 'pip install mypy-boto3-redshift-serverless'\n    # 3. AWS credentials are configured (e.g., via ~/.aws/credentials or environment variables)\n\n    try:\n        list_redshift_namespaces()\n    except Exception as e:\n        print(f\"An error occurred: {e}\")\n        print(\"Please ensure boto3 is configured with valid AWS credentials and permissions.\")\n","lang":"python","description":"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.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":{"tag":null,"tag_description":null,"last_tested":"2026-05-14","installed_version":"1.43.0","pypi_latest":"1.43.0","is_stale":false,"summary":{"python_range":"3.10–3.9","success_rate":100,"avg_install_s":3.7,"avg_import_s":0.66,"wheel_type":"wheel"},"results":[{"runtime":"python:3.10-alpine","python_version":"3.10","os_libc":"alpine (musl)","variant":"mypy-boto3-redshift-serverless","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0.59,"mem_mb":13.7,"disk_size":"51.3M"},{"runtime":"python:3.10-alpine","python_version":"3.10","os_libc":"alpine (musl)","variant":"mypy-boto3-redshift-serverless","exit_code":0,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":0.61,"mem_mb":13.6,"disk_size":"51.2M"},{"runtime":"python:3.10-slim","python_version":"3.10","os_libc":"slim (glibc)","variant":"mypy-boto3-redshift-serverless","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":3.9,"import_time_s":0.44,"mem_mb":13.7,"disk_size":"52M"},{"runtime":"python:3.10-slim","python_version":"3.10","os_libc":"slim (glibc)","variant":"mypy-boto3-redshift-serverless","exit_code":0,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":0.48,"mem_mb":13.6,"disk_size":"52M"},{"runtime":"python:3.11-alpine","python_version":"3.11","os_libc":"alpine (musl)","variant":"mypy-boto3-redshift-serverless","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0.8,"mem_mb":15.3,"disk_size":"54.4M"},{"runtime":"python:3.11-alpine","python_version":"3.11","os_libc":"alpine (musl)","variant":"mypy-boto3-redshift-serverless","exit_code":0,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":0.92,"mem_mb":15.2,"disk_size":"54.3M"},{"runtime":"python:3.11-slim","python_version":"3.11","os_libc":"slim (glibc)","variant":"mypy-boto3-redshift-serverless","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":4,"import_time_s":0.71,"mem_mb":15.3,"disk_size":"55M"},{"runtime":"python:3.11-slim","python_version":"3.11","os_libc":"slim (glibc)","variant":"mypy-boto3-redshift-serverless","exit_code":0,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":0.85,"mem_mb":15.2,"disk_size":"55M"},{"runtime":"python:3.12-alpine","python_version":"3.12","os_libc":"alpine (musl)","variant":"mypy-boto3-redshift-serverless","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0.65,"mem_mb":14.6,"disk_size":"45.6M"},{"runtime":"python:3.12-alpine","python_version":"3.12","os_libc":"alpine (musl)","variant":"mypy-boto3-redshift-serverless","exit_code":0,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":0.74,"mem_mb":14.4,"disk_size":"45.5M"},{"runtime":"python:3.12-slim","python_version":"3.12","os_libc":"slim (glibc)","variant":"mypy-boto3-redshift-serverless","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":3.1,"import_time_s":0.66,"mem_mb":14.6,"disk_size":"46M"},{"runtime":"python:3.12-slim","python_version":"3.12","os_libc":"slim (glibc)","variant":"mypy-boto3-redshift-serverless","exit_code":0,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":0.8,"mem_mb":14.4,"disk_size":"46M"},{"runtime":"python:3.13-alpine","python_version":"3.13","os_libc":"alpine (musl)","variant":"mypy-boto3-redshift-serverless","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0.66,"mem_mb":15.6,"disk_size":"45.4M"},{"runtime":"python:3.13-alpine","python_version":"3.13","os_libc":"alpine (musl)","variant":"mypy-boto3-redshift-serverless","exit_code":0,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":0.69,"mem_mb":15.5,"disk_size":"45.1M"},{"runtime":"python:3.13-slim","python_version":"3.13","os_libc":"slim (glibc)","variant":"mypy-boto3-redshift-serverless","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":3,"import_time_s":0.69,"mem_mb":15.6,"disk_size":"46M"},{"runtime":"python:3.13-slim","python_version":"3.13","os_libc":"slim (glibc)","variant":"mypy-boto3-redshift-serverless","exit_code":0,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":0.86,"mem_mb":15.5,"disk_size":"46M"},{"runtime":"python:3.9-alpine","python_version":"3.9","os_libc":"alpine (musl)","variant":"mypy-boto3-redshift-serverless","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0.47,"mem_mb":12.8,"disk_size":"50.7M"},{"runtime":"python:3.9-alpine","python_version":"3.9","os_libc":"alpine (musl)","variant":"mypy-boto3-redshift-serverless","exit_code":0,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":0.63,"mem_mb":12.8,"disk_size":"50.7M"},{"runtime":"python:3.9-slim","python_version":"3.9","os_libc":"slim (glibc)","variant":"mypy-boto3-redshift-serverless","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":4.6,"import_time_s":0.47,"mem_mb":12.8,"disk_size":"51M"},{"runtime":"python:3.9-slim","python_version":"3.9","os_libc":"slim (glibc)","variant":"mypy-boto3-redshift-serverless","exit_code":0,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":0.52,"mem_mb":12.8,"disk_size":"51M"}]}}