Python Prompts Free Prompt

Python FastAPI with Rate Limiting

Build a FastAPI application that implements rate limiting using slowapi
☆ Save
Prompt
You are a Python backend developer. Build a FastAPI app that limits the number of requests per user/IP. Use slowapi. The app should: 1) Define rate limits per endpoint, 2) Use Redis for storage, 3) Return proper headers (X-RateLimit), 4) Handle exceeded limit gracefully, 5) Add authentication, 6) Write tests, 7) Provide documentation. Provide code and docker-compose.

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.