aiokafka
Kafka integration with asyncio
Decision gist · record as of 2026-08-14
Yes. aiokafka is actively maintained, has no known vulnerabilities, and offers a clean async API for Kafka integration. The medium install friction is standard for compiled packages. Choose it if you need Kafka support in an asyncio-based application; it's the primary async Kafka client for Python.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires a running Kafka broker accessible at the bootstrap_servers address; requires Python 3.10 or later.
- Medium install friction due to compiled wheels across multiple Python versions and platforms.
- The package is actively maintained with a recent release and 1397 repository stars, indicating stable ongoing support.
License · maintenance · safety
Apache-2.0 (permissive) — Licensed under Apache-2.0 (permissive), allowing use in commercial and proprietary projects with minimal restrictions beyond attribution and liability disclaimers.
last release 2026-04-29 (107 days) · last repo commit 2026-08-09 · 1,397 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 10,535,919 downloads/mo, #1,446 on PyPI
Alternatives
Verify before relying
pip install aiokafka
from aiokafka import AIOKafkaProducer
import asyncio
async def send():
producer = AIOKafkaProducer(bootstrap_servers='localhost:9092')
await producer.start()
await producer.send_and_wait("my_topic", b"message")
await producer.stop()
asyncio.run(send())- Whether the package supports Kafka protocol versions beyond 0.11 mentioned in the consumer documentation.
- Performance characteristics and throughput limits under typical production loads.
- Compatibility with Kafka security features (SASL, SSL/TLS) beyond what the description mentions.
What it is and what it does
aiokafka is an asyncio-native client for Apache Kafka that lets you produce and consume messages using Python's async/await syntax. It provides two main classes: AIOKafkaProducer for sending messages asynchronously and AIOKafkaConsumer for subscribing to topics and processing messages in an async loop. The consumer supports group coordination for load-balanced consumption across multiple consumer instances.
The library is built on top of asyncio and integrates with the async ecosystem, making it suitable for applications that already use async patterns. It handles cluster discovery, partition leadership, and group management automatically. The package depends on async-timeout, packaging, and typing_extensions, and supports Python 3.10 through 3.14.
Use it for
- Build async event-driven applications that consume from Kafka topics and process messages concurrently.
- Implement high-throughput asynchronous message producers for real-time data pipelines.
- Create microservices that coordinate via Kafka consumer groups with automatic load balancing.
- Integrate Kafka messaging into FastAPI or other async web frameworks for event streaming.
- Process streaming data in async Python applications without blocking the event loop.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
aiokafka is actively maintained, has no known vulnerabilities, and offers a clean async API for Kafka integration. The medium install friction is standard for compiled packages. Choose it if you need Kafka support in an asyncio-based application; it's the primary async Kafka client for Python.
Install
aiokafka on PyPI
Before you install
Medium install friction due to compiled wheels across multiple Python versions and platforms. The package is actively maintained with a recent release and 1397 repository stars, indicating stable ongoing support.
Requires a running Kafka broker accessible at the bootstrap_servers address; requires Python 3.10 or later.
License in practice
Licensed under Apache-2.0 (permissive), allowing use in commercial and proprietary projects with minimal restrictions beyond attribution and liability disclaimers.
Quickstart
pip install aiokafka
from aiokafka import AIOKafkaProducer
import asyncio
async def send():
producer = AIOKafkaProducer(bootstrap_servers='localhost:9092')
await producer.start()
await producer.send_and_wait("my_topic", b"message")
await producer.stop()
asyncio.run(send())
Verify before relying
- Whether the package supports Kafka protocol versions beyond 0.11 mentioned in the consumer documentation.
- Performance characteristics and throughput limits under typical production loads.
- Compatibility with Kafka security features (SASL, SSL/TLS) beyond what the description mentions.
Package facts
| License | Apache-2.0 permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Medium. Platform-specific wheel |
| Runtime dependencies | 3 packagesasync-timeoutpackagingtyping_extensions |
| Maintenance | Actively maintained 107 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 10,535,919 / month, #1,446 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaFramework :: AsyncIOIntended Audience :: DevelopersOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: System :: Distributed ComputingTopic :: System :: Networking |
Evidence: aiokafka-0.14.0-cp310-cp310-macosx_10_9_x86_64.whl; aiokafka-0.14.0-cp310-cp310-macosx_11_0_arm64.whl; aiokafka-0.14.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; aiokafka-0.14.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; aiokafka-0.14.0-cp310-cp310-win32.whl; aiokafka-0.14.0-cp310-cp310-win_amd64.whl; aiokafka-0.14.0-cp311-cp311-macosx_10_9_x86_64.whl; aiokafka-0.14.0-cp311-cp311-macosx_11_0_arm64.whl; aiokafka-0.14.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; aiokafka-0.14.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; aiokafka-0.14.0-cp311-cp311-win32.whl; aiokafka-0.14.0-cp311-cp311-win_amd64.whl; aiokafka-0.14.0-cp312-cp312-macosx_10_13_x86_64.whl; aiokafka-0.14.0-cp312-cp312-macosx_11_0_arm64.whl; aiokafka-0.14.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; aiokafka-0.14.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; aiokafka-0.14.0-cp312-cp312-win32.whl; aiokafka-0.14.0-cp312-cp312-win_amd64.whl; aiokafka-0.14.0-cp313-cp313-macosx_10_13_x86_64.whl; aiokafka-0.14.0-cp313-cp313-macosx_11_0_arm64.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 › “asyncio kafka client”
- aiokafkaaiokafka is an asyncio-based client library for Apache Kafka that…
- confluent-kafkaProvides a high-performance Python client for Apache Kafka that wraps…
- faust-streamingFaust-streaming is a Python library for building stream processing…
Give your agent the search over MCP, or paste the wish link into any chat.
More Distributed Computing packages
gRPC Python is an HTTP/2-based RPC framework that enables you to define and call remote procedures across network boundaries using protocol buffers for serialization.
Install it if you need RPC communication in a distributed system or are integrating with existing gRPC services.
execnet lets you spawn and communicate with Python interpreters across local processes, remote hosts, and different platforms, using a simple API for task distribution and inter-process messaging.
However, the aging maintenance status (275 days since last release) means you should verify it meets your concurrency and performance needs before committing to a…
Cloudpickle extends Python's standard pickle module to serialize lambda functions, interactively-defined functions and classes, and other constructs that the default pickle cannot handle, making it suitable for cluster computing and remote code execution.
Install it if you need to serialize lambda functions, interactively-defined code, or non-standard Python constructs for cluster computing or distributed execution.
Provides a unified, open()-compatible Python API for streaming large files from remote storage (S3, GCS, Azure, HDFS, SFTP, HTTP) and local filesystems, with transparent compression support.
Install it if you work with large files on cloud storage or remote systems and want to avoid writing boilerplate around multiple SDKs.
Portalocker provides cross-platform file locking with support for exclusive and shared locks, plus Redis-based distributed locks and process-aware PID file locking.
Install it if you need file or process coordination; the optional extras (pywin32, redis) are only required for specific lock types.
Ray is a distributed computing framework that scales Python applications from a single machine to multi-node clusters, providing abstractions for parallel tasks, stateful actors, and shared objects.
See also kafka · kafka-connect-py · kafka-python · kafka-python-ng · confluent-kafka · opentelemetry-instrumentation-aiokafka · faust-streaming · aiormq · apache-airflow-providers-apache-kafka · matrice-common