Skip to content

Commit 224f1de

Browse files
authored
Updated documentation references to reflect the new package name. (#78)
* feat: Introduce core structure for Flask MVC - Added core package with configuration, exceptions, file handling, and name utilities. - Implemented controller generation logic with template rendering. - Established middleware for routing and callback handling. - Created input method helper for handling hidden input fields in forms. - Developed a base controller template for MVC structure. - Updated project structure and renamed package from `mvc_flask` to `flask_mvc`. - Enhanced testing framework with comprehensive tests for new features. - Updated documentation references to reflect the new package name. * refactor(makefile): update format and check targets to specify directories * chore: update black version to 25.1.0 and adjust Python version requirement * chore: update pytest version to 8.4.1 in dependencies
1 parent 5b92c0d commit 224f1de

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+290
-298
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
make check
5454
5555
- name: Run tests
56-
run: poetry run pytest --cov=mvc_flask --cov-report=xml --cov-report=term-missing
56+
run: poetry run pytest --cov=flask_mvc --cov-report=xml --cov-report=term-missing
5757

5858
- name: Upload coverage to Codecov
5959
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.10'
@@ -83,7 +83,7 @@ jobs:
8383

8484
- name: Run security checks
8585
run: |
86-
poetry run bandit -r mvc_flask
86+
poetry run bandit -r flask_mvc
8787
8888
build:
8989
name: Build Package

README.md

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,19 @@
44

55
![Flask MVC Logo](https://img.shields.io/badge/Flask-MVC-blue?style=for-the-badge&logo=flask)
66

7-
[![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/marcuxyz/mvc_flask?style=flat-square)](https://github.com/marcuxyz/mvc_flask)
8-
[![GitHub Workflow Status](https://img.shields.io/github/workflow/status/marcuxyz/mvc_flask/unit%20test?style=flat-square)](https://github.com/marcuxyz/mvc_flask/actions)
9-
[![GitHub](https://img.shields.io/github/license/marcuxyz/mvc_flask?style=flat-square)](https://github.com/marcuxyz/mvc_flask/blob/main/LICENSE)
10-
[![PyPI - Downloads](https://img.shields.io/pypi/dm/mvc_flask?style=flat-square)](https://pypi.org/project/mvc_flask/)
11-
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/mvc_flask?style=flat-square)](https://pypi.org/project/mvc_flask/)
12-
[![PyPI](https://img.shields.io/pypi/v/mvc_flask?style=flat-square)](https://pypi.org/project/mvc_flask/)
7+
[![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/marcuxyz/flask-mvc?style=flat-square)](https://github.com/marcuxyz/flask-mvc)
8+
[![GitHub Workflow Status](https://img.shields.io/github/workflow/status/marcuxyz/flask-mvc/unit%20test?style=flat-square)](https://github.com/marcuxyz/flask-mvc/actions)
9+
[![GitHub](https://img.shields.io/github/license/marcuxyz/flask-mvc?style=flat-square)](https://github.com/marcuxyz/flask-mvc/blob/main/LICENSE)
10+
[![PyPI - Downloads](https://img.shields.io/pypi/dm/flask_mvc?style=flat-square)](https://pypi.org/project/flask_mvc/)
11+
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/flask_mvc?style=flat-square)](https://pypi.org/project/flask_mvc/)
12+
[![PyPI](https://img.shields.io/pypi/v/flask_mvc?style=flat-square)](https://pypi.org/project/flask_mvc/)
1313
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg?style=flat-square)](https://github.com/psf/black)
1414

1515
**Transform your Flask application into a structured MVC architecture with powerful CLI tools**
1616

1717
[Installation](#installation)
1818
[Quick Start](#quick-start)
19-
[Documentation](https://marcuxyz.github.io/mvc-flask)
19+
[Documentation](https://marcuxyz.github.io/flask-mvc)
2020
[Examples](#examples)
2121
[Contributing](#contributing)
2222

@@ -38,20 +38,20 @@
3838
### Using pip
3939

4040
```bash
41-
pip install mvc_flask
41+
pip install flask_mvc
4242
```
4343

4444
### Using Poetry
4545

4646
```bash
47-
poetry add mvc_flask
47+
poetry add flask_mvc
4848
```
4949

5050
### Development Installation
5151

5252
```bash
53-
git clone https://github.com/marcuxyz/mvc_flask.git
54-
cd mvc_flask
53+
git clone https://github.com/marcuxyz/flask-mvc.git
54+
cd flask_mvc
5555
poetry install
5656
```
5757

@@ -61,7 +61,7 @@ poetry install
6161

6262
```python
6363
from flask import Flask
64-
from mvc_flask import FlaskMVC
64+
from flask_mvc import FlaskMVC
6565

6666
app = Flask(__name__)
6767
FlaskMVC(app)
@@ -74,7 +74,7 @@ if __name__ == "__main__":
7474

7575
```python
7676
from flask import Flask
77-
from mvc_flask import FlaskMVC
77+
from flask_mvc import FlaskMVC
7878

7979
mvc = FlaskMVC()
8080

@@ -242,7 +242,7 @@ export FLASK_MVC_FILE_ENCODING="utf-8"
242242
### Programmatic Configuration
243243

244244
```python
245-
from mvc_flask.core.config import CLIConfig
245+
from flask_mvc.core.config import CLIConfig
246246

247247
# Override default settings
248248
CLIConfig.DEFAULT_CONTROLLERS_PATH = "src/controllers"
@@ -255,8 +255,8 @@ Flask MVC is built with testing in mind:
255255

256256
```python
257257
import pytest
258-
from mvc_flask.core.generators import ControllerGenerator
259-
from mvc_flask.core.exceptions import InvalidControllerNameError
258+
from flask_mvc.core.generators import ControllerGenerator
259+
from flask_mvc.core.exceptions import InvalidControllerNameError
260260

261261
def test_controller_generation():
262262
generator = ControllerGenerator()
@@ -272,11 +272,11 @@ def test_controller_generation():
272272

273273
## 📚 Documentation
274274

275-
- **[Full Documentation](https://marcuxyz.github.io/mvc-flask)** - Complete guide and API reference
276-
- **[Quick Start Guide](https://marcuxyz.github.io/mvc-flask/quickstart)** - Get up and running fast
277-
- **[Controller Guide](https://marcuxyz.github.io/mvc-flask/controllers)** - Working with controllers
278-
- **[Router Guide](https://marcuxyz.github.io/mvc-flask/router)** - Route configuration
279-
- **[CLI Reference](https://marcuxyz.github.io/mvc-flask/cli)** - Command-line tools
275+
- **[Full Documentation](https://marcuxyz.github.io/flask-mvc)** - Complete guide and API reference
276+
- **[Quick Start Guide](https://marcuxyz.github.io/flask-mvc/quickstart)** - Get up and running fast
277+
- **[Controller Guide](https://marcuxyz.github.io/flask-mvc/controllers)** - Working with controllers
278+
- **[Router Guide](https://marcuxyz.github.io/flask-mvc/router)** - Route configuration
279+
- **[CLI Reference](https://marcuxyz.github.io/flask-mvc/cli)** - Command-line tools
280280

281281
## 🤝 Contributing
282282

@@ -286,8 +286,8 @@ We welcome contributions! Please see our [Contributing Guidelines](CONTRIBUTING.
286286

287287
```bash
288288
# Clone the repository
289-
git clone https://github.com/marcuxyz/mvc_flask.git
290-
cd mvc_flask
289+
git clone https://github.com/marcuxyz/flask-mvc.git
290+
cd flask_mvc
291291

292292
# Install dependencies
293293
poetry install
@@ -305,8 +305,8 @@ poetry run mkdocs serve
305305

306306
### Reporting Issues
307307

308-
- **[Bug Reports](https://github.com/marcuxyz/mvc_flask/issues/new?template=bug_report.md)**
309-
- **[Feature Requests](https://github.com/marcuxyz/mvc_flask/issues/new?template=feature_request.md)**
308+
- **[Bug Reports](https://github.com/marcuxyz/flask-mvc/issues/new?template=bug_report.md)**
309+
- **[Feature Requests](https://github.com/marcuxyz/flask-mvc/issues/new?template=feature_request.md)**
310310

311311
## 📋 Requirements
312312

@@ -327,9 +327,9 @@ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file
327327

328328
## 📊 Stats
329329

330-
![GitHub stars](https://img.shields.io/github/stars/marcuxyz/mvc_flask?style=social)
331-
![GitHub forks](https://img.shields.io/github/forks/marcuxyz/mvc_flask?style=social)
332-
![GitHub watchers](https://img.shields.io/github/watchers/marcuxyz/mvc_flask?style=social)
330+
![GitHub stars](https://img.shields.io/github/stars/marcuxyz/flask-mvc?style=social)
331+
![GitHub forks](https://img.shields.io/github/forks/marcuxyz/flask-mvc?style=social)
332+
![GitHub watchers](https://img.shields.io/github/watchers/marcuxyz/flask-mvc?style=social)
333333

334334
---
335335

REFACTOR_SUMMARY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# MVC Flask Test Refactor Summary
1+
# Flask MVC Test Refactor Summary
22

33
## Final Status: ✅ COMPLETED SUCCESSFULLY
44

docs/index.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,35 +2,35 @@
22

33
<p align="center">This extension facilitates the application of this design pattern in Flask </p>
44
<p align="center">
5-
<a href="https://github.com/marcuxyz/mvc-flask/actions/workflows/test.yml">
6-
<img src="https://github.com/marcuxyz/mvc-flask/actions/workflows/test.yml/badge.svg?branch=main" alt="unit test" height="18">
5+
<a href="https://github.com/marcuxyz/flask-mvc/actions/workflows/test.yml">
6+
<img src="https://github.com/marcuxyz/flask-mvc/actions/workflows/test.yml/badge.svg?branch=main" alt="unit test" height="18">
77
</a>
8-
<a href="https://badge.fury.io/py/mvc-flask">
9-
<img src="https://badge.fury.io/py/mvc-flask.svg" alt="PyPI version" height="18">
8+
<a href="https://badge.fury.io/py/flask-mvc">
9+
<img src="https://badge.fury.io/py/flask-mvc.svg" alt="PyPI version" height="18">
1010
</a>
1111
</p>
1212

1313

1414
Designed to allow developers to implement the Model-View-Controller (MVC) design pattern in Flask applications with the help of this extension.
1515
<hr />
1616

17-
Install MVC Flask using pip:
17+
Install Flask MVC using pip:
1818

1919
```shell
20-
$ pip install mvc_flask
20+
$ pip install flaskmvc
2121
```
2222

23-
Install MVC Flask using poetry:
23+
Install Flask MVC using poetry:
2424

2525
```shell
26-
$ poetry add mvc_flask
26+
$ poetry add flaskmvc
2727
```
2828

2929
Now, let's get started:
3030

3131
```python
3232
from flask import Flask
33-
from mvc_flask import FlaskMVC
33+
from flask_mvc import FlaskMVC
3434
from flask_sqlalchemy import SQLAlchemy
3535

3636
db = SQLAlchemy()
@@ -50,7 +50,7 @@ def create_app():
5050

5151
## Features
5252

53-
MVC Flask builds on provides the best architecture experience for Flask, and gives you:
53+
Flask MVC builds on provides the best architecture experience for Flask, and gives you:
5454

5555
- You can directories as controllers, models, and views.
5656
- It Supports the controllers' creation, and you can separate the logic of your application of business rules
@@ -60,4 +60,4 @@ MVC Flask builds on provides the best architecture experience for Flask, and giv
6060

6161
## Dependencies
6262

63-
MVC Flask just depends on the Flask extensions to working and requires Python >=3.8.0,<4.0.0.
63+
Flask MVC just depends on the Flask extensions to working and requires Python >=3.8.0,<4.0.0.

docs/quickstart.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# Quickstart
22

3-
To start the use `mvc_flask` you need to import and register in your application, e.g:
3+
To start the use `flask_mvc` you need to import and register in your application, e.g:
44

55
```python
66
from flask import Flask
7-
from mvc_flask import FlaskMVC
7+
from flask_mvc import FlaskMVC
88

99
app = Flask(__name__)
1010
FlaskMVC(app)
@@ -32,7 +32,7 @@ app
3232
├── index.html
3333
```
3434

35-
**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 another directory, you can use the path parameter when the instance of FlaskMVC is initialized. E.g:**
35+
**By default, the flask_mvc assumes that your application directory will be app and if it doesn't exist, create it! If you can use another directory, you can use the path parameter when the instance of FlaskMVC is initialized. E.g:**
3636

3737
```python
3838
mvc = FlaskMVC()

docs/router.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
You can create routes in `app/routes.py` and after creating file, you can start to register routes, e.g:
44

55
```python
6-
from mvc_flask import Router
6+
from flask_mvc import Router
77

88
Router.get("/", "home#index")
99
```
@@ -54,7 +54,7 @@ The parameter only accept `string` or `array`, so, you can use `only=["index", "
5454
You can use namespaces to group the routes.
5555

5656
```python
57-
from mvc_flask import Router
57+
from flask_mvc import Router
5858

5959
api = Router.namespace("/api/v1")
6060

docs/views.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Views
22

3-
Flask uses the templates directory by default to store HTML files. However, using the `mvc-flask` the default becomes `views`.
3+
Flask uses the templates directory by default to store HTML files. However, using the `flask-mvc` the default becomes `views`.
44
You can use the app/views directory to store templates.
55

66
Please if you create template, use `views` for folder name, instead of `templates`.

flask_mvc/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from .flask_mvc import FlaskMVC, Router
2+
3+
__all__ = ["FlaskMVC", "Router"]
File renamed without changes.

mvc_flask/cli.py renamed to flask_mvc/cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
@click.group()
2626
def mvc():
27-
"""MVC Flask commands."""
27+
"""Flask MVC commands."""
2828
pass
2929

3030

0 commit comments

Comments
 (0)