{"id":3379,"library":"mypy-boto3-support-app","title":"mypy-boto3-support-app Type Stubs","description":"mypy-boto3-support-app provides comprehensive type annotations for the AWS boto3 SupportApp service, enabling static type checking with tools like mypy and enhancing IDE auto-completion. It is part of the larger `mypy-boto3` project, with its current version 1.42.3 being generated by `mypy-boto3-builder 8.12.0`. The library follows a rapid release cadence, aligning with `boto3` updates and `mypy-boto3-builder` enhancements.","status":"active","version":"1.42.3","language":"en","source_language":"en","source_url":"https://github.com/youtype/mypy_boto3_builder","tags":["type stubs","mypy","boto3","aws","support-app","typing"],"install":[{"cmd":"pip install mypy-boto3-support-app","lang":"bash","label":"Standalone package"},{"cmd":"pip install 'boto3-stubs[support-app]'","lang":"bash","label":"As part of boto3-stubs (recommended)"}],"dependencies":[{"reason":"Runtime dependency for AWS SDK functionality. These are type stubs for boto3.","package":"boto3","optional":false},{"reason":"Static type checker to leverage the provided annotations.","package":"mypy","optional":true},{"reason":"Requires Python 3.9 or higher.","package":"python","optional":false}],"imports":[{"note":"Import the specific client type for explicit type hints.","symbol":"SupportAppClient","correct":"from mypy_boto3_support_app.client import SupportAppClient"},{"note":"Import specific TypeDef for precise type hints on API request/response structures.","symbol":"CreateCaseRequestRequestTypeDef","correct":"from mypy_boto3_support_app.type_defs import CreateCaseRequestRequestTypeDef"}],"quickstart":{"code":"import boto3\nfrom typing import TYPE_CHECKING\nimport os\n\nif TYPE_CHECKING:\n    from mypy_boto3_support_app.client import SupportAppClient\n    from mypy_boto3_support_app.type_defs import CreateCaseRequestRequestTypeDef\n\n\ndef create_support_case(\n    subject: str, \n    communication_body: str, \n    service_code: str,\n    category_code: str\n) -> dict:\n    client: SupportAppClient = boto3.client(\n        \"support-app\",\n        region_name=os.environ.get('AWS_REGION', 'us-east-1'),\n        aws_access_key_id=os.environ.get('AWS_ACCESS_KEY_ID', ''),\n        aws_secret_access_key=os.environ.get('AWS_SECRET_ACCESS_KEY', '')\n    )\n\n    # Example: Defining a request payload with type hints\n    # Note: Replace with actual required parameters for CreateCase API\n    request_payload: CreateCaseRequestRequestTypeDef = {\n        'subject': subject,\n        'communicationBody': communication_body,\n        'serviceCode': service_code,\n        'categoryCode': category_code,\n        'severityCode': 'low',\n        'language': 'en'\n    }\n\n    try:\n        response = client.create_case(**request_payload)\n        print(f\"Successfully created case: {response.get('caseId')}\")\n        return response\n    except Exception as e:\n        print(f\"Error creating case: {e}\")\n        raise\n\n# Example usage (ensure AWS credentials and region are set in environment variables)\n# if __name__ == \"__main__\":\n#     # These values are placeholders and would need to be valid for your AWS account\n#     # For actual usage, retrieve service and category codes from AWS Support documentation\n#     sample_subject = \"My application is experiencing an issue.\"\n#     sample_body = \"Detailed description of the problem and steps to reproduce.\"\n#     sample_service_code = \"amazon-ec2\" # Example, replace with actual support service code\n#     sample_category_code = \"instance-connect\" # Example, replace with actual support category code\n#     \n#     # Uncomment to run the example\n#     # create_support_case(sample_subject, sample_body, sample_service_code, sample_category_code)\n","lang":"python","description":"This quickstart demonstrates how to initialize a typed `SupportAppClient` and make an API call using type-hinted request parameters. The `if TYPE_CHECKING:` guard ensures that type imports are only active during static analysis, preventing runtime dependencies."},"warnings":[{"fix":"Upgrade your Python environment to 3.9 or newer.","message":"As of `mypy-boto3-builder 8.12.0`, Python 3.8 is no longer supported. Projects must use Python 3.9 or higher.","severity":"breaking","affected_versions":"mypy-boto3-builder >= 8.12.0 and dependent packages"},{"fix":"Update your explicit `TypeDef` imports and usage to reflect the new naming conventions. Refer to the `mypy-boto3` documentation or regenerate stubs if using the builder.","message":"Version `8.9.0` of `mypy-boto3-builder` introduced breaking changes to `TypeDef` naming conventions. Argument `TypeDefs` now use shorter names, and conflicting `TypeDef` `Extra` postfixes are moved to the end. This can break existing explicit type annotations in your code.","severity":"breaking","affected_versions":"mypy-boto3-builder >= 8.9.0 and dependent packages"},{"fix":"Encapsulate type imports: `from typing import TYPE_CHECKING\nif TYPE_CHECKING:\n    from mypy_boto3_support_app.client import SupportAppClient`.","message":"Always wrap `mypy-boto3` type imports within an `if TYPE_CHECKING:` block. This prevents the type stub packages from becoming runtime dependencies, keeping your production environment cleaner and lighter.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Install `boto3-stubs-lite[support-app]` instead of the full `boto3-stubs[support-app]` package (`pip install 'boto3-stubs-lite[support-app]'`). This version might require more explicit type annotations.","message":"When using PyCharm, performance issues with `Literal` overloads (`PY-40997`) can occur. It is recommended to use the `boto3-stubs-lite` version if you experience slow performance or high CPU usage.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Add explicit type hints to your `boto3.client` or `session.client` calls.","message":"For optimal type inference and auto-completion, especially in IDEs that might not fully support function overloads (e.g., older VSCode Python extensions), explicitly annotate `boto3.client()` and `boto3.session.client()` calls with the specific client type (e.g., `client: SupportAppClient = boto3.client(\"support-app\")`).","severity":"gotcha","affected_versions":"All versions"},{"fix":"Regularly check `mypy-boto3` release notes for service deprecations or renames and update your imports and installed packages accordingly.","message":"Be aware that AWS service names can change or be deprecated. For example, `sms-voice` was replaced by `pinpoint-sms-voice`. While not specific to 'support-app', this indicates a pattern where service stub packages might be retired or renamed, requiring updates to your dependencies.","severity":"gotcha","affected_versions":"All versions (service-specific)"}],"env_vars":null,"last_verified":"2026-04-11T00:00:00.000Z","next_check":"2026-07-10T00:00:00.000Z"}