Type annotations for boto3.Kafka 1.14.0 service, generated by mypy-boto3-buider 2.0.4
Project description
mypy-boto3-kafka
Type annotations for boto3.Kafka 1.14.0 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.14.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 72a3bd62f450b9d7bd62bf39f496e516640f69fcf4564296cddea75d47269684 |
|
MD5 | 04365e7b51cb018c3d4818cb48bdf3fd |
|
BLAKE2b-256 | a9ae4a2d69b037a149dcd753e353c41258dd0904681351771c02078178b1ffb8 |
Hashes for mypy_boto3_kafka-1.14.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cd4a2dafabfd59ab52cecb2e049faddb0f8c95b46e8ded2a2091c95c7da473c2 |
|
MD5 | ad2663321758b9af0b2f602d27432578 |
|
BLAKE2b-256 | 78d57b176fb9f183b9017b9dc81ec23fb56124256271c7fbbedc968df0b6659c |