Python is an interpreted, high-level, and general-purpose programming language. It can be used to develop business applications as well as system scripts, has data science related capabilities, desktop GUIs, and also offers many choices for web and internet development.
Flask is a micro web framework written in Python that helps you build web applications easily. It does not require tools or libraries and has no database abstraction layer, form validation, serializers, user management, or built-in internationalization. However, it supports extensions that can add application features as if they were implemented in Flask itself. An aspiring Flask developer must then choose the right extensions and combine them together to get the right set of functions, as applicable.
The aim of this tutorial is working with Flask extensions that help us create a production environment ready Python application and to integrate with Swagger UI without a hitch. We will learn to build a Rest API using Flask extensions such as Flask-RestPlus, Flask-Marshmallow, and Flask-SQLAlchemy and share the API using Swagger UI.
Flask and Flask-RestPlus
Flask is a lightweight web server and framework. Although, we can create a Web API directly with flask, the Flask-RESTPlus extension makes it simpler to build Rest APIs.
It supports namespaces, which are ways of creating prefixes and structuring the code.
It has a full solution for parsing and validating the input parameters. This means that we have an easy way of dealing with endpoints that require several parameters and validate them.
Its best feature is the ability to automatically generate interactive documentation for our API using Swagger UI.
Flask-Marshmallow
Marshmallow is an ORM/ODM/framework-agnostic library developed to simplify the process of serialization and deserialization. The Flask-Marshmallow extension acts as a thin integration layer for Flask and Marshmallow that adds additional features to Marshmallow, including URL and hyperlink fields for HATEOAS-ready APIs. It also integrates with Flask-SQLAlchemy and reduces some boilerplate code.

#flask-restful #flask #flask-sqlalchemy #python3

Building REST APIs using Flask-RESTPlus, SQLAlchemy & Marshmallow
3.70 GEEK