A CLI tool to scaffold Flaskion projects — a lightweight MVC boilerplate for Flask
Project description
Flaskion
Flaskion is a lightweight MVC boilerplate for Flask, providing developers with a structured foundation for Flask applications. Inspired by Laravel, Flaskion brings modular architecture, scalability, and a clean codebase to Flask projects.
Features
✅ MVC Architecture – Clear separation of concerns with controllers, models, and templates.
✅ Centralized Routing – Web and API routes are separated for better organization.
✅ Built-in CLI – Generate new Flaskion projects instantly with flaskion new {projectname}.
✅ Scalability – Pre-configured to integrate with Flask extensions like SQLAlchemy, Flask-Migrate, and more.
✅ Reusability – Easily adaptable for any Flask project.
Project Structure
flaskion/
├── app/
│ ├── init.py # Application factory
│ ├── routes/ # Folder for all routes
│ │ ├── web_routes.py # Routes for web views
│ │ ├── api_routes.py # Routes for APIs
│ ├── controllers/
| |── schemas/ # Database Schemas
│ ├── models/ # Database models
│ ├── templates/ # HTML templates
│ ├── static/ # Static files (CSS, JS, images)
│ └── config.py # Configuration
├── run.py # Entry point
├── requirements.txt # Dependencies
├── .env.example # Enviroment File
└── README.md # Documentation
Getting Started
Installation
- Install Flaskion CLI** (if not installed):
pip install flaskion-cli
- Create a new Flaskion project:
flaskion new myproject
- Navigate into your new project:
cd myproject
- Create a virtual environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
- Install dependencies:
pip install -r requirements.txt
Managing Routes
Flaskion organizes routes into a dedicated routes/ folder, separating Web Routes and API Routes. • Web Routes (routes/web_routes.py) Defines routes for pages that return HTML views. • API Routes (routes/api_routes.py) Handles JSON-based API requests.
Both are registered inside app/init.py:
from flask import Flask
from app.routes.api_routes import api_routes
from app.routes.web_routes import web_routes
def register_routes(app: Flask):
app.register_blueprint(api_routes)
app.register_blueprint(web_routes)
Running the App
- Start the Flask development server:
flask run --debug
- Visit the app in your browser: http://127.0.0.1:5000
Documentation
Coming Soon
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file flaskion_cli-1.0.8.tar.gz.
File metadata
- Download URL: flaskion_cli-1.0.8.tar.gz
- Upload date:
- Size: 90.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f72c0d9e4ad609abd0ebc7129d81ef63aecf5c3fd6df5246e027d3e6a65cbd3f
|
|
| MD5 |
fcba579c8327a1ae125e2e2200e7ce0b
|
|
| BLAKE2b-256 |
13faea19280a6bcd6296f2665af70899954830344f586332797a5200d516f2fd
|
File details
Details for the file flaskion_cli-1.0.8-py3-none-any.whl.
File metadata
- Download URL: flaskion_cli-1.0.8-py3-none-any.whl
- Upload date:
- Size: 96.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d8693ec8aee318641091ea8de92e160c87629efbf62668a0fb4f7ddfc6d5bdac
|
|
| MD5 |
ffe76d242015824d41d63a6a6250d549
|
|
| BLAKE2b-256 |
87193cc8dd60b4e7c7da693615e84c9c4bc83f9bfdb17bcdd7fb14b9276d47a2
|