Skip to main content

GitHub code size in bytes GitHub Workflow Status GitHub PyPI - Downloads PyPI - Python Version PyPI

You can use the MVC pattern in your Flask application using this extension.

Installation

Run the follow command to install mvc_flask:

$ pip install mvc_flask

Basic Usage

To start the mvc_flask you need to import and register in your application.

from flask import Flask
from mvc_flask import FlaskMVC

app = Flask(__name__)
FlaskMVC(app)

Or use application factories, e.g:

mvc = FlaskMVC()

def create_app():
  ...
  mvc.init_app(app)

By default the mvc_flask assumes that your application directory will be app and if it doesn't exist, create it! If you can use other directories, you can use the path parameter when the instance of FlaskMVC is initialized. E.g:

mvc = FlaskMVC()

def create_app():
  ...
  mvc.init_app(app, path='src')

Now, you can use src as default directory for prepare your application.

You structure should be look like this:

app
├── __ini__.py
├── controllers
│   └── home_controller.py
├── routes.py
└── views
    ├── index.html

Please visit the documentation to check more details https://marcuxyz.github.io/mvc-flask

Release files for mvc-flask 2.9.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mvc-flask 2.9.0
File Size Uploaded
mvc_flask-2.9.0.tar.gz 7.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mvc-flask 2.9.0
File Interpreter ABI Platform
mvc_flask-2.9.0-py3-none-any.whl Python 3 none any Details

Total release size: 17.4 kB

Release files / mvc_flask-2.9.0.tar.gz

Download URL mvc_flask-2.9.0.tar.gz
Size 7.7 kB
Tags Source
SHA-256 checksum
How to use checksums
ad1d7c6ab3b2eec38fcfd86589c53675e27a96fcd2913bbfe41fc7a94c9c6ed7
BLAKE2b-256 checksum
How to use checksums
192331f38d85fed58a7257617c9627fb73a759da209a34264920d956776475ac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.6.1 CPython/3.10.12 Darwin/23.1.0

Release files / mvc_flask-2.9.0-py3-none-any.whl

Download URL mvc_flask-2.9.0-py3-none-any.whl
Size 9.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
41fc8be06b1239c49873b8a2f4118f0714c32ed6ae163a98fa3ee3b246a67b69
BLAKE2b-256 checksum
How to use checksums
23dbc91dc41ec57aa202403c1f8eddf321527e241de17a6096bf0ce7dc23f5ae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.6.1 CPython/3.10.12 Darwin/23.1.0

Release history Release notifications | RSS feed

This release

2.9.0 This release

2 release files

2.8.2

2 release files

2.8.1

2 release files

2.7.2

2 release files

2.7.1

2 release files

2.7.0

2 release files

2.5.0

2 release files

2.4.0

2 release files

2.3.1

2 release files

2.3.0

2 release files

2.2.0

2 release files

2.1.0

2 release files

2.0.0

2 release files

1.0.2

2 release files

1.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page