Python Prompts Free Prompt

Python Flask App for URL Shortener

Build a URL shortener web application using Flask
☆ Save
Prompt
You are a Python web developer. Build a URL shortener service using Flask. The app should: 1) Allow users to submit a long URL and receive a short code, 2) Redirect short URLs to the original URL, 3) Store mappings in a database (SQLite), 4) Provide analytics: click count, referrers, timestamps, 5) Include a simple API for programmatic access, 6) Generate short codes using base62 encoding, 7) Handle custom aliases, 8) Add rate limiting. Include tests and a Dockerfile.

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.