Registry /
type-stubs / mypy-boto3-pca-connector-ad
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
muslpy 3.10–3.910 runs
installs and imports cleanly · install 0.0s · import 0.000s · 19.8MB
glibcpy 3.10–3.910 runs
installs and imports cleanly · install 3.3s · import 0.000s · 20MB
18MB installed
● package 18MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
PcaConnectorAdClient
✓ from mypy_boto3_pca_connector_ad import PcaConnectorAdClient
✗ from mypy_boto3_pca_connector_ad import PcaConnectorAdClient
PcaConnectorAdServiceResource
✓ from mypy_boto3_pca_connector_ad import PcaConnectorAdServiceResource
PcaConnectorAdPaginator
✓ from mypy_boto3_pca_connector_ad import PcaConnectorAdPaginator
This quickstart demonstrates how to initialize a `PcaConnectorAdClient` with type annotations and make a basic API call, `list_connectors`. It includes explicit type hints for improved static analysis and a `try-except` block to handle potential authentication or permission errors gracefully, common when running AWS SDK examples without proper setup.
import os
from typing import TYPE_CHECKING
import boto3
from mypy_boto3_pca_connector_ad.client import PcaConnectorAdClient
from mypy_boto3_pca_connector_ad.type_defs import ListConnectorsResponseTypeDef
# The TYPE_CHECKING block is for type checkers and won't be executed at runtime.
# It's good practice for clarity and compatibility with various tooling setups.
if TYPE_CHECKING:
pass
def list_pca_connectors() -> None:
# Initialize a boto3 session. Credentials and region are typically loaded
# from environment variables, ~/.aws/credentials, or IAM roles.
# For a runnable example, we use dummy values if env vars are not set.
session = boto3.Session(
region_name=os.environ.get("AWS_REGION", "us-east-1"),
aws_access_key_id=os.environ.get("AWS_ACCESS_KEY_ID", "DUMMY_KEY"),
aws_secret_access_key=os.environ.get("AWS_SECRET_ACCESS_KEY", "DUMMY_SECRET"),
)
# Explicit type annotation for the client enhances autocompletion and static analysis
client: PcaConnectorAdClient = session.client("pca-connector-ad")
print("Attempting to list PCA Connectors...")
try:
# The response type is inferred by mypy-boto3-pca-connector-ad
response: ListConnectorsResponseTypeDef = client.list_connectors()
connectors = response.get('Connectors', [])
print(f"Found {len(connectors)} connectors.")
for connector in connectors:
print(f" - Connector ARN: {connector.get('Arn')}")
print(f" Type: {connector.get('Type')}, Status: {connector.get('Status')}")
except Exception as e:
print(f"Error listing connectors: {e}")
print("This is expected if AWS credentials or permissions are not configured correctly.")
if __name__ == "__main__":
list_pca_connectors()
Debug
Known issues
breakingAs of `mypy-boto3-builder` version 8.12.0 (which generates `mypy-boto3-pca-connector-ad` 1.42.3), support for Python 3.8 has been removed for all generated packages.fixUpgrade to Python 3.9 or higher. The PyPI metadata for this package explicitly requires `Python >=3.9`.
affects: mypy-boto3-builder >= 8.12.0, mypy-boto3-* >= 1.42.3
breakingStarting with `mypy-boto3-builder` 8.9.0, there were breaking changes to `TypeDef` naming conventions. For example, `CreateDistributionRequestRequestTypeDef` became `CreateDistributionRequestTypeDef`, and `Extra` postfixes moved (`CreateDistributionExtraRequestTypeDef` to `CreateDistributionRequestExtraTypeDef`).fixUpdate explicit `TypeDef` imports and usage in your code to match the new naming conventions.
affects: mypy-boto3-builder >= 8.9.0
gotcha`mypy-boto3-builder` 8.12.0 migrated all generated packages to PEP 561. While this improves standard compatibility, users with highly customized `mypy` configurations or build systems should be aware of potential impacts on how stubs are discovered.fixVerify that your `mypy` configuration and build tooling correctly discover PEP 561-compliant stub packages. Most standard setups should work without issues.
affects: mypy-boto3-builder >= 8.12.0
gotchaWhile `mypy-boto3` aims for implicit type discovery, some IDEs (especially VSCode without specific `mypy` integration) or specific configurations (like `boto3-stubs-lite`) might require explicit type annotations for `boto3.Session().client()` and similar calls to provide full autocompletion and static analysis.fixAdd explicit type annotations, e.g., `client: PcaConnectorAdClient = session.client("pca-connector-ad")`, to ensure consistent type checking across different environments and tools. affects: All versions
gotchaWhen using `typing.TYPE_CHECKING` guards to conditionally import type stubs (e.g., for Pylint compatibility), Pylint might report 'undefined variable' errors for the types within the runtime block.fixTo resolve Pylint complaints, set the stub types to `object` in the non-`TYPE_CHECKING` branch: `if TYPE_CHECKING: from mypy_boto3_ec2 import EC2Client else: EC2Client = object`.
affects: All versions
Upgrade
Version history
1.43.0latest on PyPI · released Apr 29, 2026
Audit
Dependencies
boto3requiredRuntime dependency for the AWS SDK for Python, which these type annotations describe. This stub package is useless without boto3 itself.