Skip to content

candidtim/cookiecutter-flask-minimal

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 

cookiecutter-flask-minimal

A microtemplate for a microframework.

This is a minimalist's production-ready Flask project template:

  • no external dependencies except for Flask and pytest
  • doesn't impose any choices of third-party libraries
  • project set-up as per Flask documentation, including things like logging and config, testing and packaging
  • optional and off by deafult: flake8, black and mypy configuration
  • preserves the pure joy of developing with Flask!

Now upgraded to Flask 2 !

Usage

Install cookiecutter:

pip install --user cookiecutter

Create your application from this template:

cookiecutter https://github.com/candidtim/cookiecutter-flask-minimal.git

All set! Run the application:

cd yourapplication
make run

And then open it at http://127.0.0.1:5000/

Features

Included:

Not included:

  • everything else: there is no SQLAlchemy, or MongoKit, or Bootstrap CSS, or React, or whatever else; it is up to you to chose how to implement your application; Patterns for Flask documents well how to easily add these if necessary

  • there are no "sample" features or examples of how to use Flask; this template is not intended as a tutorial, but as a well-configured starting point for a new implementation; refer to the Flask documentation to learn Flask if necessary

  • no choice on how to deploy the application is made, no WSGI container is chosen; see Deploying to Production for the options most suitable for your infrastructure

Contributions

... are welcome! Feel free to create a pull request to fix bugs or keep up to date.

If you think some additional feature is indispensable, feel free to create an issue or a pull request, but bare in mind that the goal of this template is to stay a "minimal" one. If you would like to add a feature, maybe best way to do so is to make it optional and off by default then. One can use cookiecutter's choice variables, and, ultimately, hooks, in order to create an optional feature.

If you do a change, use make test from root directory to test the updated template.

Attributions

Configuration of this entire project template is based on Flask documentation. Please, note however, that this template is not guaranteed to follow Flask documentation precisely.

About

Cookicutter template for a minimal production-ready Flask project

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published