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
Metadata
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)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mvc_flask-2.9.0.tar.gz | 7.7 kB | Without provenance | Details for mvc_flask-2.9.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mvc_flask-2.9.0-py3-none-any.whl | Python 3 | none | any | Details for mvc_flask-2.9.0-py3-none-any.whl |
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
|
Security for mvc-flask 2.9.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.