Registry / type-stubs / mypy-boto3-partnercentral-benefits

mypy-boto3-partnercentral-benefits

JSON →
library1.43.0pypypi✓ verified 23d ago

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.

pip install mypy-boto3-partnercentral-benefits boto3
INSTALL
IMPORT
SIG · MYPY-BOTO3-PARTNER
M
mypy-boto3-partnercentral-benefits
type-stubspythonv1.43.0
Install
3.8s avg
Import
572ms
Disk
50MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.43.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.594s · 51.9MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 3.8s · import 0.550s · 52MB
50MB installed
● package 50MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

PartnerCentralBenefitsClient
from mypy_boto3_partnercentral_benefits.client import PartnerCentralBenefitsClient
ListPartnerBenefitsResponseTypeDef
from mypy_boto3_partnercentral_benefits.type_defs import ListPartnerBenefitsResponseTypeDef
Example for a common TypeDef import. Specific TypeDefs vary by service operation.
PartnerCentralBenefitsServiceName
from mypy_boto3_partnercentral_benefits.literals import PartnerCentralBenefitsServiceName
For literal type hints, useful in overloads.

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`.

import boto3 from typing import TYPE_CHECKING if TYPE_CHECKING: from mypy_boto3_partnercentral_benefits.client import PartnerCentralBenefitsClient def get_benefits_summary(): # The stubs provide type hints; boto3 itself performs the AWS API calls. client: PartnerCentralBenefitsClient = boto3.client( "partnercentral-benefits", region_name="us-east-1", aws_access_key_id="test", # Replace with actual credentials or env vars aws_secret_access_key="test" ) try: response = client.list_partner_benefits(MaxResults=10) print("Successfully listed partner benefits.") for benefit in response.get("PartnerBenefitSummaries", []): print(f"- Benefit ID: {benefit.get('BenefitId')}, Status: {benefit.get('Status')}") except Exception as e: print(f"Error listing partner benefits: {e}") if __name__ == "__main__": get_benefits_summary()
Debug
Known issues
breakingSupport 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.
fix
Upgrade your Python environment to 3.9 or higher.
affects: >=8.12.0 (mypy-boto3-builder)
breakingMigration 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.
fix
Ensure `mypy` is up-to-date and your build system correctly recognizes PEP 561-compliant `py.typed` packages.
affects: >=8.12.0 (mypy-boto3-builder)
breakingTypeDef 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.
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.
affects: >=8.9.0 (mypy-boto3-builder)
gotchaThis 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.
fix
Always install `boto3` alongside `mypy-boto3-partnercentral-benefits` (e.g., `pip install boto3 mypy-boto3-partnercentral-benefits`).
affects: All
gotchaPyCharm 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.
fix
Consider installing `boto3-stubs-lite[partnercentral-benefits]` if using PyCharm, or configure PyCharm to use an external type checker like `mypy` or `pyright`.
affects: All, specific to PyCharm IDE
Upgrade
Version history
1.43.0latest on PyPI · released Apr 29, 2026
Audit
Dependencies
boto3requiredRuntime dependency for the AWS SDK for Python.
Agent activity
13 hits · last 30 days
node
10
OpenAI (training)
2
Resources