# pika/pika

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/pika-pika).**

_How this analysis was created: the description and tags below were written by an AI model that read this project's README and public documentation pages; stars, license and language come straight from the GitHub API. The model does not read the source code._

3,867 stars · 845 forks · Python · BSD-3-Clause

## Links

- GitHub: https://github.com/pika/pika
- Homepage: https://pika.readthedocs.io
- awesome-repositories: https://awesome-repositories.com/repository/pika-pika.md

## Topics

`amqp0-9-1` `client` `python` `rabbitmq`

## Description

Pika is a Python client library for implementing communication between applications and message brokers using the AMQP 0-9-1 protocol. It serves as a toolkit for sending and receiving messages, specifically enabling the creation of producers and consumers that interact with RabbitMQ and other AMQP-compliant brokers.

The library provides both an asynchronous messaging framework that integrates with external event loops for non-blocking data exchange and a procedural synchronous wrapper for performing messaging tasks without an asynchronous architecture.

Its connection management toolkit includes automatic connection recovery, heartbeat monitoring, and fault-tolerant retry strategies. The system employs a state machine to track network lifecycles and supports multi-endpoint failover logic to maintain connectivity during broker server failures.

The library also includes thread-safe callback routing to move tasks from background network threads to the primary execution loop.

## Tags

### Networking & Communication

- [AMQP Protocol Clients](https://awesome-repositories.com/f/networking-communication/amqp-protocol-clients.md) — Implements the AMQP 0-9-1 protocol to enable communication between Python applications and message brokers. ([source](https://cdn.jsdelivr.net/gh/pika/pika@main/README.md))
- [RabbitMQ Integrations](https://awesome-repositories.com/f/networking-communication/communication-platforms-services/messaging-notification-systems/messaging-services/rabbitmq-integrations.md) — Provides a toolkit for building producers and consumers that interact specifically with RabbitMQ brokers.
- [Connection Lifecycle State Machines](https://awesome-repositories.com/f/networking-communication/connection-state-synchronization/connection-lifecycle-state-machines.md) — Uses a formal state machine to track network lifecycle transitions, handling reconnections and heartbeat monitoring.
- [Connection Lifecycle Managers](https://awesome-repositories.com/f/networking-communication/network-reliability-diagnostics/connection-session-management/connection-management/connection-lifecycle-managers.md) — Handles network lifecycles including automated state transitions, heartbeats, and reconnection logic.
- [Automatic Connection Recovery](https://awesome-repositories.com/f/networking-communication/remote-server-connectivity/persistent-connection-enablements/automatic-connection-recovery.md) — Automatically detects network failures and restores active connections and channels using retry strategies. ([source](https://cdn.jsdelivr.net/gh/pika/pika@main/README.md))
- [Synchronous Messaging Interfaces](https://awesome-repositories.com/f/networking-communication/communication-platforms-services/messaging-notification-systems/messaging-reliability/synchronous-messaging-interfaces.md) — Provides a procedural synchronous wrapper for performing messaging tasks without requiring an asynchronous architecture.
- [Distributed Service Communications](https://awesome-repositories.com/f/networking-communication/distributed-service-communications.md) — Enables reliable data exchange between decoupled services across different network nodes.

### Data & Databases

- [AMQP](https://awesome-repositories.com/f/data-databases/connection-managers/redis/protocol-implementations/amqp.md) — Implements the binary AMQP 0-9-1 protocol for encoding and decoding messages transmitted to brokers.
- [Message Broker Connectivity](https://awesome-repositories.com/f/data-databases/redis-clients/cluster-connectivity/message-broker-connectivity.md) — Provides synchronous and asynchronous adapters to establish communication links with AMQP message brokers. ([source](https://cdn.jsdelivr.net/gh/pika/pika@main/README.md))

### Software Engineering & Architecture

- [Non-Blocking Event Loops](https://awesome-repositories.com/f/software-engineering-architecture/non-blocking-event-loops.md) — Integrates with external event loops to perform non-blocking network operations and manage message flow.
- [Persistent Connection Management](https://awesome-repositories.com/f/software-engineering-architecture/fault-tolerance-strategies/fault-tolerance-implementation/persistent-connection-management.md) — Manages persistent connections with automatic retries and heartbeat monitoring to prevent data loss.
- [Multi-Host Failover](https://awesome-repositories.com/f/software-engineering-architecture/fault-tolerance/multi-host-failover.md) — Maintains connectivity during server failures by rotating through a list of configured host addresses. ([source](https://cdn.jsdelivr.net/gh/pika/pika@main/README.md))

### Web Development

- [Asynchronous Messaging Frameworks](https://awesome-repositories.com/f/web-development/asynchronous-messaging-frameworks.md) — Implements non-blocking communication patterns using an external event loop to handle high message volumes.

### Operating Systems & Systems Programming

- [Asynchronous-to-Synchronous Wrappers](https://awesome-repositories.com/f/operating-systems-systems-programming/synchronous-to-asynchronous-wrappers/asynchronous-to-synchronous-wrappers.md) — Wraps asynchronous logic in a high-level procedural interface to allow sequential messaging tasks.

### System Administration & Monitoring

- [Sequential Host Failover](https://awesome-repositories.com/f/system-administration-monitoring/administrative-operations/linux-system-administration/networking/connection-lifecycle-management/connection-pooling/container-host-connections/sequential-host-failover.md) — Implements sequential host failover by iterating through a list of host nodes to maintain connectivity.
