A CLI tool for Flaskion โ a lightweight MVC micro-framework built on Flask
Project description
Flaskion
Flaskion is a lightweight MVC micro-framework for Flask, providing developers with a structured foundation for scalable, maintainable applications. Inspired by Laravel, Flaskion introduces clean architecture, modular scaffolding, and a developer-first CLI to streamline your Flask workflow.
๐ Features
โ
MVC Architecture โ Clean separation of controllers, models, and templates
โ
Built-in CLI โ Scaffold full resources, controllers, models, and authentication with ease
โ
Web & API Routing โ Clean route structure split between HTML and JSON endpoints
โ
DB Choice at Setup โ Use SQLite, MySQL, or Postgres with built-in .env generation
โ
Flask-Migrate Ready โ Migrations are set up and ready to run on first build
โ
Authentication Scaffolding โ Generate full auth (login/register/logout/dashboard) with one command
๐ Project Structure
flaskion/
โโโ app/
โ โโโ __init__.py # Application factory
โ โโโ routes/ # Web + API routes
โ โ โโโ web_routes.py
โ โ โโโ api_routes.py
โ โโโ controllers/ # View logic
โ โโโ models/ # SQLAlchemy models
โ โโโ schemas/ # Marshmallow schemas
โ โโโ templates/ # Jinja2 templates
โ โโโ static/ # CSS, JS, images
โ โโโ config.py # App configuration
โโโ migrations/ # Auto-generated with Flask-Migrate
โโโ run.py # Entry point
โโโ requirements.txt # Dependencies
โโโ .env.example # Example environment file
โโโ README.md # This doc
๐งช Installation & Setup
1. Install the CLI
pipx install flaskion-cli
# or
pip install flaskion-cli
2. Create a New Project
flaskion make:new myproject --db=sqlite # Or --db=mysql / --db=postgres
3. Enter the project & activate venv
cd myproject
source venv/bin/activate
โ๏ธ CLI Commands
| Command | Description |
|---|---|
flaskion make:new <name> |
Create a new project scaffold |
flaskion make:model |
Create a SQLAlchemy model |
flaskion make:schema |
Create a Marshmallow schema |
flaskion make:controller |
Create a controller with CRUD methods |
flaskion make:resource |
Generate model + controller + schema + routes |
flaskion make:auth |
Generate full login/register/logout system |
Add
--apitomake:resourcefor API route generation instead of web views.
๐ฃ๏ธ Managing Routes
Flaskion separates routes for HTML views and API endpoints:
- Web Routes:
app/routes/web_routes.py - API Routes:
app/routes/api_routes.py
Both are registered in app/__init__.py:
from app.routes.api_routes import api_routes
from app.routes.web_routes import web_routes
def register_routes(app):
app.register_blueprint(api_routes)
app.register_blueprint(web_routes)
๐งฌ Database Migrations
Flaskion uses Flask-Migrate out of the box:
flask db init
flask db migrate -m "Initial"
flask db upgrade
๐ Authentication
Generate full login/register/logout and dashboard flow:
flaskion make:auth
- HTML templates auto-created under
templates/auth/ - Session-based login using Flask sessions
- Routes for
/login,/register,/dashboard, and/logout
โถ๏ธ Running the App
flask run
Then visit: http://127.0.0.1:5000
๐ Documentation
Coming soon at: https://flaskion.dev (in progress)
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.9.2.tar.gz.
File metadata
- Download URL: flaskion_cli-1.0.9.2.tar.gz
- Upload date:
- Size: 91.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
423978436afcd4a8d1f39e62af70a9b7c161b23863519c0ac1a2d0a90a832db6
|
|
| MD5 |
1fbd6ad1213dd5fc011e2a934926e1a9
|
|
| BLAKE2b-256 |
9ecb3b9e48c6dcddd5f54caeef6386e0ad9fd8b3ab4c8d81171dc83ffb3b74cc
|
File details
Details for the file flaskion_cli-1.0.9.2-py3-none-any.whl.
File metadata
- Download URL: flaskion_cli-1.0.9.2-py3-none-any.whl
- Upload date:
- Size: 96.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8f05bcee44ae7d7d14054b33b5c9b8e83cbf2492297d59931085cdda0aaaf39f
|
|
| MD5 |
646ae58ed013fe13b48885be6d32baa5
|
|
| BLAKE2b-256 |
a792bdd774034d5c860f30254b69d9c30a4b0d60e46caad7299f0a5c586baa37
|