{"id":3603,"library":"mypy-boto3-kafkaconnect","title":"mypy-boto3-kafkaconnect","description":"mypy-boto3-kafkaconnect provides type annotations for the boto3 AWS KafkaConnect service, generated by mypy-boto3-builder. It aims to offer full type-hinting support for `boto3` clients, resources, and paginators. The current version is 1.42.47, and releases are frequent, typically in sync with `boto3` updates and `mypy-boto3-builder` enhancements.","status":"active","version":"1.42.47","language":"en","source_language":"en","source_url":"https://github.com/youtype/mypy_boto3_builder","tags":["boto3","aws","typing","mypy","kafkaconnect","type-hints"],"install":[{"cmd":"pip install mypy-boto3-kafkaconnect","lang":"bash","label":"Install service stubs"},{"cmd":"pip install boto3","lang":"bash","label":"Install boto3 (runtime dependency)"}],"dependencies":[{"reason":"Provides the underlying AWS SDK for Python that these stubs type-check.","package":"boto3"}],"imports":[{"note":"The client type is provided by the `mypy-boto3` stub package, not directly from `boto3` itself.","wrong":"from boto3.client import KafkaConnectClient","symbol":"KafkaConnectClient","correct":"from mypy_boto3_kafkaconnect import KafkaConnectClient"}],"quickstart":{"code":"import boto3\nfrom mypy_boto3_kafkaconnect import KafkaConnectClient\nfrom typing import TYPE_CHECKING\n\nif TYPE_CHECKING:\n    # This block is only for type checking, not for runtime\n    client: KafkaConnectClient = boto3.client(\"kafkaconnect\")\n    # Example method call with type hints\n    response = client.list_custom_plugins()\n    print(f\"Custom plugins: {response.get('customPlugins')}\")\nelse:\n    # Runtime code without specific type hints\n    client = boto3.client(\"kafkaconnect\")\n    response = client.list_custom_plugins()\n    print(f\"Custom plugins: {response.get('customPlugins')}\")\n\n# To verify the type hints with mypy:\n# 1. Save this code as 'app.py'\n# 2. Run: mypy app.py","lang":"python","description":"This example demonstrates how to use `mypy-boto3-kafkaconnect` to provide type hints for your `boto3` KafkaConnect client. The `TYPE_CHECKING` block is crucial for mypy to apply the custom types without affecting runtime behavior. You still instantiate the client using `boto3.client('kafkaconnect')`."},"warnings":[{"fix":"Upgrade your Python environment to 3.9 or higher. For older Python versions, use an older `mypy-boto3-kafkaconnect` version.","message":"Support for Python 3.8 was removed in `mypy-boto3-builder` version 8.12.0. If you are using `mypy-boto3-kafkaconnect` with Python 3.8, you must upgrade your Python version to 3.9 or newer.","severity":"breaking","affected_versions":"mypy-boto3-builder 8.12.0+ (affecting mypy-boto3-kafkaconnect versions built with it)"},{"fix":"Ensure both `pip install boto3` and `pip install mypy-boto3-kafkaconnect` are executed in your environment.","message":"`mypy-boto3-kafkaconnect` provides *type annotations* only. It is not a runtime replacement for `boto3`. You must install both `boto3` and the `mypy-boto3-kafkaconnect` package to use these type hints effectively.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Review your code for any direct references to TypeDef names if you've updated from an older `mypy-boto3-builder` version's output and adjust names accordingly, or consult the generated stub files.","message":"Version 8.9.0 of `mypy-boto3-builder` introduced breaking changes in TypeDef naming conventions (e.g., `CreateDistributionRequestRequestTypeDef` became `CreateDistributionRequestTypeDef`). This affects specific TypeDef names across all generated service packages.","severity":"breaking","affected_versions":"mypy-boto3-builder 8.9.0+ (affecting mypy-boto3-kafkaconnect versions built with it)"},{"fix":"Regularly update both `boto3` and `mypy-boto3-kafkaconnect` to their latest compatible versions. Use `pip install --upgrade boto3 mypy-boto3-kafkaconnect`.","message":"For optimal type checking, keep your `mypy-boto3-kafkaconnect` version in sync with your `boto3` version. Discrepancies can lead to incorrect type hints if the underlying `boto3` API changes without a corresponding update in the stubs.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-11T00:00:00.000Z","next_check":"2026-07-10T00:00:00.000Z"}