gituser/docker_multiarch/: mypy-boto3-kafka-1.26.60 metadata and description

Homepage Simple index

Type annotations for boto3.Kafka 1.26.60 service generated with mypy-boto3-builder 7.12.3

author Vlad Emelianov
author_email vlad.emelianov.nz@gmail.com
classifiers
  • Development Status :: 5 - Production/Stable
  • Intended Audience :: Developers
  • Environment :: Console
  • License :: OSI Approved :: MIT License
  • Natural Language :: English
  • Operating System :: OS Independent
  • Programming Language :: Python :: 3
  • Programming Language :: Python :: 3.7
  • Programming Language :: Python :: 3.8
  • Programming Language :: Python :: 3.9
  • Programming Language :: Python :: 3.10
  • Programming Language :: Python :: 3.11
  • Programming Language :: Python :: 3.12
  • Programming Language :: Python :: 3 :: Only
  • Programming Language :: Python :: Implementation :: CPython
  • Typing :: Typed
description_content_type text/markdown
keywords boto3 kafka type-annotations boto3-stubs mypy typeshed autocomplete
license MIT License
project_urls
  • Documentation, https://youtype.github.io/boto3_stubs_docs/mypy_boto3_kafka/
  • Source, https://github.com/youtype/mypy_boto3_builder
  • Tracker, https://github.com/youtype/mypy_boto3_builder/issues
requires_dist
  • typing-extensions (>=4.1.0)
requires_python >=3.7
File Tox results History
mypy_boto3_kafka-1.26.60-py3-none-any.whl
Size
33 KB
Type
Python Wheel
Python
3

mypy-boto3-kafka

PyPI - mypy-boto3-kafka PyPI - Python Version Docs PyPI - Downloads

boto3.typed

Type annotations for boto3.Kafka 1.26.60 service compatible with VSCode, PyCharm, Emacs, Sublime Text, mypy, pyright and other tools.

Generated by mypy-boto3-builder 7.12.3.

More information can be found on boto3-stubs page and in mypy-boto3-kafka docs.

See how it helps to find and fix potential bugs:

boto3-stubs demo

How to install

VSCode extension

Add AWS Boto3 extension to your VSCode and run AWS boto3: Quick Start command.

Click Modify and select boto3 common and Kafka.

From PyPI with pip

Install boto3-stubs for Kafka service.

# install with boto3 type annotations
python -m pip install 'boto3-stubs[kafka]'


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


# standalone installation
python -m pip install mypy-boto3-kafka

How to uninstall

python -m pip uninstall -y mypy-boto3-kafka

Usage

VSCode

python -m pip install 'boto3-stubs[kafka]'

Both type checking and code completion should now work. No explicit type annotations required, write your boto3 code as usual.

PyCharm

Install boto3-stubs-lite[kafka] in your environment:

python -m pip install 'boto3-stubs-lite[kafka]'`

Both type checking and code completion should now work. Explicit type annotations are required.

Use boto3-stubs package instead for implicit type discovery.

Emacs

python -m pip install 'boto3-stubs[kafka]'
(use-package lsp-pyright
  :ensure t
  :hook (python-mode . (lambda ()
                          (require 'lsp-pyright)
                          (lsp)))  ; or lsp-deferred
  :init (when (executable-find "python3")
          (setq lsp-pyright-python-executable-cmd "python3"))
  )

Type checking should now work. No explicit type annotations required, write your boto3 code as usual.

Sublime Text

python -m pip install 'boto3-stubs[kafka]'

Type checking should now work. No explicit type annotations required, write your boto3 code as usual.

Other IDEs

Not tested, but as long as your IDE supports mypy or pyright, everything should work.

mypy

python -m pip install 'boto3-stubs[kafka]'`

Type checking should now work. No explicit type annotations required, write your boto3 code as usual.

pyright

python -m pip install 'boto3-stubs[kafka]'

Optionally, you can install boto3-stubs to typings folder.

Type checking should now work. No explicit type annotations required, write your boto3 code as usual.

Explicit type annotations

Client annotations

KafkaClient provides annotations for boto3.client("kafka").

from boto3.session import Session

from mypy_boto3_kafka import KafkaClient

client: KafkaClient = Session().client("kafka")

# now client usage is checked by mypy and IDE should provide code completion

Paginators annotations

mypy_boto3_kafka.paginator module contains type annotations for all paginators.

from boto3.session import Session

from mypy_boto3_kafka import KafkaClient
from mypy_boto3_kafka.paginator import (
    ListClusterOperationsPaginator,
    ListClustersPaginator,
    ListClustersV2Paginator,
    ListConfigurationRevisionsPaginator,
    ListConfigurationsPaginator,
    ListKafkaVersionsPaginator,
    ListNodesPaginator,
    ListScramSecretsPaginator,
)

client: KafkaClient = Session().client("kafka")

# Explicit type annotations are optional here
# Types should be correctly discovered by mypy and IDEs
list_cluster_operations_paginator: ListClusterOperationsPaginator = client.get_paginator(
    "list_cluster_operations"
)
list_clusters_paginator: ListClustersPaginator = client.get_paginator("list_clusters")
list_clusters_v2_paginator: ListClustersV2Paginator = client.get_paginator("list_clusters_v2")
list_configuration_revisions_paginator: ListConfigurationRevisionsPaginator = client.get_paginator(
    "list_configuration_revisions"
)
list_configurations_paginator: ListConfigurationsPaginator = client.get_paginator(
    "list_configurations"
)
list_kafka_versions_paginator: ListKafkaVersionsPaginator = client.get_paginator(
    "list_kafka_versions"
)
list_nodes_paginator: ListNodesPaginator = client.get_paginator("list_nodes")
list_scram_secrets_paginator: ListScramSecretsPaginator = client.get_paginator("list_scram_secrets")

Literals

mypy_boto3_kafka.literals module contains literals extracted from shapes that can be used in user code for type checking.

from mypy_boto3_kafka.literals import (
    BrokerAZDistributionType,
    ClientBrokerType,
    ClusterStateType,
    ClusterTypeType,
    ConfigurationStateType,
    EnhancedMonitoringType,
    KafkaVersionStatusType,
    ListClusterOperationsPaginatorName,
    ListClustersPaginatorName,
    ListClustersV2PaginatorName,
    ListConfigurationRevisionsPaginatorName,
    ListConfigurationsPaginatorName,
    ListKafkaVersionsPaginatorName,
    ListNodesPaginatorName,
    ListScramSecretsPaginatorName,
    NodeTypeType,
    StorageModeType,
    KafkaServiceName,
    ServiceName,
    ResourceServiceName,
    PaginatorName,
    RegionName,
)


def check_value(value: BrokerAZDistributionType) -> bool:
    ...

Typed dictionaries

mypy_boto3_kafka.type_defs module contains structures and shapes assembled to typed dictionaries for additional type checking.

from mypy_boto3_kafka.type_defs import (
    BatchAssociateScramSecretRequestRequestTypeDef,
    ResponseMetadataTypeDef,
    UnprocessedScramSecretTypeDef,
    BatchDisassociateScramSecretRequestRequestTypeDef,
    ProvisionedThroughputTypeDef,
    CloudWatchLogsTypeDef,
    FirehoseTypeDef,
    S3TypeDef,
    BrokerSoftwareInfoTypeDef,
    TlsTypeDef,
    UnauthenticatedTypeDef,
    StateInfoTypeDef,
    ErrorInfoTypeDef,
    ClusterOperationStepInfoTypeDef,
    CompatibleKafkaVersionTypeDef,
    ConfigurationInfoTypeDef,
    ConfigurationRevisionTypeDef,
    PublicAccessTypeDef,
    CreateConfigurationRequestRequestTypeDef,
    DeleteClusterRequestRequestTypeDef,
    DeleteConfigurationRequestRequestTypeDef,
    DescribeClusterOperationRequestRequestTypeDef,
    DescribeClusterRequestRequestTypeDef,
    DescribeClusterV2RequestRequestTypeDef,
    DescribeConfigurationRequestRequestTypeDef,
    DescribeConfigurationRevisionRequestRequestTypeDef,
    EncryptionAtRestTypeDef,
    EncryptionInTransitTypeDef,
    GetBootstrapBrokersRequestRequestTypeDef,
    GetCompatibleKafkaVersionsRequestRequestTypeDef,
    IamTypeDef,
    JmxExporterInfoTypeDef,
    JmxExporterTypeDef,
    KafkaVersionTypeDef,
    PaginatorConfigTypeDef,
    ListClusterOperationsRequestRequestTypeDef,
    ListClustersRequestRequestTypeDef,
    ListClustersV2RequestRequestTypeDef,
    ListConfigurationRevisionsRequestRequestTypeDef,
    ListConfigurationsRequestRequestTypeDef,
    ListKafkaVersionsRequestRequestTypeDef,
    ListNodesRequestRequestTypeDef,
    ListScramSecretsRequestRequestTypeDef,
    ListTagsForResourceRequestRequestTypeDef,
    NodeExporterInfoTypeDef,
    NodeExporterTypeDef,
    ZookeeperNodeInfoTypeDef,
    RebootBrokerRequestRequestTypeDef,
    ScramTypeDef,
    VpcConfigTypeDef,
    TagResourceRequestRequestTypeDef,
    UntagResourceRequestRequestTypeDef,
    UpdateBrokerCountRequestRequestTypeDef,
    UpdateBrokerTypeRequestRequestTypeDef,
    UpdateConfigurationRequestRequestTypeDef,
    CreateClusterResponseTypeDef,
    CreateClusterV2ResponseTypeDef,
    DeleteClusterResponseTypeDef,
    DeleteConfigurationResponseTypeDef,
    DescribeConfigurationRevisionResponseTypeDef,
    EmptyResponseMetadataTypeDef,
    GetBootstrapBrokersResponseTypeDef,
    ListScramSecretsResponseTypeDef,
    ListTagsForResourceResponseTypeDef,
    RebootBrokerResponseTypeDef,
    UpdateBrokerCountResponseTypeDef,
    UpdateBrokerStorageResponseTypeDef,
    UpdateBrokerTypeResponseTypeDef,
    UpdateClusterConfigurationResponseTypeDef,
    UpdateClusterKafkaVersionResponseTypeDef,
    UpdateConnectivityResponseTypeDef,
    UpdateMonitoringResponseTypeDef,
    UpdateSecurityResponseTypeDef,
    UpdateStorageResponseTypeDef,
    BatchAssociateScramSecretResponseTypeDef,
    BatchDisassociateScramSecretResponseTypeDef,
    BrokerEBSVolumeInfoTypeDef,
    EBSStorageInfoTypeDef,
    UpdateStorageRequestRequestTypeDef,
    BrokerLogsTypeDef,
    BrokerNodeInfoTypeDef,
    ClusterOperationStepTypeDef,
    GetCompatibleKafkaVersionsResponseTypeDef,
    UpdateClusterConfigurationRequestRequestTypeDef,
    UpdateClusterKafkaVersionRequestRequestTypeDef,
    ConfigurationTypeDef,
    CreateConfigurationResponseTypeDef,
    DescribeConfigurationResponseTypeDef,
    ListConfigurationRevisionsResponseTypeDef,
    UpdateConfigurationResponseTypeDef,
    ConnectivityInfoTypeDef,
    EncryptionInfoTypeDef,
    ServerlessSaslTypeDef,
    ListKafkaVersionsResponseTypeDef,
    ListClusterOperationsRequestListClusterOperationsPaginateTypeDef,
    ListClustersRequestListClustersPaginateTypeDef,
    ListClustersV2RequestListClustersV2PaginateTypeDef,
    ListConfigurationRevisionsRequestListConfigurationRevisionsPaginateTypeDef,
    ListConfigurationsRequestListConfigurationsPaginateTypeDef,
    ListKafkaVersionsRequestListKafkaVersionsPaginateTypeDef,
    ListNodesRequestListNodesPaginateTypeDef,
    ListScramSecretsRequestListScramSecretsPaginateTypeDef,
    PrometheusInfoTypeDef,
    PrometheusTypeDef,
    SaslTypeDef,
    UpdateBrokerStorageRequestRequestTypeDef,
    StorageInfoTypeDef,
    LoggingInfoTypeDef,
    NodeInfoTypeDef,
    ListConfigurationsResponseTypeDef,
    UpdateConnectivityRequestRequestTypeDef,
    ServerlessClientAuthenticationTypeDef,
    OpenMonitoringInfoTypeDef,
    OpenMonitoringTypeDef,
    ClientAuthenticationTypeDef,
    BrokerNodeGroupInfoTypeDef,
    ListNodesResponseTypeDef,
    ServerlessRequestTypeDef,
    ServerlessTypeDef,
    UpdateMonitoringRequestRequestTypeDef,
    MutableClusterInfoTypeDef,
    UpdateSecurityRequestRequestTypeDef,
    ClusterInfoTypeDef,
    CreateClusterRequestRequestTypeDef,
    ProvisionedRequestTypeDef,
    ProvisionedTypeDef,
    ClusterOperationInfoTypeDef,
    DescribeClusterResponseTypeDef,
    ListClustersResponseTypeDef,
    CreateClusterV2RequestRequestTypeDef,
    ClusterTypeDef,
    DescribeClusterOperationResponseTypeDef,
    ListClusterOperationsResponseTypeDef,
    DescribeClusterV2ResponseTypeDef,
    ListClustersV2ResponseTypeDef,
)


def get_structure() -> BatchAssociateScramSecretRequestRequestTypeDef:
    return {...}

How it works

Fully automated mypy-boto3-builder carefully generates type annotations for each service, patiently waiting for boto3 updates. It delivers a drop-in type annotations for you and makes sure that:

What's new

Implemented features

Latest changes

Builder changelog can be found in Releases.

Versioning

mypy-boto3-kafka version is the same as related boto3 version and follows PEP 440 format.

Thank you

Documentation

All services type annotations can be found in boto3 docs

Support and contributing

This package is auto-generated. Please reports any bugs or request new features in mypy-boto3-builder repository.