# dpkp/kafka-python

Python client for Apache Kafka

Repository: https://github.com/dpkp/kafka-python
Canonical: https://ross.abutalabs.com/products/kafka-python
Homepage: http://kafka-python.readthedocs.io/
Language: Python
License: Apache-2.0
License Family: permissive
Topics: kafka, python
Last push: 2026-08-24T18:04:17+00:00

## Health v2 (maintenance only)
Score: 99/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 98, longevity 100
- inputs: {"age_days": 5091, "days_push": 9, "days_rel": 17, "gap_med": 4, "n_releases_24m": 44}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 5898, forks 1476 (observed 2026-08-28T04:09:32.057918+00:00)

## What it is
kafka-python is a pure-Python client library for Apache Kafka with no external dependencies, providing high-level consumer, producer, and admin client classes. It also ships CLI scripts for producing, consuming, and administering Kafka clusters without a JVM.

## Use cases
- produce and consume messages from kafka in python
- create and manage kafka topics programmatically
- read kafka events with a python consumer group
- administer a kafka cluster without installing the jvm
- integrate kafka streaming into python data pipelines
- quickly test kafka topics from the command line

## When to choose
- you need a dependency-free pure-python kafka client
- you want a java-client-like consumer/producer API in python
- you lack a JVM but need kafka admin operations
- you need broad kafka version compatibility with modern KIP features

## When to avoid
- you need maximum throughput and prefer a C/Cython-based client like confluent-kafka
- you need async/await-first APIs from a different ecosystem
- you require exactly the official java client's full feature surface

## Facets
- artifact type: library
- maturity: active
- function: message-queue, streaming, cli, serialization
- domain: developer-tools, microservices
- platform: python, cross-platform, cli
- tags: apache-kafka, kafka-client, pure-python, event-streaming, producer-consumer, messaging, data-engineering

## Member repositories
- dpkp/kafka-python (main) score 99

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:32.057918+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:51:19.543134+00:00, confidence not recorded.
  - readme: https://github.com/dpkp/kafka-python (fetched 2026-08-28T04:09:32.057918+00:00, sha 1a6944a54bb3)
  - registry_pypi: https://pypi.org/pypi/kafka-python/json (fetched 2026-08-29T08:47:18.898585+00:00, sha 449dc926e7d2)
- Data as of 2026-08-30T08:39:29.467469+00:00.
