Skip to content

Kafka module

Index > Kafka

Auto-generated documentation for Kafka type annotations stubs module types-aiobotocore-kafka.

How to install

From PyPI with pip

Install types-aioboto3 for Kafka service.

# install with aioboto3 type annotations
python -m pip install 'types-aioboto3[kafka]'


# Lite version does not provide session.client/resource overloads
# it is more RAM-friendly, but requires explicit type annotations
python -m pip install 'types-aioboto3-lite[kafka]'


# standalone installation
python -m pip install types-aiobotocore-kafka

How to uninstall

python -m pip uninstall -y types-aiobotocore-kafka

Usage

Code samples can be found in Examples.

KafkaClient

Type annotations and code completion for session.client("kafka") as KafkaClient boto3 documentation

Usage example
from aioboto3.session import Session

from types_aiobotocore_kafka.client import KafkaClient


session = Session()
async with session.client("kafka") as client:
    client: KafkaClient

Paginators

Type annotations and code completion for paginators from session.client("kafka").get_paginator("...").

Usage example
from types_aiobotocore_kafka.paginator import ListClusterOperationsPaginator

def get_list_cluster_operations_paginator() -> ListClusterOperationsPaginator:
    return client.get_paginator("list_cluster_operations"))

Literals

Type annotations for literals used in methods and schema.

Usage example
from types_aiobotocore_kafka.literals import BrokerAZDistributionType

def get_value() -> BrokerAZDistributionType:
    return "DEFAULT"

Typed dictionaries

Type annotations for typed dictionaries used in methods and schema.

Usage example
from types_aiobotocore_kafka.type_defs import BatchAssociateScramSecretRequestRequestTypeDef

def get_value() -> BatchAssociateScramSecretRequestRequestTypeDef:
    return {
        "ClusterArn": ...,
        "SecretArnList": ...,
    }