{"id":3664,"library":"mypy-boto3-payment-cryptography-data","title":"mypy-boto3-payment-cryptography-data Type Stubs","description":"This package provides type annotations for the `boto3` library's `PaymentCryptographyDataPlane` service. It allows for static type checking of `boto3` client calls and responses using tools like `mypy`. The current version is 1.42.12, generated by `mypy-boto3-builder 8.12.0`, and it's released frequently to keep pace with `boto3` updates and AWS service changes.","status":"active","version":"1.42.12","language":"en","source_language":"en","source_url":"https://github.com/youtype/mypy_boto3_builder","tags":["boto3","aws","type-stubs","mypy","typings","payment-cryptography"],"install":[{"cmd":"pip install mypy-boto3-payment-cryptography-data boto3","lang":"bash","label":"Install with boto3"}],"dependencies":[{"reason":"These are type stubs for boto3; boto3 itself is required for runtime functionality.","package":"boto3"}],"imports":[{"symbol":"PaymentCryptographyDataPlaneClient","correct":"from mypy_boto3_payment_cryptography_data.client import PaymentCryptographyDataPlaneClient"},{"symbol":"ListKeysOutputTypeDef","correct":"from mypy_boto3_payment_cryptography_data.type_defs import ListKeysOutputTypeDef"}],"quickstart":{"code":"import boto3\nfrom mypy_boto3_payment_cryptography_data.client import PaymentCryptographyDataPlaneClient\nfrom mypy_boto3_payment_cryptography_data.type_defs import (\n    ListKeysInputRequestTypeDef,\n    ListKeysOutputTypeDef\n)\nimport os # For accessing environment variables for auth, if needed\n\n# This package provides type stubs for boto3, not the actual client.\n# Ensure boto3 is installed: pip install boto3\n\n# AWS credentials and region should be configured (e.g., via ~/.aws/credentials, environment variables)\n# For example, ensure AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN, AWS_REGION are set or a profile is configured.\n\ndef get_payment_crypto_client() -> PaymentCryptographyDataPlaneClient:\n    \"\"\"Returns a type-hinted PaymentCryptographyDataPlane client.\"\"\"\n    # boto3.client will automatically pick up credentials from environment variables or ~/.aws/credentials\n    return boto3.client(\n        \"payment-cryptography-data\",\n        region_name=os.environ.get(\"AWS_REGION\", \"us-east-1\") # Example: use env var for region\n    )\n\nclient: PaymentCryptographyDataPlaneClient = get_payment_crypto_client()\n\n# Example: List keys (replace with actual logic if needed)\n# This operation requires appropriate IAM permissions (e.g., payment-cryptography:ListKeys)\ntry:\n    request: ListKeysInputRequestTypeDef = {\"MaxResults\": 5}\n    response: ListKeysOutputTypeDef = client.list_keys(**request)\n    print(f\"Successfully called list_keys. Found {len(response.get('Keys', []))} keys.\")\n    if response.get('Keys'):\n        print(f\"First key ARN: {response['Keys'][0]['KeyArn']}\")\n\nexcept Exception as e:\n    print(f\"Error listing keys: {e}\")\n    print(\"\\n--- Troubleshooting ---\")\n    print(\"1. Ensure you have AWS credentials configured (environment variables or ~/.aws/credentials).\")\n    print(\"2. Verify your IAM user/role has 'payment-cryptography:ListKeys' permission.\")\n    print(\"3. Check the AWS region (e.g., 'us-east-1') is correct for your resources.\")\n    print(\"\\nThis quickstart primarily demonstrates type hinting; actual API calls require a valid AWS setup.\")\n","lang":"python","description":"This quickstart demonstrates how to get a type-hinted `boto3` client for Payment Cryptography Data Plane and perform a basic operation, `list_keys`. Remember that `mypy-boto3-*` packages provide only type stubs, so `boto3` must be installed alongside for runtime functionality. Ensure AWS credentials are configured for successful execution."},"warnings":[{"fix":"Upgrade your Python environment to 3.9 or a later version.","message":"Starting with `mypy-boto3-builder` version 8.12.0 (which generated this package), Python 3.8 is no longer supported. Projects using this package must upgrade to Python 3.9 or newer.","severity":"breaking","affected_versions":">=8.12.0 (builder)"},{"fix":"Ensure your `mypy` configuration (e.g., `mypy.ini`) is up-to-date and that your build system correctly recognizes PEP 561 compliant packages.","message":"The `mypy-boto3-builder` migrated to PEP 561 packages in version 8.12.0. This change primarily affects packaging and how type checkers locate stubs. While generally backward compatible, some custom build systems or older `mypy` versions might need configuration adjustments.","severity":"breaking","affected_versions":">=8.12.0 (builder)"},{"fix":"Always install `boto3` (e.g., `pip install boto3 mypy-boto3-payment-cryptography-data`).","message":"These packages (`mypy-boto3-*`) provide *only* type definitions for static analysis. They do not contain any runtime code and must be installed alongside the actual `boto3` library to function correctly.","severity":"gotcha","affected_versions":"all"},{"fix":"Review your code for `import` statements and usage of `*_TypeDef` classes after upgrading to ensure they match the new, potentially shorter names. Refer to the specific package's generated `type_defs.pyi` for exact names.","message":"The `mypy-boto3-builder` version 8.9.0 introduced breaking changes to `TypeDef` naming conventions, simplifying long names (e.g., `CreateDistributionRequestRequestTypeDef` to `CreateDistributionRequestTypeDef`). While this package is for 'payment-cryptography-data', similar changes may apply to its `TypeDef` structures.","severity":"breaking","affected_versions":">=8.9.0 (builder)"},{"fix":"Always use the correct service identifier string: `boto3.client(\"payment-cryptography-data\")`.","message":"When instantiating the client with `boto3.client()`, the service name string `payment-cryptography-data` must be exact. Typographical errors will lead to `UnknownServiceError` at runtime and untyped clients.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-04-11T00:00:00.000Z","next_check":"2026-07-10T00:00:00.000Z"}