Catalog PyPI
PACKAGE EXPLORERView in registry

abe-redis

PyPI

๐Ÿ“ฎ A Redis-based abstracted backend (abe) for abstract backend message queue.

backendimplement-layerimplementationmessage-queuequeue
Versions collected1
Direct dependencies2From release 0.1.0
Last observed20 Oct, 17:20 UTC

README

Version 0.1.0 documentation

Redis Message Queue Backend for Abstract Backend

A production-ready Redis Streams-based message queue backend implementation for the Abstract Backend project. This backend extends message queue capabilities to support Redis, enabling reliable, scalable, and high-performance Abstract Backend event processing.

Status & Quality

CI/CD & Testing

CI Documentation Documentation Build Check

Code Coverage & Quality

codecov Quality Gate Status Reliability Rating Security Rating Maintainability Rating

Code Style & Standards

Code style: black linting: pylint Imports: isort Type Checked: mypy

Package Info

PyPI version Supported Versions License: MIT

Downloads

Downloads Downloads/Month Downloads/Week


Overview

abe-redis is a Redis Streams-based message queue backend that integrates seamlessly with the Abstract Backend's component loading mechanism. It provides a reliable, scalable solution for handling Abstract Backend events using Redis as the message queue infrastructure.

Key Features

  • ๐Ÿ”Œ Plug-and-Play: Install via pip and configure with environment variables
  • โšก Redis Streams: Modern stream-based message processing with consumer groups
  • ๐Ÿš€ Production Ready: Connection pooling, error handling, and retry logic built-in
  • ๐Ÿ”„ Async-First: Built for modern Python async/await patterns
  • ๐Ÿ“ฆ Universal Compatibility: Works with any project using the same component loading mechanism
  • ๐Ÿงช Well Tested: Comprehensive unit and integration tests with high coverage
  • ๐Ÿ“š Fully Documented: Complete API reference and usage examples

Python Version Support

Python 3.12, 3.13

Quick Start

Installation

Install the package via pip:

pip install abe-redis

Configuration

Configure your environment to use Redis as the message queue backend:

export QUEUE_BACKEND=redis
export REDIS_URL=redis://localhost:6379/0

Start Redis

Using Docker (recommended):

docker run -d --name test-redis -p 6379:6379 redis:7-alpine

Basic Usage

import asyncio
from abe_plugin.backends.message_queue import RedisMessageQueueBackend


async def main():
    # Create backend from environment variables
    backend = RedisMessageQueueBackend.from_env()

    # Publish a message
    await backend.publish("slack:events", {"type": "message", "text": "Hello Redis!"})

    # Consume messages
    async for message in backend.consume():
        print(f"Received: {message}")
        break

    await backend.close()


asyncio.run(main())

Architecture

The Redis backend uses Redis Streams for reliable message queueing:

  • Persistent Storage: Messages stored in Redis Streams with configurable retention
  • Consumer Groups: Distributed consumption across multiple workers
  • Automatic Acknowledgment: Messages acknowledged after successful processing
  • Stream Pattern Matching: Automatically discovers and consumes from slack:* streams
  • Connection Pooling: Efficient connection management with configurable pool size

Configuration Options

Environment VariableRequiredDefaultDescription
QUEUE_BACKENDYes-Must be set to redis
REDIS_URLYesredis://localhost:6379/0Redis connection URL
REDIS_PASSWORDNoNoneRedis authentication password
REDIS_SSLNofalseEnable SSL/TLS connection
REDIS_MAX_CONNECTIONSNo10Maximum connection pool size
REDIS_STREAM_MAXLENNo10000Maximum stream length for trimming

Documentation

For comprehensive documentation, including API references, examples, and development guides:

๐Ÿ“š Full Documentation

Development

Prerequisites

  • Python 3.12 or 3.13
  • Redis 6.0+ (7.0+ recommended)
  • uv or pip package manager

Setup Development Environment

# Clone the repository
git clone https://github.com/Chisanan232/abe-redis.git
cd abe-redis

# Install dependencies
uv sync

# Start Redis for testing
docker run -d --name redis-dev -p 6379:6379 redis:7-alpine

# Run tests
uv run pytest

# Run tests with coverage
uv run pytest --cov=abe_plugin --cov-report=html

Code Quality

The project follows strict code quality standards:

Run quality checks:

# Format code
uv run black abe_plugin/ test/

# Lint code
uv run pylint abe_plugin/

# Sort imports
uv run isort abe_plugin/ test/

# Type check
uv run mypy abe_plugin/

Contributing

We welcome contributions! Please see our Contributing Guide for details.

How to Contribute

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Make your changes
  4. Run tests and quality checks
  5. Commit your changes (git commit -m 'feat: add amazing feature')
  6. Push to the branch (git push origin feature/amazing-feature)
  7. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Support

If you encounter any issues or have questions:


Made with โค๏ธ for the Abstract Backend ecosystem

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
0.1.04 Nov 20252

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
chisanan232/abe-redis

Shared repository data ยท GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 17:20 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:dce2120f5e0f4cbaa2d0e45fd2405ac30e58564679d656da361b450ca9ca0079