Cursor Rules for
Flask

This rule explains Flask conventions and best practices for lightweight Python web applications.
Back to rules
Type
Backend
Language(s)
Python
Stats
254 views
28 copies
12 downloads
flask.mdc
---
description: This rule explains Flask conventions and best practices for lightweight Python web applications.
globs: **/*.py
alwaysApply: false
---

# Flask rules

- Use Blueprints to organize routes by feature or resource
- Use Flask-SQLAlchemy for database models and ORM
- Use application factories for flexible application initialization
- Use Flask extensions for common functionality (Flask-Login, Flask-WTF, etc.)
- Store configuration in environment variables
- Use Flask-Migrate for database migrations
- Implement proper error handling with error handlers
- Use Flask-RESTful or similar for building APIs
Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later