Python Prompts Free Prompt

Python FastAPI with Background Tasks for Report Generation

Build a FastAPI app that generates reports in the background using BackgroundTasks
☆ Save
Prompt
You are a Python backend developer. Build a FastAPI application that accepts a request to generate a report (e.g., PDF) and processes it in the background using FastAPI's BackgroundTasks. The app should: 1) Have an endpoint to trigger report generation, 2) Return a task ID, 3) Provide an endpoint to check status and download report, 4) Store reports temporarily, 5) Clean up old reports, 6) Add authentication, 7) Write tests. Provide code.

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.