{"id":3704,"library":"mypy-boto3-socialmessaging","title":"mypy-boto3-socialmessaging Type Annotations","description":"Type annotations for the `boto3` AWS SDK's EndUserMessagingSocial service. This library provides static type checking and autocompletion for `boto3` clients and resources related to the Social Messaging service, generated by `mypy-boto3-builder`. It is compatible with various IDEs and static analysis tools like mypy and pyright. The current version is 1.42.28, and it follows a frequent release cadence, often aligning with `boto3` and `botocore` updates.","status":"active","version":"1.42.28","language":"en","source_language":"en","source_url":"https://github.com/youtype/mypy_boto3_builder","tags":["AWS","boto3","type-hinting","mypy","stubs","static-analysis","EndUserMessagingSocial"],"install":[{"cmd":"pip install mypy-boto3-socialmessaging boto3","lang":"bash","label":"Install package and boto3 runtime"}],"dependencies":[{"reason":"Runtime dependency for the AWS SDK functionalities you are type-hinting.","package":"boto3","optional":false},{"reason":"Requires Python 3.9 or higher.","package":"python","optional":false}],"imports":[{"symbol":"EndUserMessagingSocialClient","correct":"from mypy_boto3_socialmessaging.client import EndUserMessagingSocialClient"}],"quickstart":{"code":"import boto3\nfrom mypy_boto3_socialmessaging.client import EndUserMessagingSocialClient\nfrom os import environ\nfrom typing import TYPE_CHECKING\n\n# This example assumes AWS credentials are configured (e.g., via environment variables, ~/.aws/credentials, or IAM roles).\n\nif TYPE_CHECKING:\n    # Only for type checking, not needed at runtime if boto3 is installed\n    from mypy_boto3_socialmessaging.type_defs import GetProfileSnapshotResponseTypeDef\n\ndef get_social_messaging_client() -> EndUserMessagingSocialClient:\n    \"\"\"Returns a type-hinted boto3 SocialMessaging client.\"\"\"\n    region = environ.get(\"AWS_REGION\", \"us-east-1\") # Default region if not set\n    return boto3.client(\"end-user-messaging-social\", region_name=region)\n\n# Example usage:\n# client: EndUserMessagingSocialClient = get_social_messaging_client()\n# try:\n#     # Replace with actual API calls for EndUserMessagingSocial\n#     response: GetProfileSnapshotResponseTypeDef = client.get_profile_snapshot()\n#     print(f\"Successfully retrieved profile snapshot: {response}\")\n# except client.exceptions.ResourceNotFoundException:\n#     print(\"Profile snapshot not found.\")\n# except Exception as e:\n#     print(f\"An error occurred: {e}\")\n\nprint(\"mypy-boto3-socialmessaging stubs are installed and ready for type-hinting!\")\nprint(\"Example client function defined: get_social_messaging_client()\")","lang":"python","description":"This quickstart demonstrates how to obtain and use a type-hinted `boto3` client for the EndUserMessagingSocial service. It shows the correct import for the client and a basic pattern for instantiation. While the example `get_profile_snapshot` is commented out as it requires specific AWS resources, the setup for type-hinting is complete."},"warnings":[{"fix":"Upgrade your Python environment to 3.9 or newer.","message":"Python 3.8 support was explicitly removed in `mypy-boto3-builder` version 8.12.0, which affects all generated stub packages, including `mypy-boto3-socialmessaging`. Users on Python 3.8 will need to upgrade their Python version to 3.9+ to use this library.","severity":"breaking","affected_versions":">=8.12.0"},{"fix":"Review your explicit TypeDef imports and usage, adapting to the new naming conventions documented in `mypy-boto3-builder` releases.","message":"Starting from `mypy-boto3-builder` version 8.9.0, there were breaking changes in TypeDef naming conventions. This includes shorter names for packed method arguments (e.g., `CreateDistributionRequestRequestTypeDef` became `CreateDistributionRequestTypeDef`) and reordering of `Extra` postfixes. If you rely on specific generated TypeDef names, you may need to update your code.","severity":"breaking","affected_versions":">=8.9.0"},{"fix":"Ensure `boto3` is installed in your project environment alongside `mypy-boto3-socialmessaging`.","message":"This package provides *only* type annotations (stubs) for the `boto3` library's `EndUserMessagingSocial` service. It does not include the `boto3` runtime itself. You *must* install the `boto3` library separately for your code to function at runtime (`pip install boto3`).","severity":"gotcha","affected_versions":"all"},{"fix":"Always install `mypy-boto3-socialmessaging` that matches or is close to the `boto3` version you are using, or verify compatibility with the `mypy-boto3-builder` documentation.","message":"The versioning of `mypy-boto3-socialmessaging` (and other `mypy-boto3` ecosystem packages) does not directly correlate with the `boto3` version. It follows independent Python Packaging version specifiers, driven by the `mypy-boto3-builder`, meaning a higher `mypy-boto3-socialmessaging` version doesn't necessarily imply compatibility only with a specific `boto3` version.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-04-11T00:00:00.000Z","next_check":"2026-07-10T00:00:00.000Z"}