Flask Rest Api

screenshot of Flask Rest Api
flask

REST API boilerplate using Flask, SQLAlchemy, Docker, and Pydantic

Overview

The Flask REST API Boilerplate is a repository that aims to improve the process of building RESTful APIs using Flask. It addresses common pain points and provides a modularized approach to developing APIs while following the DRY (Don't Repeat Yourself) principle. Unlike other Flask spin-offs, the boilerplate uses only core Flask, ensuring compatibility with the latest version of Flask for your application. The tech stack includes Flask as the web framework, SQLAlchemy as the ORM, PostgresSQL as the database, Pydantic for parsing and validation, Docker for containerization, Celery for async-task queueing, RabbitMQ as the message-broker, Gunicorn as the WSGI server, and NGINX as the reverse proxy server. The documentation is implemented using Swagger-UI.

Features

  • Containerized Docker build
  • Separate docker services for database, message-broker, API, and documentation
  • Easy customization of the API by editing docker-compose and .env files
  • Support for separate environments and configurations
  • RESTful API documentation and visualization with Swagger and Swagger UI
  • Easy integration of different API versions
  • Authentication via JWT
  • Email verification
  • OAuth support for Github and Facebook
  • Parsing and validation using Pydantic
  • Integration of database entities with SQLAlchemy
  • Tests covering each API service with code coverage

Summary

The Flask REST API Boilerplate aims to simplify the process of building RESTful APIs with Flask by addressing common pain points and providing a modularized and scalable approach. By using core Flask and a variety of tools, such as Docker, SQLAlchemy, Pydantic, and Swagger-UI, the boilerplate offers a comprehensive solution for building robust and well-documented APIs.

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.