{"id":3661,"library":"mypy-boto3-partnercentral-benefits","title":"mypy-boto3-partnercentral-benefits","description":"mypy-boto3-partnercentral-benefits provides comprehensive type annotations for the `boto3` PartnerCentralBenefits service. It enhances development with static type checking and improved autocomplete in IDEs for `boto3` clients, paginators, and specific type definitions. Part of the `mypy-boto3-builder` project, this library is frequently updated to stay synchronized with `boto3` releases. The current version is 1.42.3.","status":"active","version":"1.42.3","language":"python","source_language":"en","source_url":"https://github.com/youtype/mypy_boto3_builder","tags":["mypy","boto3","type-hints","aws","partnercentral-benefits","static-analysis"],"install":[{"cmd":"pip install mypy-boto3-partnercentral-benefits boto3","lang":"bash","label":"Install with boto3"}],"dependencies":[{"reason":"Runtime dependency for the AWS SDK for Python.","package":"boto3"}],"imports":[{"symbol":"PartnerCentralBenefitsClient","correct":"from mypy_boto3_partnercentral_benefits.client import PartnerCentralBenefitsClient"},{"note":"Example for a common TypeDef import. Specific TypeDefs vary by service operation.","symbol":"ListPartnerBenefitsResponseTypeDef","correct":"from mypy_boto3_partnercentral_benefits.type_defs import ListPartnerBenefitsResponseTypeDef"},{"note":"For literal type hints, useful in overloads.","symbol":"PartnerCentralBenefitsServiceName","correct":"from mypy_boto3_partnercentral_benefits.literals import PartnerCentralBenefitsServiceName"}],"quickstart":{"code":"import boto3\nfrom typing import TYPE_CHECKING\n\nif TYPE_CHECKING:\n    from mypy_boto3_partnercentral_benefits.client import PartnerCentralBenefitsClient\n\n\ndef get_benefits_summary():\n    # The stubs provide type hints; boto3 itself performs the AWS API calls.\n    client: PartnerCentralBenefitsClient = boto3.client(\n        \"partnercentral-benefits\",\n        region_name=\"us-east-1\",\n        aws_access_key_id=\"test\", # Replace with actual credentials or env vars\n        aws_secret_access_key=\"test\"\n    )\n\n    try:\n        response = client.list_partner_benefits(MaxResults=10)\n        print(\"Successfully listed partner benefits.\")\n        for benefit in response.get(\"PartnerBenefitSummaries\", []):\n            print(f\"- Benefit ID: {benefit.get('BenefitId')}, Status: {benefit.get('Status')}\")\n    except Exception as e:\n        print(f\"Error listing partner benefits: {e}\")\n\n\nif __name__ == \"__main__\":\n    get_benefits_summary()\n","lang":"python","description":"This example demonstrates how to initialize a `PartnerCentralBenefitsClient` with explicit type annotation, enabling static type checking and IDE autocompletion for its methods and arguments. It then calls `list_partner_benefits` to retrieve and print a summary of benefits. Ensure `boto3` is installed alongside `mypy-boto3-partnercentral-benefits`."},"warnings":[{"fix":"Upgrade your Python environment to 3.9 or higher.","message":"Support for Python 3.8 has been removed in `mypy-boto3-builder` version 8.12.0 and later, affecting all generated `mypy-boto3` stub packages. This package (1.42.3) requires Python 3.9 or newer.","severity":"breaking","affected_versions":">=8.12.0 (mypy-boto3-builder)"},{"fix":"Ensure `mypy` is up-to-date and your build system correctly recognizes PEP 561-compliant `py.typed` packages.","message":"Migration to PEP 561-compliant packages occurred in `mypy-boto3-builder` 8.12.0. While this generally improves type checker discovery, users with highly customized build systems or older `mypy` versions might need to verify compatibility.","severity":"breaking","affected_versions":">=8.12.0 (mypy-boto3-builder)"},{"fix":"Update explicit `TypeDef` imports and references in your code to match the new naming conventions. Refer to the specific service's documentation for exact TypeDef names.","message":"TypeDef naming conventions were changed in `mypy-boto3-builder` 8.9.0. This includes shorter names for packed method arguments (e.g., `CreateDistributionRequestRequestTypeDef` -> `CreateDistributionRequestTypeDef`) and moving 'Extra' postfixes (`CreateDistributionExtraRequestTypeDef` -> `CreateDistributionRequestExtraTypeDef`). Code explicitly importing or referencing these TypeDefs will break.","severity":"breaking","affected_versions":">=8.9.0 (mypy-boto3-builder)"},{"fix":"Always install `boto3` alongside `mypy-boto3-partnercentral-benefits` (e.g., `pip install boto3 mypy-boto3-partnercentral-benefits`).","message":"This package provides only type annotations. `boto3` (the actual AWS SDK for Python) must be installed separately for your code to function at runtime. Ensure `boto3` is installed and its version is compatible with the stubs.","severity":"gotcha","affected_versions":"All"},{"fix":"Consider installing `boto3-stubs-lite[partnercentral-benefits]` if using PyCharm, or configure PyCharm to use an external type checker like `mypy` or `pyright`.","message":"PyCharm users might experience slow performance or high CPU usage due to `Literal` overloads (PyCharm issue PY-40997). The `mypy-boto3` project recommends using `boto3-stubs-lite` packages or disabling PyCharm's type checker and relying on `mypy` or `pyright` instead.","severity":"gotcha","affected_versions":"All, specific to PyCharm IDE"}],"env_vars":null,"search_vec":"'1.42.3':63 'analysi':75 'annot':14 'autocomplet':29 'aw':69 'benefit':5,10,72 'boto3':3,8,17,33,45,57,65 'builder':46 'check':26 'client':34 'comprehens':12 'current':60 'definit':39 'develop':22 'enhanc':21 'frequent':51 'hint':68 'ide':31 'improv':28 'librari':49 'mypi':2,7,44,64 'mypy-boto3-builder':43 'mypy-boto3-partnercentral-benefits':1,6 'pagin':35 'part':40 'partnercentr':4,9,71 'partnercentral-benefit':70 'partnercentralbenefit':18 'project':47 'provid':11 'releas':58 'servic':19 'specif':37 'static':24,74 'static-analysi':73 'stay':54 'synchron':55 'type':13,25,38,67 'type-hint':66 'updat':52 'version':61","created_at":"2026-04-11T17:39:17.667252+00:00","updated_at":"2026-04-16T17:07:27.474052+00:00","problems":{"verify_error":"error: Failed to parse: `mypy-boto3-partnercentral-benefits boto3`\n  Caused by: Expected one of `@`, `(`, `<`, `=`, `>`, `~`, `!`, `;`, found `b`\nmypy-boto3-partnercentral-benefits boto3\n                                   ^"},"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"1.43.0","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_partnercentral_benefits/","changelog":null,"pypi":"https://pypi.org/project/mypy-boto3-partnercentral-benefits/","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-29","next_check":"2026-07-05","install_tag":null}}