{"id":3147,"library":"mypy-boto3-ssm-contacts","title":"mypy-boto3-ssm-contacts","description":"mypy-boto3-ssm-contacts provides comprehensive type annotations for the AWS SSM Contacts service client within the `boto3` library. It enables static type checking with tools like `mypy`, catching potential API misuse or type mismatches at development time for `boto3.client('ssm-contacts')`. This package, currently at version 1.42.3, is part of the `mypy-boto3` ecosystem which generates stubs for all AWS services, updated frequently to mirror `boto3` and AWS API changes, with a rapid release cadence driven by the `mypy-boto3-builder`.","status":"active","version":"1.42.3","language":"en","source_language":"en","source_url":"https://github.com/youtype/mypy_boto3_builder","tags":["aws","boto3","mypy","types","type-hints","ssm-contacts","static-analysis"],"install":[{"cmd":"pip install mypy-boto3-ssm-contacts","lang":"bash","label":"Install specific service stubs"},{"cmd":"pip install mypy-boto3","lang":"bash","label":"Install all boto3 stubs (larger)"}],"dependencies":[{"reason":"This package provides type stubs for boto3; boto3 itself must be installed for your code to run.","package":"boto3","optional":false}],"imports":[{"symbol":"SSMContactsClient","correct":"from mypy_boto3_ssm_contacts.client import SSMContactsClient"},{"symbol":"ListContactsResponseTypeDef","correct":"from mypy_boto3_ssm_contacts.type_defs import ListContactsResponseTypeDef"}],"quickstart":{"code":"import boto3\nfrom mypy_boto3_ssm_contacts.client import SSMContactsClient\nfrom mypy_boto3_ssm_contacts.type_defs import ListContactsResponseTypeDef\nfrom typing import TYPE_CHECKING\n\n# Ensure boto3 is installed: pip install boto3\n\n# Use TYPE_CHECKING guard for runtime performance\nif TYPE_CHECKING:\n    # Annotate the client for type-checking benefits\n    client: SSMContactsClient = boto3.client(\"ssm-contacts\")\nelse:\n    client = boto3.client(\"ssm-contacts\")\n\ntry:\n    # Example usage with type-checked method calls and parameters\n    response: ListContactsResponseTypeDef = client.list_contacts(\n        MaxResults=5\n    )\n    contacts = response.get('Contacts', [])\n    print(f\"Found {len(contacts)} SSM Contacts:\")\n    for contact in contacts:\n        print(f\"  - {contact.get('ContactArn')} (Alias: {contact.get('Alias')})\")\n    \n    next_token = response.get('NextToken')\n    if next_token:\n        print(f\"Next Token: {next_token}\")\n\nexcept Exception as e:\n    print(f\"An error occurred: {e}\")","lang":"python","description":"This quickstart demonstrates how to import and use the `SSMContactsClient` type to annotate your `boto3` client, enabling static type checking for your SSM Contacts operations. It also shows how to import and use specific `TypeDef` objects for response structures."},"warnings":[{"fix":"Upgrade your Python environment to 3.9 or newer.","message":"Python 3.8 support has been removed. `mypy-boto3` packages built with `mypy-boto3-builder` version 8.12.0 or newer no longer support Python 3.8.","severity":"breaking","affected_versions":"mypy-boto3-ssm-contacts versions 1.42.x and above (built with builder >= 8.12.0)"},{"fix":"Ensure your `mypy` installation is up-to-date (`pip install --upgrade mypy`) and your project setup follows standard Python packaging practices for type stubs.","message":"All `mypy-boto3` packages, including `mypy-boto3-ssm-contacts`, migrated to PEP 561 packaging. While this is a standard for type stubs, older `mypy` versions or non-standard project setups might encounter issues.","severity":"breaking","affected_versions":"mypy-boto3-ssm-contacts versions 1.42.x and above (built with builder >= 8.12.0)"},{"fix":"Ensure `pip install boto3` is executed alongside `pip install mypy-boto3-ssm-contacts`.","message":"This package provides only type annotations. For your code to run, you *must* also have the `boto3` library installed in the same environment.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Review and update explicit `TypeDef` imports if they encounter `NameError` after upgrading. Consult the specific service's `type_defs.pyi` for the correct names.","message":"When upgrading from very old versions, be aware that `mypy-boto3-builder` version 8.9.0 introduced breaking changes to how some `TypeDef` names are generated (e.g., shortening names or reordering suffixes to resolve conflicts). Your code might need updates if it directly references these specific type names.","severity":"breaking","affected_versions":"Upgrades from mypy-boto3-ssm-contacts versions built with mypy-boto3-builder < 8.9.0"},{"fix":"Use these types for compile-time checks and development assistance, not for runtime modification or expecting new boto3 functionalities.","message":"This package offers static type information only; it does not alter the runtime behavior of `boto3` or introduce new features. Its purpose is purely for static analysis (e.g., `mypy`) and IDE autocompletion.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-11T00:00:00.000Z","next_check":"2026-07-10T00:00:00.000Z"}