ysskrishna logoysskrishna

FastAPI RabbitMQ Celery Flower Starter

Queue SMS and email from your API without freezing the response. Clone a working lab and adapt it.

Get it
Built with
Starter Kits & Boilerplates
Backend & APIs
FastAPI
RabbitMQ
Celery
Flower
PostgreSQL
Docker
Bash
Twilio
Python
Details
FreeAGPL-3.0 licenseCreated April 25, 2025Updated November 12, 2026
Share this product

Your API should not wait on Twilio or an inbox provider

A user signs up and you need a text and a welcome email. The handler should answer fast. The send can take seconds, fail, or retry while your HTTP thread sits there.

FastAPI RabbitMQ Celery Flower Starter is the lab that already wires the split: an API that enqueues work, workers that call providers, persistence for status, and dashboards you can open on localhost.

Accept the job. Let workers carry the slow part.

What you get

  • Fast HTTP, slow work elsewhere. REST endpoints trigger notification jobs without blocking on provider round trips.
  • SMS and email on separate queues. Text and mail do not fight for the same lane when traffic spikes.
  • Tracked message status. A database records what was sent so you are not guessing from logs alone.
  • Visibility while you learn. Broker and worker dashboards start with the compose stack for local debugging.
  • Free AGPL starter. Separate web and worker code you can change, plus a Next.js client added in v1.1.0 for template previews.

Your first morning after cloning

You bring Twilio and Brevo credentials into the web and worker env files, start the stack, and open the interactive API docs. You enqueue a test SMS and a test email. RabbitMQ shows two queues. Flower shows tasks moving. Postgres holds status rows. That loop is the reference before you harden retries, rate limits, or compliance for production.

Ready to try it?

Frequently asked questions

How do I run FastAPI with Celery and RabbitMQ in Docker Compose?

Clone the repo, set the Twilio and Brevo variables in the webserver and worker env files as the README describes, then start everything with Docker Compose. Swagger docs, the broker management UI, Flower, and the API come up on the ports listed in the README.

How do I queue email and SMS from a REST API without blocking?

Call the documented REST surface to enqueue SMS and email jobs. Celery workers pick tasks off RabbitMQ and call Twilio for SMS and Brevo for transactional email while the API returns without waiting on each provider.

Should the Celery worker live in a separate container from FastAPI?

Yes in this layout. Docker Compose runs a webserver service and a worker service, each with its own environment configuration, as described in the README and changelog.

Where do Twilio and Brevo secrets go?

Twilio phone and Brevo from-address values belong in webserver env. Twilio account credentials and the Brevo API key belong in worker env, as shown in the README setup section.

How do I watch queues and workers on my machine?

Use the RabbitMQ management UI on port 15672 and the Flower dashboard on port 5555 after compose is up. README lists default local credentials you must rotate before any shared environment.

Does PostgreSQL store Celery results and message status?

PostgreSQL backs message persistence and the Celery result backend in this project, as described in the changelog and README.

Why not just use FastAPI BackgroundTasks?

Background tasks run in the same process as your API. They are fine for tiny jobs, but they do not give you a durable broker, separate worker processes, or the Flower and RabbitMQ views this starter sets up for learning and prototyping.

Is it free, and what does the licence mean?

The product is listed as Free. The repository is under AGPL-3.0, so if you modify and run it as a network service you need to respect Affero copyleft terms. Delivery rules and telecom compliance still follow Twilio, Brevo, and your jurisdiction, not this repo.

Continue exploring

ProductFastapi Sync Async Starter Template

Fastapi Sync Async Starter Template

Start your FastAPI service with sync and async database patterns wired, tested, and ready to run in Docker.
Backend & APIs
Starter Kits & Boilerplates
+8
ProductExpress FastAPI Protobuf

Express FastAPI Protobuf

Clone a quote browser that keeps JSON at the edge and binary contracts between services.
Backend & APIs
Starter Kits & Boilerplates
+6
ProductFastAPI UV vs Requirements File

FastAPI UV vs Requirements File

Two Docker builds, one FastAPI app. Compare packaging paths on your machine.
DevOps & Infrastructure
Backend & APIs
+6
ProductFlask Nginx Docker Starter

Flask Nginx Docker Starter

Day one should not be proxy wiring. Clone a layout that already puts a front server ahead of your app.
DevOps & Infrastructure
Backend & APIs
+5
ProductFastAPI Nextjs Clerk Starter

FastAPI Nextjs Clerk Starter

Sign-in in the browser, checked tokens on your Python API, without a week of auth wiring.
Auth & Security
Backend & APIs
+9
ProductFastAPI Clerk Starter

FastAPI Clerk Starter

A FastAPI API with Clerk JWT checks and user routes ready on day one.
Auth & Security
Backend & APIs
+8