Demo of my progression of developing Flask applications.
Order of progression lines up with the alphabetical ordering:
-
flask_app.py
Native Flask application with manual input validation and manual output jsonification
-
flask_marshmallow_app.py
Native Flask application with manual input validation via Marshmallow
-
smorest_app.py
Flask appliation with flask-smorest Blueprints to automatically integrate Marshmallow input validation. But still get a dict inside the route function.
-
smorest_class_app.py
Flask appliation with flask-smorest Blueprints to automatically integrate Marshmallow input validation. But get a class inside the route function. Downside is that we need both a DTO schema and DTO class.
-
smorest_dataclass_app.py
Flask appliation with flask-smorest Blueprints to automatically integrate Marshmallow input validation. Get a class inside the route function. Only need to define a dataclass, which will generate the DTO schema.