Go to file Use this template
Simon Diesenreiter 7f81eb1a3d
Some checks failed
CI / linter (ubuntu-latest, 3.9) (push) Failing after 23s
Rename the project from template / rename-project (push) Has been skipped
CI / tests_linux (ubuntu-latest, 3.9) (push) Has been skipped
SonarQube Scan / SonarQube Trigger (push) Successful in 55s
more sonar fixes
2024-11-11 05:51:14 -08:00
.gitea more sonar fixes 2024-11-11 05:51:14 -08:00
docs initial commit 2024-11-10 07:27:36 -08:00
project_name initial commit 2024-11-10 07:27:36 -08:00
tests initial commit 2024-11-10 07:27:36 -08:00
.gitignore initial commit 2024-11-10 07:27:36 -08:00
ABOUT_THIS_TEMPLATE.md remove release to PiPy 2024-11-10 07:37:02 -08:00
apply.sh initial commit 2024-11-10 07:27:36 -08:00
Containerfile initial commit 2024-11-10 07:27:36 -08:00
CONTRIBUTING.md remove release to PiPy 2024-11-10 07:37:02 -08:00
HISTORY.md initial commit 2024-11-10 07:27:36 -08:00
LICENSE initial commit 2024-11-10 07:27:36 -08:00
Makefile initial commit 2024-11-10 07:27:36 -08:00
MANIFEST.in initial commit 2024-11-10 07:27:36 -08:00
mkdocs.yml initial commit 2024-11-10 07:27:36 -08:00
README.md remove release to PiPy 2024-11-10 07:37:02 -08:00
requirements-base.txt initial commit 2024-11-10 07:27:36 -08:00
requirements-test.txt initial commit 2024-11-10 07:27:36 -08:00
requirements.txt initial commit 2024-11-10 07:27:36 -08:00
settings.toml initial commit 2024-11-10 07:27:36 -08:00
setup.py initial commit 2024-11-10 07:27:36 -08:00
wsgi.py initial commit 2024-11-10 07:27:36 -08:00

Flask Project Template

A full feature Flask project template.

See also

HOW TO USE THIS TEMPLATE

  1. Create a new repository from this template and choose a name for your project (e.g. my_awesome_project - recommendation is to use all lowercase and underscores separation for repo names.)
  2. Wait until the first run of CI finishes (Gitea Actions will process the template and commit to your new repo)
  3. Read the file CONTRIBUTING.md
  4. Then clone your new project and happy coding!

Note

: WAIT until first CI run on gitea actions before cloning your new project.

What is included on this template?

  • 🍾 A full feature Flask application with CLI, API, Admin interface, web UI and modular configuration.
  • 📦 A basic setup.py file to provide installation, packaging and distribution for your project.
    Template uses setuptools because it's the de-facto standard for Python packages, you can run make switch-to-poetry later if you want.
  • 🤖 A Makefile with the most useful commands to install, test, lint, format and release your project.
  • 📃 Documentation structure using mkdocs
  • 💬 Auto generation of change log using gitchangelog to keep a HISTORY.md file automatically based on your commit history on every release.
  • 🐋 A simple Containerfile to build a container image for your project.
    Containerfile is a more open standard for building container images than Dockerfile, you can use buildah or docker with this file.
  • 🧪 Testing structure using pytest
  • Code linting using flake8
  • 🎯 Entry points to execute your program using python -m <project_name> or $ project_name with basic CLI argument parsing.
  • 🔄 Continuous integration using Gitea Actions with jobs to lint, test and release your project on Linux, Mac and Windows environments.

Curious about architectural decisions on this template? read ABOUT_THIS_TEMPLATE.md


project_name Flask Application

project_description

Installation

From source:

git clone https://git.disi.dev/author_name/project_urlname project_name
cd project_name
make install

Executing

This application has a CLI interface that extends the Flask CLI.

Just run:

$ project_name

or

$ python -m project_name

To see the help message and usage instructions.

First run

project_name create-db   # run once
project_name populate-db  # run once (optional)
project_name add-user -u admin -p 1234  # ads a user
project_name run

Go to:

Note

: You can also use flask run to run the application.