--- id: kafka-python-ng version: "2.2.3" license: Apache License 2.0 license_treatment: permissive maintenance: abandoned --- # kafka-python-ng — Pure Python client for Apache Kafka License: permissive · Maintenance: abandoned · Downloads: 1.9M/mo ## What it is and what it does kafka-python-ng is a pure Python client for Apache Kafka that mirrors the design of the official Java client. It provides KafkaConsumer for subscribing to topics and consuming messages (with support for consumer groups and dynamic partition assignment on brokers 0.9+) and KafkaProducer for asynchronously publishing messages. The library handles serialization, compression (gzip natively, plus optional LZ4, Snappy, and Zstandard), and CRC32 validation of messages. The package is designed to work with modern Kafka brokers (0.9+) but maintains backward compatibility to 0.8.0, though some features like coordinated consumer groups require newer brokers. It supports Python 3.8 through 3.12 on CPython and PyPy. The library includes a protocol layer for low-level broker interaction and version detection, useful for testing and experimentation. Use it for: - Build a consumer application that subscribes to Kafka topics and processes messages in a consumer group with automatic partition rebalancing. - Implement a producer that publishes messages to Kafka topics with optional key-based partitioning and compression. - Integrate Kafka message streaming into Python microservices for event-driven architectures. - Serialize and deserialize structured data (JSON, msgpack) when producing or consuming Kafka messages. - Monitor Kafka producer and consumer performance using the metrics() API. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. A Python client library for Apache Kafka that provides high-level producer and consumer APIs for publishing and consuming messages from Kafka brokers, with support for consumer groups, compression, and serialization. Yes, with caution. The package has low install friction, no runtime dependencies, and covers the core Kafka client use case well. However, the repository is archived and abandoned as of 2024-10-28, with the description itself recommending use of the GitHub repository due to release issues. For new projects, verify whether the fork remains actively maintained or whether you should evaluate alternatives. For existing projects already using it, the current version is stable and has no known vulnerabilities, but plan for long-term maintenance risk. ## Install pip install kafka-python-ng uv add kafka-python-ng poetry add kafka-python-ng ## Installing kafka-python-ng Before you install: Low install friction with no runtime dependencies. However, the package is marked as abandoned with the last commit on 2024-10-28 and the repository archived. The description explicitly recommends using the GitHub repository directly due to release issues, signaling ongoing maintenance concerns despite the stable classifier. License in practice: Licensed under Apache License 2.0 (permissive), which allows commercial use, modification, and distribution with minimal restrictions. No notable licensing constraints for typical use. Quickstart: pip install kafka-python-ng from kafka import KafkaConsumer consumer = KafkaConsumer('my_topic', group_id='my_group') for msg in consumer: print(msg) Requires a running Kafka broker accessible at the configured bootstrap_servers address; gzip compression is built-in but other formats require separate libraries. Verify before relying: - Whether the archived repository status affects long-term security updates or bug fixes for production use - Current compatibility with Kafka broker versions beyond 2.6+ mentioned in the documentation - Whether optional compression libraries (LZ4, Snappy, Zstandard) are required for your use case or only gzip ## Package facts - License: Apache License 2.0 (permissive) - Python support: supports_current - Install friction: low - Maintenance: abandoned - Downloads: 1.9M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags kafka python client, apache kafka producer consumer, kafka message streaming python, kafka broker integration, distributed message queue python, kafka consumer groups, kafka serialization compression, kafka, message-streaming, abandoned-upstream [View on SkillFed](https://skillfed.io/packages/kafka-python-ng) · [View on PyPI](https://pypi.org/project/kafka-python-ng/)