Build a Provider with the Developer Studio
Ready to publish your own message-queue provider for Abstract Backend? This tutorial walks you through the developer studio workflowβusing the official implementation template, wiring it to the core SDK, and shipping a fully tested provider.
1. Understand the toolingβ
Abstract Backend separates the domain contracts (this repository) from provider implementations. The developer studio gives you:
- β
A GitHub template:
Chisanan232/abstract-backend-implementation-template - π Documentation hub: Template Docs
- π§ͺ Pre-wired contract and integration tests so your provider stays compliant
You will still develop locally with familiar tools (uv, pip, or poetry). The template simply bootstraps the folder layout, CI, and entry-point registration expected by Abstract Backend.
2. Create your provider repositoryβ
- Open the template repository and click Use this template β Create a new repository.
- Choose a descriptive name such as
acme-queue-backend. - Keep the repository private until you are ready to open-source it (CI uses GitHub Actions secret support out of the box).
π‘ The template defaults to the
masterbranch to match Abstract Backend's workflow. You can change this later, but keeping the same default makes synchronization simpler.
3. Clone & install dependenciesβ
# Replace acme-queue-backend with your repository name
git clone https://github.com/YOUR-ORG/acme-queue-backend.git
cd acme-queue-backend
# Pin the Python runtime used by the template
uv python install 3.11
# Create and activate a project-local virtual environment
uv venv
source .venv/bin/activate
# Install everything locked in `uv.lock` (dev extras included)
uv sync --locked --all-extras --dev
uv sync reads the template's pyproject.toml and uv.lock, ensuring every contributor works with the exact same dependency setβincluding the Abstract Backend core package your provider depends on.
4. Explore the project layoutβ
βββ src/
βββ acme_backend/
βββ __init__.py
βββ backend.py # Your MessageQueueBackend implementation
βββ config.py # Read environment variables & settings
βββ consumer.py # Optional helper utilities
βββ tests/
βββ contract/ # Copies of Abstract Backend contract tests
βββ integration/ # End-to-end scenarios you customize
βββ unit/ # Unit tests for your provider
Each folder includes TODO comments guiding what to modify. Contract tests import Abstract Backend directly to guarantee API compatibility.
5. Implement the backendβ
- Open
src/acme_backend/backend.pyand fill in the methods required byMessageQueueBackend. - Use
config.pyto parse connection strings, authentication tokens, or other provider-specific settings. - Update entry points in
pyproject.tomlso Abstract Backend's loader can discover your package:
[project.entry-points."abe.backends.message_queue"]
acme = "acme_backend.backend:AcmeBackend"
- Run formatting and static checks:
uv run ruff check src tests
uv run mypy src tests
6. Exercise the developer studio testsβ
The template mirrors the testing strategy used in this repository:
# Unit tests validate your code in isolation
uv run pytest tests/unit
# Contract tests ensure interface compatibility with Abstract Backend
uv run pytest tests/contract
# Integration tests spin up optional services (Docker Compose included)
uv run pytest tests/integration
π¨ If contract tests fail, inspect the error messageβit pinpoints missing protocol methods or incorrect async signatures.
7. Try the provider inside Abstract Backendβ
Link your local provider into Abstract Backend for a full workflow run:
# Inside your provider repository
aud pip install -e .
# Switch to your Abstract Backend checkout
cd /path/to/abstract-backend
# Export the provider name so the loader picks it up
export QUEUE_BACKEND=acme
uv run pytest test/contract_test/backends/message_queue/test_loader.py -k acme
When load_backend() resolves to your provider, contract and e2e tests from the core project will run against it, proving compatibility.
8. Publish and shareβ
- Tag a release (
git tag v0.1.0 && git push --tags). - Publish to PyPI (
uv build && uv publish). - Announce the backend in Abstract Backend Discussions with installation instructions.
π¨ Include a link back to your provider documentation so other teams can follow your setup steps.
Additional resourcesβ
abstract-backend-implementation-templatedocumentation- Abstract Backend architecture overview
- Contribution guide if you want to upstream improvements
With the developer studio workflow, you can go from an empty repo to a production-ready provider in hours. Happy building!