Skip to main content

A CLI tool for Flaskion — a lightweight MVC micro-framework built on 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

  1. Install Flaskion CLI** (if not installed):
    pip install flaskion-cli
    
  2. Create a new Flaskion project:
flaskion new myproject
  1. Navigate into your new project:
    cd myproject
    
  2. Create a virtual environment:
    python -m venv venv
    source venv/bin/activate   # On Windows: venv\Scripts\activate
    
  3. 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

  1. Start the Flask development server:
    flask run --debug
    
  2. Visit the app in your browser: http://127.0.0.1:5000

Documentation

Coming Soon

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flaskion-cli-1.0.8.2.tar.gz (89.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

flaskion_cli-1.0.8.2-py3-none-any.whl (92.5 kB view details)

Uploaded Python 3

File details

Details for the file flaskion-cli-1.0.8.2.tar.gz.

File metadata

  • Download URL: flaskion-cli-1.0.8.2.tar.gz
  • Upload date:
  • Size: 89.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.8

File hashes

Hashes for flaskion-cli-1.0.8.2.tar.gz
Algorithm Hash digest
SHA256 ad1a9815526d50e70023e5328764bf009076138d3b6dab5cd37f12821fd614f1
MD5 e86b8b3a8ef5682830847a24172c3763
BLAKE2b-256 f462054505e5268e89982c01e91b032170ccb3c3cbe4fb269c59759a1eeac510

See more details on using hashes here.

File details

Details for the file flaskion_cli-1.0.8.2-py3-none-any.whl.

File metadata

  • Download URL: flaskion_cli-1.0.8.2-py3-none-any.whl
  • Upload date:
  • Size: 92.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.8

File hashes

Hashes for flaskion_cli-1.0.8.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f715dfad28d6d9b80ba0bcc4093cefeb81bd53b9fe3d8e77a6441cb6a5428444
MD5 9e1a8dfe2474262950a0bfbe73d2303d
BLAKE2b-256 138d6337b153048c80d5370c7f1ef4e4b49589f664af01f98c059967e1c46a7f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page