Pages

Topics

Tools

↑↓navigate↵openescclose

All syntax guides

Short, practical guides on programming syntax, language fundamentals, and the tools developers reach for every day.

3,965 guides across 14 topics

Topics

Latest guides

Python asyncio event loop with tasks connected in a ring
Python

Python Asyncio: Event Loop and Tasks Explained

How the asyncio event loop schedules coroutines and tasks in Python, with concurrency patterns, TaskGroup, cancellation, timeouts, and the failure modes that break production services.

PythonAsyncioConcurrencyEvent Loop
Comparison of two Python Kafka client libraries with code snippets and a scale icon.
Python

Python Kafka: kafka-python vs Confluent Client

kafka-python is pure Python; confluent-kafka wraps librdkafka. Compare APIs, throughput, error handling, and pick the client that fits your service.

KafkaPythonkafka-pythonConfluent
Illustration of a Python Kafka producer and consumer connected through a Schema Registry with Avro schemas, showing data flow and schema validation.
Python

Python Confluent Kafka Producer Consumer and Schema Registry

python confluent kafka producer consumer and schema registry: Learn to build a Python Kafka producer and consumer with Confluent's client and Schema Registry, covering...

KafkaConfluentSchema RegistryAvro
Illustration of Kafka partition offsets and manual commit flow in a Python consumer
Python

Python Kafka Offsets, Partitions, and Manual Commits

Learn how Kafka offsets and partitions work and how to manually commit offsets in Python consumers with kafka-python and confluent-kafka. Covers sync vs async commits, rebalances, and seeking.

KafkaPythonOffsetsPartitions
Diagram showing a Python Kafka producer sending messages to a topic, and a consumer group with multiple consumers reading from partitions.
Python

Python Kafka Producer, Consumer, and Consumer Groups

Build Kafka producers and consumers in Python with confluent-kafka, and understand consumer groups, offset handling, error handling, and performance tuning.

KafkaPythonProducerConsumer
Illustration of Python pika connecting to RabbitMQ with queues, exchanges, and routing keys, emphasizing message acknowledgement flow.
Python

Python Pika: Queues, Exchanges, Routing Keys, and Acknowledgements

Learn how to use Python's Pika client with RabbitMQ: declare queues and exchanges, publish with routing keys, consume messages, and handle acknowledgements reliably.

pikaRabbitMQmessage queuesrouting keys
Diagram of a Python producer sending messages to a RabbitMQ exchange and a consumer receiving them
Python

Python Pika RabbitMQ Producer Consumer

Learn how to implement a producer and consumer with Python Pika and RabbitMQ, including connection setup, queue declaration, publishing, consuming, and acknowledgments.

RabbitMQPikaMessage QueuesProducer-Consumer
Illustration of a Python WebSocket client running as a background task while the main application continues processing.
Python

Python WebSocket Client Background Connections

Run a Python WebSocket client in the background with asyncio tasks or daemon threads, including reconnect logic and clean shutdown.

websocketasynciobackground-taskspython-networking
Illustration of a Python WebSocket server managing authenticated connections, reconnection, and broadcasting messages.
Python

Python WebSockets: Authentication, Reconnect, and Broadcast

python websockets authentication reconnect and broadcast: Implement authentication, reconnection, and broadcast for Python WebSockets using the `websockets` library, w...

websocketsauthenticationreconnectionbroadcasting
Diagram of a Python WebSocket server and client exchanging messages over a persistent connection.
Python

Python WebSockets: Client-Server Send and Receive

Learn how to build a WebSocket client and server in Python with the websockets library. This guide covers sending and receiving messages, connection handling, broadcasting, and reconnection.

websocketsasynciopython networkingreal-time communication