--- id: confluent-kafka-stubs version: "0.0.3" license: Apache-2.0 license_treatment: permissive maintenance: abandoned --- # confluent-kafka-stubs — Stub files for confluent-kafka. License: permissive · Maintenance: abandoned · Downloads: 1.2M/mo ## 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 above — verify before relying. Provides type hints and stubs for the confluent-kafka package to enable static type checking with mypy and IDE autocompletion. 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 pip install confluent-kafka-stubs uv add confluent-kafka-stubs poetry add confluent-kafka-stubs ## Installing confluent-kafka-stubs 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. 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({}) Requires Python 3.11 or later; confluent-kafka must be installed separately for the stubs to be useful. 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_current - Install friction: low - Maintenance: abandoned - Downloads: 1.2M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags type stubs for confluent-kafka, mypy type hints kafka, confluent kafka typing support, kafka type checking, python kafka stubs, type-stubs, mypy, kafka [View on SkillFed](https://skillfed.io/packages/confluent-kafka-stubs) · [View on PyPI](https://pypi.org/project/confluent-kafka-stubs/)