Skip to content

Types Confluent Kafka Documentation

PyPI version PyPI - Python Version GitHub issues pre-commit enable main semantic-release

Welcome to the types-confluent-kafka documentation! This package provides comprehensive type hints for the confluent-kafka Python package, enabling better development experience with type checking and auto-completion support.

What is types-confluent-kafka?

types-confluent-kafka is a package that provides type hints for the confluent-kafka Python package. It's designed to enhance your development experience by enabling type checking with tools like mypy and providing auto-completion support in your LSP (language server).

Important Note

Confluent does not officially endorse this package.

Key Features

  • Complete Type Coverage: Comprehensive type hints for all confluent-kafka APIs
  • IDE Support: Enhanced auto-completion and IntelliSense in your favorite IDE
  • Type Safety: Catch type-related errors at development time with mypy and other type checkers
  • LSP Integration: Works seamlessly with Language Server Protocol implementations
  • Regular Updates: Frequent releases to stay up-to-date with confluent-kafka changes

Quick Start

Get started with types-confluent-kafka in just a few steps:

  1. Install the package:

    pip install --no-cache-dir types-confluent-kafka
    

  2. Import and use with type hints:

    from confluent_kafka import Producer, Consumer
    
    # Your IDE and type checker now understand the types!
    producer: Producer = Producer({'bootstrap.servers': 'localhost:9092'})
    consumer: Consumer = Consumer({'bootstrap.servers': 'localhost:9092', 'group.id': 'my-group'})
    

  3. Enable type checking:

    mypy your_kafka_application.py
    

Compatibility

For detailed compatibility information with different versions of confluent-kafka, please check the compatibility table.

Versioning

types-confluent-kafka follows Semantic Versioning 2.0.0:

  • MAJOR version for incompatible API changes
  • MINOR version for adding new features in a backward-compatible manner
  • PATCH version for backward-compatible bug fixes

We release frequently to provide you with the latest features and improvements. All commits follow conventional commits standard.

Next Steps

License

This project is licensed under the Apache 2.0 License. You are free to use, modify, and distribute the code according to the terms of this license.