Flask Restful Boilerplate

screenshot of Flask Restful Boilerplate
flask

A minimal boilerplate for the RESTful services using Flask, SQLAlchemy and Flask-RestPlus (for the swagger-UI).

Overview

Flask-Restful-Boilerplate is a minimal boilerplate for creating RESTful services using Flask, SQLAlchemy, and Flask-RestPlus. It includes features such as establishing connections to any database using SQLAlchemy, a service logger for logging events, warnings, and errors, a placeholder for declaring constants, a placeholder for declared database models, a config-driven codebase, hosting of Swagger-UI for API documentation, hosting multiple namespaces in the routes, and a custom response generator for payloads.

Features

  • Connection to any database: The boilerplate provides the capabilities to establish connections to any database using SQLAlchemy.
  • Service logger: A logger is included to log all events, warnings, errors, etc. for the service.
  • Declaration of constants: There is a placeholder available for declaring all constants needed in the codebase.
  • Database model declaration: A placeholder is provided for declaring database models.
  • Config-driven: The entire codebase is driven by configuration files, making it easier to customize the service.
  • Swagger-UI documentation: The boilerplate hosts Swagger-UI for easy documentation of the RESTful API.
  • Multiple namespaces: It supports hosting multiple namespaces in the routes.
  • Custom response generator: A custom generator is included for generating responses for payloads.

Summary

Flask-Restful-Boilerplate is a minimal and customizable boilerplate for creating RESTful services using Flask. It includes various features such as database connection, a service logger, declaration of constants and database models, and a config-driven codebase. It also provides hosting for Swagger-UI for API documentation and support for multiple namespaces in the routes. With its custom response generator, it simplifies the development process for RESTful services.

flask
Flask

Flask is a lightweight and popular web framework for Python, known for its simplicity and flexibility. It is widely used to build web applications, providing a minimalistic approach to web development with features like routing, templates, and support for extensions.