Skip to content

Latest commit

 

History

History
82 lines (57 loc) · 3.8 KB

File metadata and controls

82 lines (57 loc) · 3.8 KB
graph LR
    Protocol_Serialization_Deserialization["Protocol Serialization & Deserialization"]
    Redis_Command_Abstraction_Implementation["Redis Command Abstraction & Implementation"]
    Core_Client_API["Core Client API"]
    Connection_Management["Connection Management"]
    Utility_Error_Handling["Utility & Error Handling"]
    Redis_Command_Abstraction_Implementation -- "uses" --> Protocol_Serialization_Deserialization
    Core_Client_API -- "uses" --> Redis_Command_Abstraction_Implementation
    Connection_Management -- "uses" --> Protocol_Serialization_Deserialization
    Protocol_Serialization_Deserialization -- "uses" --> Utility_Error_Handling
    Redis_Command_Abstraction_Implementation -- "uses" --> Utility_Error_Handling
    Core_Client_API -- "uses" --> Utility_Error_Handling
    Connection_Management -- "uses" --> Utility_Error_Handling
    click Connection_Management href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main/redis-py/Connection_Management.md" "Details"
Loading

CodeBoardingDemoContact

Details

The Protocol & Command Handling subsystem is a critical part of the redis-py client library, responsible for the fundamental communication with the Redis server.

Protocol Serialization & Deserialization

This component is responsible for the low-level conversion of Python data structures into the Redis Serialization Protocol (RESP) format for outgoing commands and the efficient parsing of RESP responses received from the Redis server back into native Python data types. It supports different RESP versions (RESP2 and RESP3) and leverages optimized parsers, including the hiredis C extension for performance. This component acts as the crucial bridge between the Python application's data representation and Redis's wire protocol.

Related Classes/Methods:

  • BaseParser
  • AsyncBaseParser
  • _RESPBase
  • _AsyncRESPBase
  • _HiredisParser
  • _AsyncHiredisParser
  • _RESP2Parser
  • _AsyncRESP2Parser
  • _RESP3Parser
  • _AsyncRESP3Parser
  • Encoder

Redis Command Abstraction & Implementation

This component defines and implements the comprehensive set of Redis commands, providing a Pythonic interface for interacting with Redis functionalities. It encompasses both the core Redis commands (e.g., key-value operations, hashes, lists, sets, sorted sets, streams, geospatial commands, hyperloglog, scanning, ACL, cluster, functions, management, pub/sub, scripting) and specialized commands for various Redis modules (e.g., RedisBloom, RedisJSON, RediSearch, RedisTimeSeries, VectorSearch). This component abstracts the raw command strings and arguments into user-friendly Python methods.

Related Classes/Methods:

  • CoreCommands
  • AsyncCoreCommands
  • RedisModuleCommands
  • AsyncRedisModuleCommands
  • BFCommands
  • CFCommands
  • JSONCommands
  • SearchCommands
  • AsyncSearchCommands
  • TimeSeriesCommands
  • VectorSetCommands

Core Client API

Provides a simplified, unified interface to the extensive set of Redis commands.

Related Classes/Methods: None

Connection Management [Expand]

Responsible for the actual sending and receiving of bytes over the network.

Related Classes/Methods: None

Utility & Error Handling

Provides consistent exception handling and potentially shared utility functions.

Related Classes/Methods: None