documentation
Get Started Free
  • Get Started Free
  • Courses
      What are the courses?

      Video courses covering Apache Kafka basics, advanced concepts, setup and use cases, and everything in between.

      Learning pathways (21)
      New Courses
      NewApache Flink® 101
      NewBuilding Flink® Apps in Java
      NewKafka® for .NET Developers
      NewPractical Event Modeling
      NewHybrid and Multicloud Architecture
      NewMastering Production Data Streaming Systems with Apache Kafka®
      Featured Courses
      Kafka® 101
      Kafka® Connect 101
      Kafka Streams 101
      Schema Registry 101
      ksqlDB 101
      Data Mesh 101
  • Learn
      Pick your learning path

      A wide range of resources to get you started

      Start Learning
      Articles

      Deep-dives into key concepts

      Patterns

      Architectures for event streaming

      FAQs

      Q & A about Kafka® and its ecosystem

      100 Days of Code

      A self-directed learning path

      Blog

      The Confluent blog

      Podcast

      Our podcast, Streaming Audio

      Coding in Motion

      Build a real-time streaming app

      NewApache Kafka® on the Go

      One-minute guides to Kafka's core concepts

  • Build
      Design. Build. Run.

      Build a client app, explore use cases, and build on our demos and resources

      Start Building
      Language Guides

      Build apps in your favorite language

      Tutorials

      Hands-on stream processing examples

      Demos

      More resources to get you started

  • Community
      Join the Community

      Confluent proudly supports the global community of streaming platforms, real-time data streams, Apache Kafka®️, and its ecosystems

      Learn More
      Meetups & Events

      Kafka and data streaming community

      Ask the Community

      Community forums and Slack channels

      Community Catalysts

      Sharing expertise with the community

      DevX Newsletter

      Bi-weekly newsletter with Apache Kafka® resources, news from the community, and fun links.

      Current 2023

      View sessions and slides from Current 2023

      Kafka Summit 2023

      View sessions and slides from Kafka Summit 2023

      Current 2022

      View sessions and slides from 2022

      Data Streaming Awards

      Nominate amazing use cases and view previous winners

Courses
What are the courses?

Video courses covering Apache Kafka basics, advanced concepts, setup and use cases, and everything in between.

Learning pathways (21)
New Courses
NewApache Flink® 101
NewBuilding Flink® Apps in Java
NewKafka® for .NET Developers
NewPractical Event Modeling
NewHybrid and Multicloud Architecture
NewMastering Production Data Streaming Systems with Apache Kafka®
Featured Courses
Kafka® 101
Kafka® Connect 101
Kafka Streams 101
Schema Registry 101
ksqlDB 101
Data Mesh 101
Learn
Pick your learning path

A wide range of resources to get you started

Start Learning
Articles

Deep-dives into key concepts

Patterns

Architectures for event streaming

FAQs

Q & A about Kafka® and its ecosystem

100 Days of Code

A self-directed learning path

Blog

The Confluent blog

Podcast

Our podcast, Streaming Audio

Coding in Motion

Build a real-time streaming app

NewApache Kafka® on the Go

One-minute guides to Kafka's core concepts

Build
Design. Build. Run.

Build a client app, explore use cases, and build on our demos and resources

Start Building
Language Guides

Build apps in your favorite language

Tutorials

Hands-on stream processing examples

Demos

More resources to get you started

Community
Join the Community

Confluent proudly supports the global community of streaming platforms, real-time data streams, Apache Kafka®️, and its ecosystems

Learn More
Meetups & Events

Kafka and data streaming community

Ask the Community

Community forums and Slack channels

Community Catalysts

Sharing expertise with the community

DevX Newsletter

Bi-weekly newsletter with Apache Kafka® resources, news from the community, and fun links.

Current 2023

View sessions and slides from Current 2023

Kafka Summit 2023

View sessions and slides from Kafka Summit 2023

Current 2022

View sessions and slides from 2022

Data Streaming Awards

Nominate amazing use cases and view previous winners

Get Started Free
Confluent Documentation
  1. Home
  2. Kafka Clients
  • Apache Kafka Python Client
    • Python Client installation
    • Python Client demo code
    • Kafka Producer
      • Initialization
      • Asynchronous writes
      • Synchronous writes
    • Kafka Consumer
      • Initialization
      • Python Client code examples
        • Basic poll loop
        • Synchronous commits
        • Delivery guarantees
        • Asynchronous Commits
    • API documentation
    • Suggested resources
  • Tutorial
  • Glossary

Was this doc page helpful?

Give us feedback

Do you still need help?

Confluent support portal Ask the community
Thank you. We'll be in touch!
Be the first to get updates and new content

By clicking "SIGN UP" you agree that your personal data will be processed in accordance with our Privacy Policy.

  • Confluent
  • About
  • Careers
  • Contact
  • Professional Services
  • Product
  • Confluent Cloud
  • ksqlDB
  • Developer
  • Free Courses
  • Tutorials
  • Event Streaming Patterns
  • Documentation
  • Blog
  • Podcast
  • Community
  • Forum
  • Meetups
  • Kafka Summit
  • Catalysts
Terms & Conditions Privacy Policy Do Not Sell My Information Modern Slavery Policy Cookie Settings Feedback

Copyright © Confluent, Inc. 2014- Apache, Apache Kafka, Kafka, the Kafka logo, Apache Flink, Flink, and the Flink logo are trademarks of the Apache Software Foundation

On this page: