Type annotations for boto3.Kafka 1.13.26 service, generated by mypy-boto3-buider 2.0.4
Project description
mypy-boto3-kafka
Type annotations for boto3.Kafka 1.13.26 service compatible with mypy, VSCode, PyCharm and other tools.
Generated by mypy-boto3-buider 2.0.4.
More information can be found on boto3-stubs page.
How to use
Make sure you have mypy installed and activated in your IDE.
Install boto3-stubs
for Kafka
service.
python -m pip install boto3-stubs[kafka]
Use boto3
with mypy_boto3_kafka
in your project and enjoy type checking and auto-complete.
import boto3
from mypy_boto3_kafka import KafkaClient
# Now mypy can check if your code is valid.
client: KafkaClient = boto3.client("kafka")
# works for session as well
session = boto3.session.Session(region="us-west-1")
session_client: KafkaClient = session.client("kafka")
# Annotated paginators are included as well
import mypy_boto3_kafka.paginator as kafka_paginators
list_cluster_operations_paginator: kafka_paginators.ListClusterOperationsPaginator = client.get_paginator("list_cluster_operations")
list_clusters_paginator: kafka_paginators.ListClustersPaginator = client.get_paginator("list_clusters")
list_configuration_revisions_paginator: kafka_paginators.ListConfigurationRevisionsPaginator = client.get_paginator("list_configuration_revisions")
list_configurations_paginator: kafka_paginators.ListConfigurationsPaginator = client.get_paginator("list_configurations")
list_kafka_versions_paginator: kafka_paginators.ListKafkaVersionsPaginator = client.get_paginator("list_kafka_versions")
list_nodes_paginator: kafka_paginators.ListNodesPaginator = client.get_paginator("list_nodes")
Dynamic type annotations
mypy_boto3
command generates boto3.client/resource
type annotations for
mypy_boto3_kafka
and other installed services.
# Run this command after you add or remove service packages
python -m mypy_boto3
Generated type annotations provide overloads for boto3.client
and boto3.resource
,
boto3.Session.client
and boto3.Session.resource
functions,
so explicit type annotations are not needed.
mypy
supports function overloads as expectedPyCharm
also supports function overloads, but consumes a lot of RAM, use carefully if you have many services installedVSCode
does not currently support function overloads, use explicit type annotations
import boto3
# Type is discovered correctly by mypy and PyCharm
# VSCode still needs explicit type annotations
client = boto3.client("kafka")
session_client = boto3.Session().client("kafka")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for mypy-boto3-kafka-1.13.26.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | f7002f4ecf30460d7b2d2ac17eace3c6a44a8390fd404d6f193c6febb7b8ea0d |
|
MD5 | 7ac74538a2ea38b38ed1bb713365e17c |
|
BLAKE2b-256 | 4eca36acd475f0d3ce3d79a5417e443ec5355d65473b27a248431dd42a1b105a |
Hashes for mypy_boto3_kafka-1.13.26.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e4d9dee4b31bb3dd3b3b437f1ecef8354cb5a6ab9ace677c48853522ea386816 |
|
MD5 | 58556dc3153407155e097a6989b51996 |
|
BLAKE2b-256 | cdffd20da7b3b32f16d99fb8108eb97d288a6e92750b3d8fde5c04690fc6271a |