mypy-boto3-verifiedpermissions type stubs
mypy-boto3-verifiedpermissions provides type annotations for the boto3 VerifiedPermissions service. It is part of the `mypy-boto3-builder` ecosystem, which generates type stubs for all boto3 services. The current version is 1.42.73, and releases are frequent, aligning with boto3 and AWS service updates, typically several times a month.
Warnings
- breaking Python 3.8 support has been removed. All `mypy-boto3` packages now require Python 3.9 or newer.
- breaking TypeDef names for method arguments (e.g., `CreateDistributionRequestRequestTypeDef`) were shortened, and conflicting TypeDef `Extra` postfixes were reordered. This might break direct imports or references to these specific TypeDefs.
- gotcha This package provides only type stubs; it does not include `boto3` itself. `boto3` must be installed separately for your application to function at runtime.
- deprecated While not directly affecting `verifiedpermissions`, the `sms-voice` service stub was removed and replaced by `pinpoint-sms-voice` (as of builder v8.11.0). Be aware that other AWS service names or structures might change in future `mypy-boto3-builder` updates.
Install
-
pip install mypy-boto3-verifiedpermissions boto3
Imports
- VerifiedPermissionsClient
from mypy_boto3_verifiedpermissions import VerifiedPermissionsClient
- PolicyStoreItemTypeDef
from mypy_boto3_verifiedpermissions.type_defs import PolicyStoreItemTypeDef
Quickstart
import boto3
from mypy_boto3_verifiedpermissions import VerifiedPermissionsClient
# Ensure boto3 is configured, e.g., via AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, etc.
# or an AWS credentials file.
# For a runnable example, we'll use a dummy client call that won't require real auth if the service is not used.
client: VerifiedPermissionsClient = boto3.client("verifiedpermissions")
try:
# Example: Listing policy stores. This call requires actual AWS credentials and permissions.
response = client.list_policy_stores()
print(f"Successfully listed policy stores: {response.get('PolicyStores', [])}")
except Exception as e:
print(f"Could not list policy stores (this is expected without proper AWS configuration or permissions): {e}")