confluent-kafka-stubs
Stub files for confluent-kafka.
Decision gist · record as of 2026-08-14
Yes, if you need type checking for confluent-kafka and can tolerate incomplete coverage. The low install friction and permissive license make it a low-risk addition to a type-checking workflow. However, the abandoned status and 1159-day gap since the last release mean you should verify that the stubs remain compatible with your confluent-kafka version and accept that some modules and classes may lack type hints.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.11 or later; confluent-kafka must be installed separately for the stubs to be useful.
- Installation is straightforward with no runtime dependencies.
- However, the package is abandoned—last release was 1159 days ago—and marked as a work in progress with incomplete type coverage.
License · maintenance · safety
Apache-2.0 (permissive) — Licensed under Apache-2.0 (permissive), so you can use it freely in commercial and open-source projects without significant restrictions.
last release 2023-06-12 (1159 days)
0 known vulnerabilities (OSV.dev, 2026-08-14) · 1,173,132 downloads/mo, #4,267 on PyPI
Alternatives
Verify before relying
pip install confluent-kafka-stubs
# In your Python code with mypy enabled:
from confluent_kafka import Producer
producer: Producer = Producer({})- Whether type coverage has improved or regressed since the last release
- Whether the stubs remain compatible with recent confluent-kafka versions
- Whether _AdminClientImpl and unlisted modules have been typed in practice by users
What it is and what it does
confluent-kafka-stubs is a type-stub-only package that adds Python type hints to the confluent-kafka library. It contains no runtime code—only .pyi stub files—and is designed to be installed alongside confluent-kafka so that type checkers like mypy and language servers can understand the types in confluent-kafka's API.
The package covers core classes and functions in the cimpl module (KafkaError, KafkaException, Message, Producer, Consumer, and others) but is explicitly incomplete. The maintainer notes it as a work in progress, and the project has not been updated since its initial release. It requires Python 3.11 or later and is not officially endorsed by Confluent.
Use it for
- Enable mypy type checking on code that uses confluent-kafka producers and consumers
- Get IDE autocompletion and type hints for confluent-kafka classes like Producer and Consumer
- Catch type errors in Kafka client code during development rather than at runtime
- Improve code documentation and maintainability by making confluent-kafka's API types explicit
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need type checking for confluent-kafka and can tolerate incomplete coverage.
The low install friction and permissive license make it a low-risk addition to a type-checking workflow. However, the abandoned status and 1159-day gap since the last release mean you should verify that the stubs remain compatible with your confluent-kafka version and accept that some modules and classes may lack type hints.
Install
confluent-kafka-stubs on PyPI
Before you install
Installation is straightforward with no runtime dependencies. However, the package is abandoned—last release was 1159 days ago—and marked as a work in progress with incomplete type coverage.
Requires Python 3.11 or later; confluent-kafka must be installed separately for the stubs to be useful.
License in practice
Licensed under Apache-2.0 (permissive), so you can use it freely in commercial and open-source projects without significant restrictions.
Quickstart
pip install confluent-kafka-stubs
# In your Python code with mypy enabled:
from confluent_kafka import Producer
producer: Producer = Producer({})
Verify before relying
- Whether type coverage has improved or regressed since the last release
- Whether the stubs remain compatible with recent confluent-kafka versions
- Whether _AdminClientImpl and unlisted modules have been typed in practice by users
Package facts
| License | Apache-2.0 permissive |
| Python support | Supports the current Python release >=3.11,<4.0 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Abandoned 1,159 days since the last release |
| First released | |
| Downloads | 1,173,132 / month, #4,267 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 3 - AlphaIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.11Typing :: Stubs Only |
Evidence: confluent_kafka_stubs-0.0.3-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “type stubs for confluent-kafka”
- confluent-kafka-stubsProvides type hints and stubs for the confluent-kafka package to…
- types-confluent-kafkaProvides type hints and stub files for the confluent-kafka package to…
- opentelemetry-instrumentation-confluent-kafkaAdds distributed tracing to confluent-kafka library calls, capturing…
Give your agent the search over MCP, or paste the wish link into any chat.
More Software Development packages
Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.
Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.
Install it if you are building CLIs in Python.
Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.
See also types-confluent-kafka · mypy-boto3-kafka · pyspark-stubs · ob-metaflow-stubs · confluent-kafka · opentelemetry-instrumentation-confluent-kafka · confluent_avro · kafka · kafka-schema-registry · kafka-python-ng