gituser/docker_multiarch/: mypy-boto3-kafka-1.26.60 metadata and description
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 |
|
| description_content_type | text/markdown |
| keywords | boto3 kafka type-annotations boto3-stubs mypy typeshed autocomplete |
| license | MIT License |
| project_urls |
|
| requires_dist |
|
| requires_python | >=3.7 |
| File | Tox results | History |
|---|---|---|
mypy_boto3_kafka-1.26.60-py3-none-any.whl
|
|
mypy-boto3-kafka

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:

- mypy-boto3-kafka
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
- Install Python extension
- Install Pylance extension
- Set
Pylanceas your Python Language Server - Install
boto3-stubs[kafka]in your environment:
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
- Install
boto3-stubswith services you use in your environment:
python -m pip install 'boto3-stubs[kafka]'
- Install use-package, lsp, company and flycheck packages
- Install lsp-pyright package
(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"))
)
- Make sure emacs uses the environment where you have installed
boto3-stubs
Type checking should now work. No explicit type annotations required, write
your boto3 code as usual.
Sublime Text
- Install
boto3-stubs[kafka]with services you use in your environment:
python -m pip install 'boto3-stubs[kafka]'
- Install LSP-pyright package
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
- Install
mypy:python -m pip install mypy - Install
boto3-stubs[kafka]in your environment:
python -m pip install 'boto3-stubs[kafka]'`
Type checking should now work. No explicit type annotations required, write
your boto3 code as usual.
pyright
- Install
pyright:npm i -g pyright - Install
boto3-stubs[kafka]in your environment:
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:
- All available
boto3services are covered. - Each public class and method of every
boto3service gets valid type annotations extracted from the documentation (blamebotocoredocs if types are incorrect). - Type annotations include up-to-date documentation.
- Link to documentation is provided for every method.
- Code is processed by black and isort for readability.
What's new
Implemented features
- Fully type annotated
boto3,botocoreandaiobotocorelibraries mypy,pyright,VSCode,PyCharm,Sublime TextandEmacscompatibilityClient,ServiceResource,Resource,WaiterPaginatortype annotations for each service- Generated
TypeDefsfor each service - Generated
Literalsfor each service - Auto discovery of types for
boto3.clientandboto3.sessioncalls - Auto discovery of types for
session.clientandsession.sessioncalls - Auto discovery of types for
client.get_waiterandclient.get_paginatorcalls - Auto discovery of types for
ServiceResourceandResourcecollections - Auto discovery of types for
aiobotocore.Session.create_clientcalls
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
- Allie Fitter for boto3-type-annotations, this package is based on top of his work
- black developers for an awesome formatting tool
- Timothy Edmund Crosley for isort and how flexible it is
- mypy developers for doing all dirty work for us
- pyright team for the new era of typed Python
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.