mvc-flask


Namemvc-flask JSON
Version 2.9.0 PyPI version JSON
download
home_pagehttps://github.com/marcuxyz/mvc_flask
Summaryturn standard Flask into mvc
upload_time2023-11-29 01:29:30
maintainer
docs_urlNone
authorMarcus Pereira
requires_python>=3.8.0,<4.0.0
licenseMIT
keywords flask flask extensions flask mvc flask-mvc mvc flask flask design pattern
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/marcuxyz/mvc_flask) ![GitHub Workflow Status](https://img.shields.io/github/workflow/status/marcuxyz/mvc_flask/unit%20test) ![GitHub](https://img.shields.io/github/license/marcuxyz/mvc_flask) ![PyPI - Downloads](https://img.shields.io/pypi/dm/mvc_flask) ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/mvc_flask) ![PyPI](https://img.shields.io/pypi/v/mvc_flask)

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

## Installation

Run the follow command to install `mvc_flask`:

```shell
$ pip install mvc_flask
```

## Basic Usage

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


```python
from flask import Flask
from mvc_flask import FlaskMVC

app = Flask(__name__)
FlaskMVC(app)
```

Or use `application factories`, e.g:

```python
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:**

```python
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:

```text
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

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/marcuxyz/mvc_flask",
    "name": "mvc-flask",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8.0,<4.0.0",
    "maintainer_email": "",
    "keywords": "flask,flask extensions,flask mvc,flask-mvc,mvc flask,flask design pattern",
    "author": "Marcus Pereira",
    "author_email": "marcus@negros.dev",
    "download_url": "https://files.pythonhosted.org/packages/19/23/31f38d85fed58a7257617c9627fb73a759da209a34264920d956776475ac/mvc_flask-2.9.0.tar.gz",
    "platform": null,
    "description": "![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/marcuxyz/mvc_flask) ![GitHub Workflow Status](https://img.shields.io/github/workflow/status/marcuxyz/mvc_flask/unit%20test) ![GitHub](https://img.shields.io/github/license/marcuxyz/mvc_flask) ![PyPI - Downloads](https://img.shields.io/pypi/dm/mvc_flask) ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/mvc_flask) ![PyPI](https://img.shields.io/pypi/v/mvc_flask)\n\nYou can use the MVC pattern in your Flask application using this extension.\n\n## Installation\n\nRun the follow command to install `mvc_flask`:\n\n```shell\n$ pip install mvc_flask\n```\n\n## Basic Usage\n\nTo start the `mvc_flask` you need to import and register in your application.\n\n\n```python\nfrom flask import Flask\nfrom mvc_flask import FlaskMVC\n\napp = Flask(__name__)\nFlaskMVC(app)\n```\n\nOr use `application factories`, e.g:\n\n```python\nmvc = FlaskMVC()\n\ndef create_app():\n  ...\n  mvc.init_app(app)\n```\n\n**By default the `mvc_flask` assumes that your application directory will be `app` and if it doesn't exist, create it!**\n**If you can use other directories, you can use the `path` parameter when the instance of FlaskMVC is initialized. E.g:**\n\n```python\nmvc = FlaskMVC()\n\ndef create_app():\n  ...\n  mvc.init_app(app, path='src')\n```\n\nNow, you can use `src` as default directory for prepare your application.\n\nYou structure should be look like this:\n\n```text\napp\n\u251c\u2500\u2500 __ini__.py\n\u251c\u2500\u2500 controllers\n\u2502   \u2514\u2500\u2500 home_controller.py\n\u251c\u2500\u2500 routes.py\n\u2514\u2500\u2500 views\n    \u251c\u2500\u2500 index.html\n```\n\nPlease visit the documentation to check more details https://marcuxyz.github.io/mvc-flask\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "turn standard Flask into mvc",
    "version": "2.9.0",
    "project_urls": {
        "Homepage": "https://github.com/marcuxyz/mvc_flask",
        "Repository": "https://github.com/marcuxyz/mvc_flask"
    },
    "split_keywords": [
        "flask",
        "flask extensions",
        "flask mvc",
        "flask-mvc",
        "mvc flask",
        "flask design pattern"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "23dbc91dc41ec57aa202403c1f8eddf321527e241de17a6096bf0ce7dc23f5ae",
                "md5": "fb39bf59ab0b3821f761297be1b4e36d",
                "sha256": "41fc8be06b1239c49873b8a2f4118f0714c32ed6ae163a98fa3ee3b246a67b69"
            },
            "downloads": -1,
            "filename": "mvc_flask-2.9.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "fb39bf59ab0b3821f761297be1b4e36d",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8.0,<4.0.0",
            "size": 9699,
            "upload_time": "2023-11-29T01:29:28",
            "upload_time_iso_8601": "2023-11-29T01:29:28.774178Z",
            "url": "https://files.pythonhosted.org/packages/23/db/c91dc41ec57aa202403c1f8eddf321527e241de17a6096bf0ce7dc23f5ae/mvc_flask-2.9.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "192331f38d85fed58a7257617c9627fb73a759da209a34264920d956776475ac",
                "md5": "c6d27eff9c5923e27e6db1928fc06fad",
                "sha256": "ad1d7c6ab3b2eec38fcfd86589c53675e27a96fcd2913bbfe41fc7a94c9c6ed7"
            },
            "downloads": -1,
            "filename": "mvc_flask-2.9.0.tar.gz",
            "has_sig": false,
            "md5_digest": "c6d27eff9c5923e27e6db1928fc06fad",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8.0,<4.0.0",
            "size": 7672,
            "upload_time": "2023-11-29T01:29:30",
            "upload_time_iso_8601": "2023-11-29T01:29:30.693014Z",
            "url": "https://files.pythonhosted.org/packages/19/23/31f38d85fed58a7257617c9627fb73a759da209a34264920d956776475ac/mvc_flask-2.9.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-11-29 01:29:30",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "marcuxyz",
    "github_project": "mvc_flask",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "mvc-flask"
}
        
Elapsed time: 1.68201s