Mofanhu

screenshot of Mofanhu
flask

A robust template for Flask applications

Overview:

mofanhu is a robust template for Flask applications. It provides a clean and organized structure for medium to large web projects, following the 12 Factor App ideals. It comes with a well-configured Flask CLI tool for user friendliness and integrated debugging tools for easier debugging. It also supports PostgreSQL database and ORM models using SQLAlchemy, migrations with alembic, and background tasks with dramatiq. With mofanhu, you can easily configure your project to run on Heroku and separate production, testing, and development requirements. The template also includes basic code linting, testing with tox and py.test, and support for WSGI servers and Docker.

Features:

  • Python 3.8 as a base: Uses Python 3.8 as the base for the application.
  • Clean and organized structure: Provides a clean and organized structure for medium to large web projects.
  • Flask CLI tool: Comes with a well-configured Flask CLI tool for user friendliness.
  • Integrated debugging tools: Includes integrated Konch and DebugToolbar for easier debugging.
  • Project configuration based on environs: Allows automatic validation and type conversion of project configurations.
  • Development configuration using direnv: Supports development configuration using direnv, overridable by environment variables.
  • Support for PostgreSQL database and ORM models: Supports PostgreSQL database and ORM models using SQLAlchemy.
  • Support for migrations with alembic: Includes support for migrations with alembic.
  • Support for background tasks with dramatiq: Supports background tasks with dramatiq.
  • Configuration for running on Heroku: Provides configuration for running the application on Heroku cloud.
  • Separate production, testing, and development requirements: Allows separate requirements files for production, testing, and development.
  • Easy testing with tox and py.test: Provides easy testing with tox and py.test.
  • Support for fast and efficient testing of database code: Supports fast and efficient testing of database code using transactions and parallel workers.
  • Basic code linting with black, flake8, and isort: Includes basic code linting with black, flake8, and isort.
  • Github Actions testing with Python application setup: Integrates with Github Actions for continuous integration testing.
  • Easy entry vector for WSGI servers: Provides an easy entry vector for WSGI servers, demonstrated with Gunicorn.
  • Dockerfile and Docker Compose: Includes a Dockerfile to build a minimal, production-ready Docker image and a rudimentary definition for Docker Compose to launch the complete project.
  • Practical CRUD UI using Flask-Admin: Provides a practical CRUD UI using Flask-Admin.
  • EditorConfig support: Supports EditorConfig for consistent code formatting.

Summary:

mofanhu is a robust template for Flask applications that provides a clean and organized structure for medium to large web projects. It comes with a range of features such as a well-configured Flask CLI tool, integrated debugging tools, support for databases and ORM models, migrations, background tasks, and more. It also includes Docker support and provides easy testing and linting tools. With mofanhu, developers can quickly set up and develop Flask applications with ease.

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.

template
Templates & Themes

A template or theme refers to a pre-designed layout or structure that provides a basic framework for building a specific type of application or website. It typically includes good design, placeholder content and functional features, allowing developers to customize and fill in the details according to their specific needs.

docker
Docker

A website that uses Docker for containerization to streamline development, testing, and deployment workflows. This includes features such as containerization of dependencies, automated builds and deployments, and container orchestration to ensure scalability and availability.