Registry / type-stubs / mypy-boto3-connectcampaignsv2

mypy-boto3-connectcampaignsv2

JSON →
library1.43.62pypypi✓ verified 22d ago

mypy-boto3-connectcampaignsv2 provides type annotations for the `boto3` AWS SDK's ConnectCampaignServiceV2. This library enhances developer experience by enabling static type checking with tools like MyPy and providing robust IDE autocompletion for the otherwise dynamically typed `boto3` library. It is currently at version 1.42.45 and is actively maintained with frequent updates tied to `boto3` and `mypy-boto3-builder` releases.

pip install mypy-boto3-connectcampaignsv2 boto3
INSTALL
IMPORT
SIG · MYPY-BOTO3-CONNECT
M
mypy-boto3-connectcampaignsv2
type-stubspythonv1.43.62
Install
3.6s avg
Import
582ms
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.62 · 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.910 runs
installs and imports cleanly · install 0.0s · import 0.608s · 52MB
glibc
py 3.103.910 runs
installs and imports cleanly · install 3.6s · import 0.556s · 52MB
50MB installed
● package 50MB
Code
Verified usage

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

ConnectCampaignServiceV2Client
from mypy_boto3_connectcampaignsv2.client import ConnectCampaignServiceV2Client
from mypy_boto3_connectcampaignsv2 import ConnectCampaignServiceV2Client
Client type is specifically within the 'client' submodule.
ListCampaignsResponseTypeDef
from mypy_boto3_connectcampaignsv2.type_defs import ListCampaignsResponseTypeDef
Type definitions for response objects are crucial for comprehensive type checking.
TYPE_CHECKING
from typing import TYPE_CHECKING if TYPE_CHECKING: from mypy_boto3_connectcampaignsv2.client import ConnectCampaignServiceV2Client
from mypy_boto3_connectcampaignsv2.client import ConnectCampaignServiceV2Client
Imports for type-checking only should be guarded by `if TYPE_CHECKING:` to avoid adding stubs as runtime dependencies.

Demonstrates how to initialize a type-hinted `boto3` client for ConnectCampaignServiceV2 and perform a simple operation (`list_campaigns`). The `if TYPE_CHECKING:` block ensures that the `mypy-boto3` stubs are only used for static analysis and not as a runtime dependency. Ensure AWS credentials are set in your environment for `boto3` to function.

from __future__ import annotations import boto3 import os from typing import TYPE_CHECKING # Guard type-only imports with TYPE_CHECKING if TYPE_CHECKING: from mypy_boto3_connectcampaignsv2.client import ConnectCampaignServiceV2Client from mypy_boto3_connectcampaignsv2.type_defs import ListCampaignsResponseTypeDef def list_all_connect_campaigns() -> ListCampaignsResponseTypeDef: """Lists all Connect Campaigns using type-hinted boto3 client.""" # boto3 client is dynamically typed by default # The type hint from mypy-boto3 provides static analysis capabilities client: ConnectCampaignServiceV2Client = boto3.client( "connectcampaignsv2", region_name=os.environ.get("AWS_REGION", "us-east-1"), aws_access_key_id=os.environ.get("AWS_ACCESS_KEY_ID", ""), aws_secret_access_key=os.environ.get("AWS_SECRET_ACCESS_KEY", "") ) print("Fetching Connect Campaigns...") response: ListCampaignsResponseTypeDef = client.list_campaigns() for campaign in response.get("campaigns", []): print(f" Campaign ID: {campaign.get('id')}, Name: {campaign.get('name')}") print(f"Total campaigns found: {len(response.get('campaigns', []))}") return response if __name__ == "__main__": # This code will run even without mypy-boto3 installed, # but mypy would check its types during static analysis. campaign_data = list_all_connect_campaigns() # You can access typed attributes here, e.g., campaign_data['campaigns']
Debug
Known issues
breakingPython 3.8 support has been removed. `mypy-boto3` packages (including this one) now require Python 3.9 or higher.
fix
Upgrade your Python environment to 3.9 or newer. Ensure your `pyproject.toml` or `setup.cfg` reflects `requires-python >= 3.9`.
affects: mypy-boto3-builder >= 8.12.0
breakingMigration to PEP 561 packages. This is an internal change primarily affecting how Python tools discover stubs.
fix
No direct code change required for users. Ensure your `mypy` or `pyright` configurations are up-to-date and correctly configured to find third-party stubs.
affects: mypy-boto3-builder >= 8.12.0
breakingTypeDef names for packed method arguments were shortened. E.g., `CreateDistributionRequestRequestTypeDef` became `CreateDistributionRequestTypeDef`.
fix
Review and update your import paths and variable annotations for `TypeDef` objects to use the new shorter names.
affects: mypy-boto3-builder >= 8.9.0
gotchaThis package only provides type stubs. You must also install `boto3` (the actual AWS SDK) for your code to run.
fix
Always install `boto3` alongside `mypy-boto3-connectcampaignsv2` (e.g., `pip install boto3 mypy-boto3-connectcampaignsv2`).
affects: All versions
gotchaVersion mismatch between `boto3` and `mypy-boto3-*` can lead to incorrect or missing type hints.
fix
Try to keep `boto3` and `mypy-boto3-*` packages in sync. `pip install mypy-boto3-builder` can generate stubs compatible with your installed `boto3` version locally.
affects: All versions
gotchaOmitting `if TYPE_CHECKING:` for type imports will make `mypy-boto3-connectcampaignsv2` a runtime dependency, which is unnecessary overhead.
fix
Always encapsulate type-only imports within `from typing import TYPE_CHECKING` blocks.
affects: All versions
Upgrade
Version history
1.43.62latest on PyPI · released Jul 31, 2026
Audit
Dependencies
boto3requiredRuntime dependency for interacting with AWS services.
mypyoptionalStatic type checker, the primary use case for these stubs.
Agent activity
29 hits · last 30 days
node
24
Amazon
1
OpenAI (training)
1
Resources
mypy-boto3-connectcampaignsv2 — pip install mypy-boto3-connectcampaignsv2 · libregistry