$npx skillfedfor your agent

kafka

Pure Python client for Apache Kafka

Worth itPyPI Python ModulesReleased Oct 2017254.2K downloads / moApache License 2.0Pure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — kafka-1.3.5-py2.py3-none-any.whl
v1.3.5 · released 2017-10-07

Yes. kafka-python is production-stable, widely adopted (254199 monthly downloads, top 15000 on PyPI), has zero known vulnerabilities, and carries a permissive Apache License 2.0. Installation is frictionless with no runtime dependencies. The only caveat is that the last release was 2017-10-07; verify that this aligns with your support expectations and that the package still meets your target Kafka broker and Python version requirements.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires a running Kafka broker accessible at the specified bootstrap_servers address; optional compression support (lz4, snappy) requires additional system libraries.
  • Low friction: pure Python wheel with no runtime dependencies.
  • Actively maintained with recent commits (2026-08-07) and a large user base (254199 monthly downloads).

License · maintenance · safety

Apache License 2.0 (permissive) — Apache License 2.0 is permissive: you can use this library freely in commercial and private projects, modify it, and distribute it, provided you include a copy of the license and state significant changes. No copyleft obligations.

last release 2017-10-07 (3233 days) · last repo commit 2026-08-07 · 5,901 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 254,199 downloads/mo, #8,500 on PyPI

Verify before relying

pip install kafka

from kafka import KafkaConsumer
consumer = KafkaConsumer('my_favorite_topic', group_id='my_favorite_group')
for msg in consumer:
    print(msg)

from kafka import KafkaProducer
producer = KafkaProducer(bootstrap_servers='localhost:1234')
producer.send('foobar', b'some_message_bytes')
  • Whether the package supports modern Python versions beyond 3.6 (classifiers list up to 3.6, but current ecosystem has moved further)
  • Current status of optional compression dependencies (lz4, snappy) and whether they remain actively maintained
  • Whether the last release date (2017-10-07) reflects true maintenance status or if updates are released through a different channel
Same gist for agents: .md · .json

What it is and what it does

kafka-python is a pure-Python client for Apache Kafka that lets you produce and consume messages from Kafka brokers without external compiled dependencies. It provides two main APIs: KafkaConsumer for reading messages (with support for consumer groups and dynamic partition assignment on brokers 0.9+) and KafkaProducer for writing messages asynchronously. Both are designed to behave similarly to the official Java client, with Pythonic additions like consumer iterators. The library handles serialization, compression (gzip natively; lz4 and snappy via optional packages), and protocol-level operations.

The package is best suited for Kafka 0.9 and newer brokers, though it remains backward-compatible with 0.8.0. It supports thread-safe producer usage but recommends multiprocessing for consumers. No runtime dependencies means installation is straightforward, and the large download volume and production-stable status indicate it is widely used in production systems.

Use it for

  • Build a consumer application that subscribes to a Kafka topic and processes messages in a consumer group with automatic partition rebalancing
  • Implement an asynchronous message producer that sends events to Kafka with optional compression and key-based partitioning
  • Set up multi-consumer message processing by manually assigning different partitions to consumer instances using configuration management
  • Integrate custom serialization (JSON, msgpack, etc.) for message values and keys in producer and consumer workflows
  • Probe and test Kafka broker compatibility by using the protocol layer to check broker versions (0.8.0 to 0.11)

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Worth it

Yes.

kafka-python is production-stable, widely adopted (254199 monthly downloads, top 15000 on PyPI), has zero known vulnerabilities, and carries a permissive Apache License 2.0. Installation is frictionless with no runtime dependencies. The only caveat is that the last release was 2017-10-07; verify that this aligns with your support expectations and that the package still meets your target Kafka broker and Python version requirements.

Install

kafka on PyPI

Before you install

Low friction: pure Python wheel with no runtime dependencies. Actively maintained with recent commits (2026-08-07) and a large user base (254199 monthly downloads). Production-stable classifier and 5901 repository stars indicate mature, widely-adopted code.

Requires a running Kafka broker accessible at the specified bootstrap_servers address; optional compression support (lz4, snappy) requires additional system libraries.

License in practice

Apache License 2.0 is permissive: you can use this library freely in commercial and private projects, modify it, and distribute it, provided you include a copy of the license and state significant changes. No copyleft obligations.

Quickstart

pip install kafka

from kafka import KafkaConsumer
consumer = KafkaConsumer('my_favorite_topic', group_id='my_favorite_group')
for msg in consumer:
    print(msg)

from kafka import KafkaProducer
producer = KafkaProducer(bootstrap_servers='localhost:1234')
producer.send('foobar', b'some_message_bytes')

Verify before relying

  • Whether the package supports modern Python versions beyond 3.6 (classifiers list up to 3.6, but current ecosystem has moved further)
  • Current status of optional compression dependencies (lz4, snappy) and whether they remain actively maintained
  • Whether the last release date (2017-10-07) reflects true maintenance status or if updates are released through a different channel

Package facts

LicenseApache License 2.0 permissive
Python supportNot specified
Install frictionLow. Pure-Python wheel
Runtime dependenciesNone
MaintenanceActively maintained 3,233 days since the last release
Last repo commit
First released
Downloads254,199 / month, #8,500 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseProgramming Language :: PythonProgramming Language :: Python :: 2Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: Implementation :: PyPyTopic :: Software Development :: Libraries :: Python Modules

Evidence: kafka-1.3.5-py2.py3-none-any.whl

Tags

Capabilities
kafka python clientapache kafka producer consumerdistributed message streamingkafka broker communicationpython kafka librarymessage queue clientkafka consumer groups
Topics
message-queuestreamingdistributed-systems
PyPI keywords
apachekafka

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 › “apache kafka producer consumer”

  • kafkaA pure-Python client library for Apache Kafka that provides…
  • kafka-python-ngA Python client library for Apache Kafka that provides high-level…
  • kafka-pythonPure-Python Apache Kafka client library providing high-level…

Give your agent the search over MCP, or paste the wish link into any chat.

More Python Modules packages

idna Worth it
PyPI · Python Modules · released Jun 2026

Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.

Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.

BSD-3-Clausepure Python · 3.9+
1.8Bdownloads / mo
setuptools Worth it
PyPI · Python Modules · released Aug 2026

Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.

MITpure Python · 3.10+
1.6Bdownloads / mo
PyYAML Worth it
PyPI · Python Modules · released Sep 2025

PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.

MITcompiled wheel · 3.8+
1.2Bdownloads / mo
pydantic Worth it
PyPI · Python Modules · released May 2026

Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.

MITpure Python · 3.9+
1.1Bdownloads / mo
annotated-types Worth it
PyPI · Python Modules · released Jul 2026

Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.

Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…

MITpure Python · 3.10+
871.3Mdownloads / mo
typing-inspection Worth it
PyPI · Python Modules · released Aug 2026

Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.

MITpure Python · 3.10+
783.0Mdownloads / mo

See also aiokafka · confluent-kafka · kafka-python · kafka-python-ng · quixstreams · faststream · kafka-connect-py · aws-msk-iam-sasl-signer-python · kafka-schema-registry · confluent_avro