{"id":3564,"library":"mypy-boto3-cloudfront-keyvaluestore","title":"mypy-boto3-cloudfront-keyvaluestore Type Annotations","description":"mypy-boto3-cloudfront-keyvaluestore provides type annotations for the boto3 CloudFrontKeyValueStore client, allowing for static type checking with tools like MyPy. It is generated by `mypy-boto3-builder` and its version is synchronized with the corresponding `boto3` and `types-botocore-cloudfront-keyvaluestore` versions. The library receives frequent updates, typically aligning with new boto3 releases and `mypy-boto3-builder` enhancements.","status":"active","version":"1.42.3","language":"en","source_language":"en","source_url":"https://github.com/youtype/mypy_boto3_builder","tags":["aws","boto3","type-hints","mypy","cloudfront","keyvaluestore","dev-tool"],"install":[{"cmd":"pip install mypy-boto3-cloudfront-keyvaluestore","lang":"bash","label":"Install package"}],"dependencies":[{"reason":"Provides the runtime functionality for which these type stubs are generated. The stub version must match your boto3 version.","package":"boto3","optional":false},{"reason":"This package is a direct dependency that provides the underlying botocore type definitions for the service.","package":"types-botocore-cloudfront-keyvaluestore","optional":false}],"imports":[{"symbol":"CloudFrontKeyValueStoreClient","correct":"from mypy_boto3_cloudfront_keyvaluestore.client import CloudFrontKeyValueStoreClient"},{"note":"A top-level alias for the client type is often provided for convenience.","symbol":"Client","correct":"from mypy_boto3_cloudfront_keyvaluestore import Client as CloudFrontKeyValueStoreClient"}],"quickstart":{"code":"import boto3\nfrom mypy_boto3_cloudfront_keyvaluestore.client import CloudFrontKeyValueStoreClient\n\ndef get_key_value_client() -> CloudFrontKeyValueStoreClient:\n    \"\"\"Gets a typed CloudFront KeyValueStore client.\"\"\"\n    client: CloudFrontKeyValueStoreClient = boto3.client(\"cloudfront-keyvaluestore\")\n    return client\n\n# Example usage (requires an AWS setup, e.g., via ~/.aws/credentials)\nif __name__ == \"__main__\":\n    try:\n        cfkvs_client = get_key_value_client()\n        print(f\"Successfully created CloudFront KeyValueStore client: {cfkvs_client.meta.region_name}\")\n        # You can now use cfkvs_client with type hints\n        # For example, to list key value stores (if you have any):\n        # response = cfkvs_client.list_key_value_stores()\n        # print(response)\n    except Exception as e:\n        print(f\"Error creating client: {e}\")","lang":"python","description":"Demonstrates how to import and use the `CloudFrontKeyValueStoreClient` type hint to annotate a boto3 client, enabling static type checking for your CloudFrontKeyValueStore operations."},"warnings":[{"fix":"Upgrade your Python environment to 3.9 or later. If unable to upgrade Python, pin `mypy-boto3-cloudfront-keyvaluestore` to an older version (e.g., <1.42.3) that was built with `mypy-boto3-builder` versions supporting Python 3.8.","message":"Python 3.8 support has been removed since `mypy-boto3-builder` version 8.12.0. If you are using `mypy-boto3-cloudfront-keyvaluestore` version 1.42.3 or newer, your project must use Python 3.9 or higher.","severity":"breaking","affected_versions":">=1.42.3 (aligned with builder >=8.12.0)"},{"fix":"Always install `mypy-boto3-cloudfront-keyvaluestore` with the same major and minor version as your `boto3` package. For example, if you use `boto3==1.42.3`, install `mypy-boto3-cloudfront-keyvaluestore==1.42.3`.","message":"The version of `mypy-boto3-cloudfront-keyvaluestore` must closely match your installed `boto3` version. Mismatched versions can lead to incorrect or missing type hints, causing MyPy errors or silently allowing runtime issues.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Review your code for direct imports or references to `TypeDef` classes from `mypy-boto3` packages after upgrading. Update class names according to the new conventions, often found in the generated `type_defs.pyi` files or release notes.","message":"Starting with `mypy-boto3-builder` version 8.9.0, some TypeDef names were changed to be shorter (e.g., `CreateDistributionRequestRequestTypeDef` became `CreateDistributionRequestTypeDef`) and conflicting `Extra` postfixes were reordered. While this specific service might not be directly affected, be aware of potential TypeDef renaming if migrating existing code using `mypy-boto3`.","severity":"breaking","affected_versions":"Generated packages from builder >=8.9.0"},{"fix":"For editable installs, ensure `pyproject.toml` or `setup.py` correctly declares the package as `py.typed`. If `mypy` has trouble finding stubs, verify your `mypy` configuration (`mypy.ini`) and environment variables (`MYPYPATH`).","message":"Beginning with `mypy-boto3-builder` version 8.12.0, all generated packages migrated to PEP 561. This change is generally beneficial but might require ensuring your build system or `mypy` configuration correctly discovers the stubs, especially in complex project setups or when using `pip install -e .` (editable installs).","severity":"gotcha","affected_versions":">=1.42.3 (aligned with builder >=8.12.0)"}],"env_vars":null,"last_verified":"2026-04-11T00:00:00.000Z","next_check":"2026-07-10T00:00:00.000Z"}