{"id":3068,"library":"mypy-boto3-customer-profiles","title":"Type annotations for boto3 Customer Profiles","description":"This library provides type annotations (stubs) for the `boto3` AWS SDK, specifically for the CustomerProfiles service. It enables static type checking tools like Mypy to validate `boto3` usage, preventing common runtime errors related to incorrect arguments or return types. The current version is 1.42.66, and releases are frequent, synchronized with `boto3` and `botocore` updates.","status":"active","version":"1.42.66","language":"en","source_language":"en","source_url":"https://github.com/youtype/mypy_boto3_builder","tags":["boto3","aws","mypy","type-hints","stubs","customer-profiles","static-analysis"],"install":[{"cmd":"pip install mypy-boto3-customer-profiles boto3","lang":"bash","label":"Install with boto3"},{"cmd":"pip install mypy-boto3-customer-profiles","lang":"bash","label":"Install stubs only"}],"dependencies":[{"reason":"Required for runtime execution; this package provides type stubs for boto3's API.","package":"boto3","optional":false},{"reason":"May be a dependency for specific type features or older Python versions, though typically not needed for Python 3.9+ due to PEP 585/604.","package":"typing-extensions","optional":true}],"imports":[{"note":"Client types are nested under the 'client' submodule.","wrong":"from mypy_boto3_customer_profiles import CustomerProfilesClient","symbol":"CustomerProfilesClient","correct":"from mypy_boto3_customer_profiles.client import CustomerProfilesClient"},{"note":"Type definitions (like input/output shapes) are nested under the 'type_defs' submodule.","wrong":"from mypy_boto3_customer_profiles import ListDomainsOutputTypeDef","symbol":"ListDomainsOutputTypeDef","correct":"from mypy_boto3_customer_profiles.type_defs import ListDomainsOutputTypeDef"}],"quickstart":{"code":"import boto3\nfrom mypy_boto3_customer_profiles.client import CustomerProfilesClient\nfrom mypy_boto3_customer_profiles.type_defs import ListDomainsOutputTypeDef\n\n# Initialize a boto3 client with type hints\nclient: CustomerProfilesClient = boto3.client(\"customer-profiles\", region_name=\"us-east-1\")\n\n# Example operation: List Customer Profiles domains\ntry:\n    print(\"Listing Customer Profiles domains...\")\n    # The response object will be typed as ListDomainsOutputTypeDef\n    response: ListDomainsOutputTypeDef = client.list_domains()\n    for domain in response.get(\"DomainList\", []):\n        print(f\"  Domain ARN: {domain.get('DomainArn')}, Name: {domain.get('DomainName')}\")\n    print(\"Successfully listed domains.\")\nexcept Exception as e:\n    print(f\"Error listing domains: {e}\")\n\n# Example of creating a new profile (requires appropriate permissions)\n# profile_data = {\n#     \"DomainName\": \"your_domain_name\",\n#     \"FirstName\": \"John\",\n#     \"LastName\": \"Doe\",\n#     \"EmailAddress\": \"john.doe@example.com\"\n# }\n# try:\n#     # You would use a specific type definition for the input here, e.g., CreateProfileRequestRequestTypeDef\n#     # client.create_profile(**profile_data)\n#     print(\"Profile creation commented out, uncomment to run.\")\n# except client.exceptions.ResourceNotFoundException:\n#     print(\"Domain not found. Ensure 'your_domain_name' exists.\")\n# except Exception as e:\n#     print(f\"Error creating profile: {e}\")\n","lang":"python","description":"This quickstart demonstrates how to initialize a `boto3` Customer Profiles client with `mypy-boto3` type annotations and perform a basic operation like listing domains. It shows the correct import paths for client types and type definitions, allowing Mypy to provide comprehensive static analysis for your `boto3` calls."},"warnings":[{"fix":"Ensure `boto3` is included in your project's dependencies alongside `mypy-boto3-customer-profiles`.","message":"This package provides *only* type stubs. You must install `boto3` separately (e.g., `pip install boto3`) for your code to run at runtime. `mypy-boto3-customer-profiles` is only for static analysis.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Upgrade your Python environment to 3.9 or newer.","message":"Python 3.8 is no longer supported. This project now requires Python >=3.9 for all packages.","severity":"breaking","affected_versions":"8.12.0 and newer"},{"fix":"Ensure your Mypy configuration is up-to-date. Mypy should automatically find the stubs without special `MYPYPATH` settings.","message":"Packages migrated to PEP 561. This change improves how type checkers discover stubs but might require updates if you had custom Mypy configurations or explicit stub paths.","severity":"breaking","affected_versions":"8.12.0 and newer"},{"fix":"Consult the specific `mypy-boto3` service documentation or release notes if you encounter `NameError` or type mismatch issues with complex TypeDefs after upgrading.","message":"Type definition names have changed in some cases (e.g., `CreateDistributionRequestRequestTypeDef` to `CreateDistributionRequestTypeDef`), and `Extra` postfixes were reordered. While `customer-profiles` might not be heavily impacted, be aware of potential breaking changes to TypeDef names.","severity":"gotcha","affected_versions":"8.9.0 and newer"},{"fix":"Always check release notes for specific service changes. If migrating to a new AWS service or if a service appears missing, verify its official `boto3` name.","message":"The `sms-voice` service was removed and replaced by `pinpoint-sms-voice` in version 8.11.0. While not directly affecting `customer-profiles`, this highlights a pattern where AWS service names/support can change, leading to breaking changes in generated stubs.","severity":"gotcha","affected_versions":"8.11.0 and newer (for affected services)"}],"env_vars":null,"last_verified":"2026-04-11T00:00:00.000Z","next_check":"2026-07-10T00:00:00.000Z"}