soev for developers
Warren

Overview

Process independent items through a pipeline of workers over RabbitMQ, Kafka or memory, with the payloads in MongoDB and Redis.

Warren is a message-driven framework for distributed processing. Independent items flow through a pipeline of workers. Each worker selects the messages that it handles, stores its results, and publishes references for the next workers. The messages stay small, because the payloads are in storage. To scale a worker type, add replicas that share its queue or consumer group.

Warren gives the worker base classes and the interfaces for pubsub and storage. The runtime connects them to RabbitMQ or Kafka, with MongoDB and Redis, or to in-memory implementations for local runs and tests.

Install

Warren needs Python 3.12 or later. Install the extra of the transport that you use:

pip install "warren[rmq]"
ExtraAdds
rmqaio-pika, for the RabbitMQ transport
kafkaaiokafka, for the Kafka transport
gcsgoogle-cloud-storage, for documents in Google Cloud Storage
s3boto3, for documents in S3
httphttpx, for documents at a URL

The memory transport needs no extra. If you select a transport or a document resolver without its extra, Warren raises OptionalDependencyError.

Where to start

On this page