Installing Abstract Backend and Providers
Use this guide to install the core library, layer in provider packages, and verify that entry-point discovery works end-to-end.
Step 1 ยท Install the core packageโ
Pick the workflow that matches your dependency manager.
- pip
- uv
- Poetry
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install abstract-backend
uv venv
source .venv/bin/activate
uv pip install abstract-backend
poetry add abstract-backend
At this point you have access to the shared abstractions: QueueBackend, EventConsumer, the plugin loader, and the in-memory MemoryBackend fallback.
Step 2 ยท Install one or more providersโ
Providers are distributed as normal Python packages that register the abe.backends.message_queue entry point group. Install as many as you need:
pip install abe-backend-memory # ships with the repo (development only)
pip install abe-backend-redis # example third-party provider
pip install abe-backend-sqs # another provider
Replace the package names with the providers published by your organization. Providers must expose a from_env() class method that creates the backend instance.
Step 3 ยท Select a provider at runtimeโ
Abstract Backend chooses the first non-memory provider it finds unless you override it. Set the QUEUE_BACKEND environment variable to pick a specific implementation:
export QUEUE_BACKEND=redis # macOS/Linux
set QUEUE_BACKEND=redis # Windows (cmd)
$env:QUEUE_BACKEND="redis" # Windows (PowerShell)
Skip this step to accept the auto-selection behavior (or fall back to the memory backend when no providers are installed).
Step 4 ยท Verify discoveryโ
Run this snippet after installation to make sure your provider can be resolved:
from abe.backends.message_queue.loader import load_backend
backend = load_backend()
print(type(backend).__name__)
You should see the class name of the provider you installed (for example RedisBackend). If the memory fallback loads instead, double-check the environment variable and that the provider package exposes the entry point.
Optional ยท Installing straight from sourceโ
If you are contributing to the library itself, clone the repository and install it in editable mode:
git clone https://github.com/Chisanan232/abstract-backend.git
cd abstract-backend
pip install -e .[dev]
Editable installs keep your working tree and installed package in sync while you experiment.
Move on to How to Run to wire the loader and consumer into your application.