{"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":"python","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,"search_vec":"'1.42.66':50 'analysi':73 'annot':2,11 'argument':42 'aw':16,62 'boto3':4,15,33,57,61 'botocor':59 'check':27 'common':36 'current':47 'custom':5,69 'customer-profil':68 'customerprofil':21 'enabl':24 'error':38 'frequent':54 'hint':66 'incorrect':41 'librari':8 'like':29 'mypi':30,63 'prevent':35 'profil':6,70 'provid':9 'relat':39 'releas':52 'return':44 'runtim':37 'sdk':17 'servic':22 'specif':18 'static':25,72 'static-analysi':71 'stub':12,67 'synchron':55 'tool':28 'type':1,10,26,45,65 'type-hint':64 'updat':60 'usag':34 'valid':32 'version':48","created_at":"2026-04-11T09:19:40.831472+00:00","updated_at":"2026-04-16T16:52:57.381634+00:00","problems":{"verify_error":"error: Failed to parse: `mypy-boto3-customer-profiles boto3`\n  Caused by: Expected one of `@`, `(`, `<`, `=`, `>`, `~`, `!`, `;`, found `b`\nmypy-boto3-customer-profiles boto3\n                             ^"},"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"1.43.40","cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/youtype/mypy_boto3_builder","docs":"https://youtype.github.io/boto3_stubs_docs/mypy_boto3_customer_profiles/","changelog":null,"pypi":"https://pypi.org/project/mypy-boto3-customer-profiles/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["type-stubs","aws"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-06-28","last_verified":"2026-08-28","next_check":"2026-07-05","install_tag":null}}