Python Prompts Free Prompt

Python FastAPI Background Task Processing

Build a FastAPI application that offloads long-running tasks to a background worker using Celery
☆ Save
Prompt
You are a Python backend developer. Build a FastAPI app that accepts tasks (e.g., image processing) and processes them asynchronously with Celery. The app should: 1) Have an endpoint to submit a task, 2) Return a task ID, 3) Provide an endpoint to check task status and result, 4) Use Redis as broker, 5) Include a worker that performs the task, 6) Handle errors and retries, 7) Write tests. Provide docker-compose for FastAPI, Celery, Redis.

How to use this prompt

1
Click Copy Prompt above to copy to your clipboard.
2
Open ChatGPT, Claude, Gemini, or any AI assistant and paste the prompt.
3
Replace any [PLACEHOLDER] values with your specific details.
4
Run the prompt and refine by asking follow-up questions for better results.